03 2020 档案
springboot初始化运行时dataSource报错
摘要:Failed to configure a DataSource: 'url' attribute is not specified and no embedd: 在本项目中完全没有涉及到任何有关数据库的内容,报错原因是为can not find suitable driver: 后在@Spring 阅读全文
posted @ 2020-03-21 23:26 kongieg 阅读(801) 评论(0) 推荐(0)
单例模式
摘要:保持线程安全的高性能单例模式:双检锁机制: public class Singleton { //volatile使主内存变动实时刷新,懒加载模式 private volatile static Singleton singleton; //将构造函数设置为private,阻止其他类直接实例化此类。 阅读全文
posted @ 2020-03-14 15:27 kongieg 阅读(154) 评论(0) 推荐(0)