Springboot 运行时出现: Cannot determine embedded database driver class for database type NONE Action: If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it
两个解决办法, 1)在SpringApplication class上添加注释@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})。
2)在application.properties中添加spring.datasource.url=jdbc:mysql://localhost/my_database。
本文介绍了在Spring Boot应用中遇到的“Cannot determine embedded database driver class for database type NONE”错误及其两种解决方案:通过排除数据源自动配置或指定数据库URL。
2万+





