springboot
猫猫猫尾草
代码是热爱,敲出世界充满爱
展开
-
java 初始化线程池的4种方式
在业务开发中,有很多异步场景,为了节约时间或或者提高系统的吞吐量,要做一些异步任务,在Java中要实现异步通常都是Thread,开启一个线程Thread,开启线程有四种方式。1、初始化线程池的4中方式1)、继承Thread2)、实现Runnable接口lambda表达式使用要1.8版本以上,搭建maven项目需要设置maven的setting.xml文件,jdk是1.8以上,https://blog.csdn.net/a203206868/article/details/119153377?spm=原创 2021-08-20 15:07:48 · 3723 阅读 · 0 评论 -
错误: 找不到或无法加载主类 com.xxx.xxx.xxxApplication
**解决方法:spring cloud 的话直接 clean 父级整个项目然后 install (只clean启动不了的哪一个是不行的) ,普通项目 clean install就行了原创 2021-08-10 20:09:07 · 1255 阅读 · 0 评论 -
报错 :configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could
spring boot 报错无法配置DataSource:未指定’url’属性,也无法配置嵌入数据源。Description:Failed to configure a ~~DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured.~~Reason: Failed to determine a suitable driver classAction:Consider th原创 2021-08-06 09:09:05 · 375 阅读 · 0 评论