随笔分类 -  SpringBoot

摘要:在一个SpringBoot项目启动时会默认扫描当前启动类SpringApplication所在目录的所有子目录,并扫描引入的jar的spring.factories文件,通过此文件把相关的配置加载到spring的容器中。 ##编辑自己的starter ###方式1:通过META-INF/spring 阅读全文
posted @ 2023-07-17 08:44 三丝柚 阅读(14) 评论(0) 推荐(0) 编辑
摘要:**在SpringBoot中如果同时存在多个配置文件,则会相互覆盖,前面的内容会被后面的给覆盖。因此我们需要确定最后加载的是那哪个文件,先上结论加载顺序、yaml --> yml --> properties 。** ```java @ConfigurationProperties("storage 阅读全文
posted @ 2023-07-13 17:16 三丝柚 阅读(198) 评论(0) 推荐(0) 编辑
摘要:``` 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessi 阅读全文
posted @ 2023-07-07 08:39 三丝柚 阅读(171) 评论(0) 推荐(0) 编辑

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