tangou

2018年2月8日

如何在SpringBoot项目中使用拦截器

摘要: 相比springmvc,springboot中拦截器不需要在xml中配置,只需定义拦截器类 implements HandlerInterceptor 和拦截器拦截路径的配置类extends WebMvcConfigurerAdapter 1.SessionInterceptor 2.Session 阅读全文

posted @ 2018-02-08 17:01 tangou 阅读(12700) 评论(0) 推荐(0) 编辑

springboot练习

摘要: https://www.jianshu.com/p/9a08417e4e84 1.@Controller和@RestController的区别? Spring4之后加入的注解,原来在@Controller中返回json需要@ResponseBody来配合,如果直接用@RestController替代 阅读全文

posted @ 2018-02-08 15:38 tangou 阅读(243) 评论(0) 推荐(0) 编辑

使用Druid作为SpringBoot项目数据源(添加监控)

摘要: Druid是一个关系型数据库连接池,它是阿里巴巴的一个开源项目。Druid支持所有JDBC兼容数据库,包括了Oracle、MySQL、PostgreSQL、SQL Server、H2等。Druid在监控、可扩展性、稳定性和性能方面具有明显的优势。通过Druid提供的监控功能,可以实时观察数据库连接池 阅读全文

posted @ 2018-02-08 15:35 tangou 阅读(499) 评论(0) 推荐(0) 编辑

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

导航

统计

点击右上角即可分享
微信分享提示