Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class

 

原因1:  pom.xml 配置缺少version

报错:

  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-cache</artifactId>
   </dependency>

改正:

  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-cache</artifactId>
    <version>2.1.6.RELEASE</version>
  </dependency>

 

其他情况可参考:

   SpringBoot 2.0 报错: Failed to configure a DataSource: 'url' attribute is not specified and no embe...    https://www.jianshu.com/p/836d455663da  

 

共同学习,共同进步,若有补充,欢迎指出,谢谢!

posted @ 2019-07-31 11:30  逆水行舟,平原走马  阅读(264)  评论(0编辑  收藏  举报