![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
工作中日常BUG
爱吃拉面的程序狗
这个作者很懒,什么都没留下…
展开
-
项目启动懒加载
项目场景: 例如:项目启动时初始化加载项目中的bean,报了空指针异常,应该是bean加载顺序的问题 问题描述: private Map<String, LoadingBelt> loadingBeltMap = MatchingCoalStatic.matchingCoalSys.getLoadingBeltMap(); 解决方案: 于是想到了懒加载的办法. 懒加载—就是我们在Spring容器启动的是先不把所有的bean都加载到spring的容器中,而是在当需要用的时候,才把这个原创 2021-10-29 12:07:20 · 169 阅读 · 0 评论 -
Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could
问题描述: 换了台电脑后启动项目,找不到Mysql数据库url,maven依赖也没有问题,SpringBoot启动类排除autoconfig也有 @SpringBootApplication(exclude= {DataSourceAutoConfiguration.class} 查看启动日志,发现Tomcat启动端口号为8080,SpringBoot未读取.yml配置文件 解决方案: ...原创 2021-06-15 11:49:05 · 80 阅读 · 2 评论