springboot中pom.xml文件中加入spring-boot-starter-data-jpa启动之后报错
:: Spring Boot :: (v1.5.8.RELEASE)
2017-10-31 20:46:35.925 INFO 2216 --- [ main] com.example.demo.GirlApplication : Starting GirlApplication on LAPTOP-B7H78UB8 with PID 2216 (E:\eclipsespace\girl\target\classes started by 张佳坤 in E:\eclipsespace\girl)
2017-10-31 20:46:35.927 INFO 2216 --- [ main] com.example.demo.GirlApplication : The following profiles are active: dev
2017-10-31 20:46:35.965 INFO 2216 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1817d444: startup date [Tue Oct 31 20:46:35 GMT+08:00 2017]; root of context hierarchy
2017-10-31 20:46:37.038 INFO 2216 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8081 (http)
2017-10-31 20:46:37.047 INFO 2216 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2017-10-31 20:46:37.047 INFO 2216 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.23
2017-10-31 20:46:37.167 INFO 2216 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/zjk] : Initializing Spring embedded WebApplicationContext
2017-10-31 20:46:37.167 INFO 2216 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1206 ms
2017-10-31 20:46:37.297 INFO 2216 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2017-10-31 20:46:37.301 INFO 2216 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-10-31 20:46:37.301 INFO 2216 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-10-31 20:46:37.301 INFO 2216 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-10-31 20:46:37.301 INFO 2216 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2017-10-31 20:46:37.322 WARN 2216 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.sql.DataSource' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2017-10-31 20:46:37.323 INFO 2216 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2017-10-31 20:46:37.334 INFO 2216 --- [ main] utoConfigurationReportLoggingInitializer :
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-10-31 20:46:37.426 ERROR 2216 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
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'
Action:
Consider revisiting the conditions above or defining a bean of type 'javax.sql.DataSource' in your configuration.
2017-10-31 20:46:35.925 INFO 2216 --- [ main] com.example.demo.GirlApplication : Starting GirlApplication on LAPTOP-B7H78UB8 with PID 2216 (E:\eclipsespace\girl\target\classes started by 张佳坤 in E:\eclipsespace\girl)
2017-10-31 20:46:35.927 INFO 2216 --- [ main] com.example.demo.GirlApplication : The following profiles are active: dev
2017-10-31 20:46:35.965 INFO 2216 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1817d444: startup date [Tue Oct 31 20:46:35 GMT+08:00 2017]; root of context hierarchy
2017-10-31 20:46:37.038 INFO 2216 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8081 (http)
2017-10-31 20:46:37.047 INFO 2216 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2017-10-31 20:46:37.047 INFO 2216 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.23
2017-10-31 20:46:37.167 INFO 2216 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/zjk] : Initializing Spring embedded WebApplicationContext
2017-10-31 20:46:37.167 INFO 2216 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1206 ms
2017-10-31 20:46:37.297 INFO 2216 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2017-10-31 20:46:37.301 INFO 2216 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-10-31 20:46:37.301 INFO 2216 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-10-31 20:46:37.301 INFO 2216 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-10-31 20:46:37.301 INFO 2216 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2017-10-31 20:46:37.322 WARN 2216 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.sql.DataSource' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2017-10-31 20:46:37.323 INFO 2216 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2017-10-31 20:46:37.334 INFO 2216 --- [ main] utoConfigurationReportLoggingInitializer :
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-10-31 20:46:37.426 ERROR 2216 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
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'
Action:
Consider revisiting the conditions above or defining a bean of type 'javax.sql.DataSource' in your configuration.
...全文
相关推荐
spring-boot-starter-data-jpa 的二级缓存
spring-boot-starter-data-jpa整合 ehcahe 开启二级缓存
在Spring Boot中使用Spring-data-jpa实现分页查询
如何使用jpa进行多条件查询以及查询列表分页呢?下面我将介绍两种多条件查询方式。具体实例代码大家参考下本文吧
SpringBoot框架pom配置示例
快速搭建Spring-boot框架、包含常用的Spring-boot基础配置
Spring Boot + Jpa(Hibernate) 架构基本配置详解
本篇文章主要介绍了Spring Boot + Jpa(Hibernate) 架构基本配置详解,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
SpringBoot整合spring-data-jpa的方法
主要介绍了SpringBoot整合spring-data-jpa的方法,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下


