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