2024-03-26 16:26:50.745 [main] INFO c.a.d.s.b.a.DruidDataSourceAutoConfigure - Init DruidDataSource

2024-03-26 16:42:38.759 [main] INFO c.a.d.s.b.a.DruidDataSourceAutoConfigure - Init DruidDataSource
2024-03-26 16:42:43.114 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited
2024-03-26 16:42:47.348 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ...
2024-03-26 16:42:47.359 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed
2024-03-26 16:42:47.360 [main] INFO org.apache.catalina.core.StandardService - Stopping service [Tomcat]
Disconnected from the target VM, address: '127.0.0.1:65304', transport: 'socket'

Process finished with exit code 1

微服务中终端服务启动异常。

原因:类加载异常,没加注解,启动时找不到类。

解决方法:加上注解。

@Service
public class ImgServiceImpl implements ImgService {};

场景:此类问题在新需求添加代码中容易出现。添加代码关键点要加全。
posted @ 2024-03-26 16:48  黎明的太阳  Views(77)  Comments(0Edit  收藏  举报