springboot使用JPA数据访问启动报错:Cannot determine embedded database driver class for database type NONE
maven工程: SpringBoot1.5 +Web+JPA+MYSQL+JDBC
报错信息如下:
***************************
APPLICATION FAILED TO START
***************************
Description:
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 (no profiles are currently active).
问题原因:
产生这个异常是因为 SpringBoot 启动时会自动注入数据源和配置 jpa
解决方案:
在启动类的@SpringBootApplication
注解加入以下代码:
@SpringBootApplication