在Springboot spring boot 1 5 10 RELEASE中使用jpa连接远程mysql数据库时出错

时间:2018-02-11 13:06:21

标签: spring-boot

在Springboot spring boot 1 5 10 RELEASE中使用jpa连接到远程mysql数据库时出现以下错误。

为什么我收到此错误?

Parameter 0 of constructor in org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration required a bean of type 'javax.sql.DataSource' that could not be found.
    - Bean method 'dataSource' not loaded because @ConditionalOnClass did not find required class 'org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType'
    - Bean method 'dataSource' not loaded because @ConditionalOnClass did not find required class 'org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType'

动作:

Consider revisiting the conditions above or defining a bean of type 'javax.sql.DataSource' in your configuration.

0 个答案:

没有答案