目录
前言
遇到一个问题就是启动的时候失败了,也没搞明白是什么原因,然后百度,发现现在很多的都是爬虫到的答案,没有啥意义!对我是0帮助,发现了一个规律就是遇到问题一定记得要去官方网址,进行查询人家的doc文档说明。会有很大的帮助!
问题日志描述
下面是打印出来的日志信息
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.3.12.RELEASE)
2022-05-31 20:43:16.080 INFO 8592 --- [ main] com.helper.DaoHelperApplication : Starting DaoHelperApplication on Malin with PID 8592 2022-05-31 20:43:16.085 INFO 8592 --- [ main] com.helper.DaoHelperApplication : The following profiles are active: dev
2022-05-31 20:43:18.311 INFO 8592 --- [ main] com.alibaba.druid.pool.DruidDataSource : {dataSource-1,online} inited
2022-05-31 20:43:18.760 INFO 8592 --- [ main] com.alibaba.druid.pool.DruidDataSource : {dataSource-2,test} inited
2022-05-31 20:43:19.297 INFO 8592 --- [ main] com.alibaba.druid.pool.DruidDataSource : {dataSource-3,online} inited
2022-05-31 20:43:19.748 INFO 8592 --- [ main] com.alibaba.druid.pool.DruidDataSource : {dataSource-4,test} inited
2022-05-31 20:43:19.748 INFO 8592 --- [ main] c.b.d.d.DynamicRoutingDataSource : dynamic-datasource - add a datasource named [test] success
2022-05-31 20:43:19.749 INFO 8592 --- [ main] c.b.d.d.DynamicRoutingDataSource : dynamic-datasource - add a datasource named [online] success
2022-05-31 20:43:19.750 INFO 8592 --- [ main] c.b.d.d.DynamicRoutingDataSource : dynamic-datasource initial loaded [2] datasource,primary datasource named [test]
_ _ |_ _ _|_. ___ _ | _
| | |\/|_)(_| | |_\ |_)||_|_\
/ |
3.5.1
2022-05-31 20:43:23.809 INFO 8592 --- [ main] com.helper.DaoHelperApplication : Started DaoHelperApplication in 8.508 seconds (JVM running for 11.834)
2022-05-31 20:43:23.816 INFO 8592 --- [extShutdownHook] c.b.d.d.DynamicRoutingDataSource : dynamic-datasource start closing ....
2022-05-31 20:43:23.819 INFO 8592 --- [extShutdownHook] com.alibaba.druid.pool.DruidDataSource : {dataSource-4} closing ...
2022-05-31 20:43:23.829 INFO 8592 --- [extShutdownHook] com.alibaba.druid.pool.DruidDataSource : {dataSource-4} closed
2022-05-31 20:43:23.829 INFO 8592 --- [extShutdownHook] com.alibaba.druid.pool.DruidDataSource : {dataSource-3} closing ...
2022-05-31 20:43:23.831 INFO 8592 --- [extShutdownHook] com.alibaba.druid.pool.DruidDataSource : {dataSource-3} closed
2022-05-31 20:43:23.839 INFO 8592 --- [extShutdownHook] c.b.d.d.DynamicRoutingDataSource : dynamic-datasource all closed success,bye
Process finished with exit code 0
解决办法
参考官方文档
这个其实是允许完了,然后释放了资源,正常的逻辑打印,不要大惊小怪,因为这个Mybatis-plus没有任何调用的地方,自然资源会释放的的