- 2019-05-28springboot启动报错Failed t
- 2020-02-27 Docker 不启动 centos,报错S
- centos puppeteer 报错 UnhandledPro
- Failed to configure a DataSource
- springcloud项目启动报错Failed to confi
- iOS 国际化异常:read failed: the data
- tomcat启动报错:Failed to start compo
- RN 编译app:bundleReleaseJsAndAsset
- 启动报错:ERROR: child process failed
- android Failed to send a message
原因:之前导包时导入了springdata -jpa的包.他会默认去运行相关的configuration.
配置的注解需要连接数据库.
一个解决方式是添加exclude排除,代码如下:
@springbootapplication(exclude = datasourceautoconfiguration.class)
我的是一个parent有多个子模块,子模块有两个app且都加了@springbootapplication注解,如果要正常运行两个类必须都加上exclude = datasourceautoconfiguration.class才可以
二是去掉依赖
<dependency>
<groupid>org.springframework.boot</groupid>
<artifactid>spring-boot-starter-data-jpa</artifactid>
</dependency>
手动删除它所生成的项目的jar包,重编译,然后就可以正常启动。
网友评论