SpringMvc-Demo实践
OkidoGreen
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Spring Mvc 配置记录
pom.xml(parent)UTF-8 false 2.5 2.1 4.1.6.RELEASE 3.2.0 1.2.0 5.1.34 2.4.4 2.3 2.3.20 4.11 1.7.7原创 2017-01-20 16:57:33 · 1128 阅读 · 0 评论 -
How to respond with HTTP 400 error in a Spring MVC @ResponseBody method returning String?
I'm using Spring MVC for a simple JSON API, with@ResponseBodybased approach like the following. (I already have a service layer producing JSON directly.)@RequestMapping(value = "/matches/{matc...转载 2017-09-15 16:10:35 · 1135 阅读 · 0 评论 -
基于 springMVC 的 RESTful HTTP API 实践(服务端)
http://alexpdh.com/2017/06/26/springMVC-restful-api/理解 RESTREST(Representational State Transfer),中文翻译叫“表述性状态转移”。是Roy Thomas Fielding在他2000年的博士论文中提出的。它与传统的 SOAP Web 服务区别在于,REST关注的是要处理的数据,而 SOAP 主...转载 2017-09-15 16:40:53 · 1748 阅读 · 0 评论 -
使用ExceptionHandler进行Spring mvc 异常处理
public abstract class AbstractController { protected final Logger logger = LoggerFactory.getLogger(getClass()); @ExceptionHandler(Exception.class) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERR原创 2017-01-20 17:27:12 · 2328 阅读 · 0 评论 -
Spring 自定义注解分页实现
1.首先自定义注解类import java.lang.annotation.ElementType;import java.lang.annotation.Retention;import java.lang.annotation.RetentionPolicy;import java.lang.annotation.Target;@Target(ElementType.PARAM...转载 2019-05-31 15:49:22 · 1442 阅读 · 0 评论 -
彻底解决spring mvc XSS漏洞问题(包括json的格式的入参和出参)
https://blog.youkuaiyun.com/sanyuesan0000/article/details/89918173一,背景昨天收到公司安全部的一封漏洞邮件,说系统注册存在xss存储型漏洞,然后看了一下系统中是有xssFilter处理xss漏洞的,但是注册页面xss注入的却没有处理,经过分析代码和网上查找资料,xssFilter只能处理get请求的xss注入和post请求非json的注入...转载 2019-05-31 15:51:17 · 4736 阅读 · 2 评论
分享