![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring Boot
OrangeHap
这个作者很懒,什么都没留下…
展开
-
Springboot中@PathVariable,@RequestParam,@RequestBody,HttpServletRequest区别
@PathVariable //接收请求URL中占位符的值 @GetMapping("/getId/{id}")//{id}写在请求URL中,参数来源于URL中,所以@PathVariable可以多个 //单个入参时id可不写,多个入参需要写 public String pathVariable(@PathVariable("id") Integer id) { } @RequestPar...原创 2019-12-16 15:12:13 · 1299 阅读 · 0 评论 -
前后端联调拦截器日志打印配置
打印信息格式: 前端信息 后端信息 springboot下配置 import net.sf.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Configuration; import ja...原创 2019-12-13 11:41:18 · 428 阅读 · 0 评论 -
Spring boot集成swagger
http://editor.swagger.io/ 添加maven依赖 <!-- swagger2 --> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> &l...原创 2019-11-27 16:18:29 · 111 阅读 · 0 评论 -
Spring Boot相关
Documentation resources文件夹中目录结构 static:保存所有的静态资源,如:js css images templates:保存所有的模板页面(Spring Boot默认jar包使用嵌入式的Tomcat,默认不支持JSP页面),可以使用模板引擎(freemarker、thymeleaf) application.yml/application.properties...原创 2019-11-17 22:33:18 · 195 阅读 · 0 评论