SpringBoot 项目启动出错:Failed to configure a DataSource: 'url' attribute is not specified and no embedde

不废话,直接上解决方案:

在springboot的启动类@SpringBootApplication上做点改动,如下:

@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
public class ErdemoApplication {

   public static void main(String[] args) {
      SpringApplication.run(ErdemoApplication.class, args);
   }
}

好了。

猜你喜欢

转载自blog.csdn.net/qq_35387940/article/details/82869566