报错信息为:Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource
生活随笔
收集整理的這篇文章主要介紹了
报错信息为:Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
報錯信息為:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
?
錯誤原因:沒有配置數據庫
pom.xml中有mybatis依賴
<dependency><groupId>org.mybatis.spring.boot</groupId><artifactId>mybatis-spring-boot-starter</artifactId><version>2.0.0</version> </dependency>如果代碼中沒有使用到數據庫,就可以直接加一個注解搞定
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)?
總結
以上是生活随笔為你收集整理的报错信息为:Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: springsecurity的工作原理
- 下一篇: 消息中间件之ActiveMQ 入门