南开小巷

导航

随笔分类 -  SpringBoot

springboot项目配置文件中的数据库用密文展示如何做
摘要:1.添加依赖: <dependency> <groupId>com.github.ulisesbocchio</groupId> <artifactId>jasypt-spring-boot-starter</artifactId> <version>1.16</version> </depende 阅读全文

posted @ 2020-08-13 19:55 南开小巷 阅读(447) 评论(0) 推荐(0)

spring boot项目配置日志到服务器指定目录
摘要:新建的Spring Boot项目一般都会引用spring-boot-starter或者spring-boot-starter-web,而这两个起步依赖中都已经包含了对于spring-boot-starter-logging的依赖,所以,无需额外添加依赖。 resources目录下有个applicat 阅读全文

posted @ 2020-07-27 14:09 南开小巷 阅读(1250) 评论(0) 推荐(0)

与spring的相关代码,开发中的经验总结
摘要:1.在基于 Spring 的 web 项目中,我们可以随时随地获取到当前请求,获取方式就是下面给出的代码: HttpServletRequest req = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes() 阅读全文

posted @ 2020-05-07 17:59 南开小巷 阅读(328) 评论(0) 推荐(0)

spring boot mybatis sql打印到控制台
摘要:如何设置spring boot集成 mybatis 然后sql语句打印到控制台,方便调试: 设置方法: 在application.properties文件中添加: logging.level.com.zhangshitong.springbootModel.demo.mapper=DEBUG 红色部 阅读全文

posted @ 2017-11-03 11:12 南开小巷 阅读(10920) 评论(1) 推荐(3)

spring boot学习笔记2
摘要:开场知识: spring 容器注入bean,时容器初始化的一些接口以及接口调用的时间先后顺序: 1)BeanFactoryPostProcessor 容器初始化的回调方法 * BeanFactoryPostProcessor在spring容器初始化之后触发,而且只会触发一次 * 触发的时机比Bean 阅读全文

posted @ 2017-10-26 13:16 南开小巷 阅读(680) 评论(0) 推荐(0)

Spring boot学习笔记
摘要:ring Boot的启动分析: 1)直接调用静态的run方法(实质上内部是直接转换成2)方法) ConfigurableApplicationContext context = SpringApplication.run(App.class,args); 2)实例化SpringApplication 阅读全文

posted @ 2017-10-16 20:01 南开小巷 阅读(446) 评论(0) 推荐(0)