springboot中pom.xml文件中加入spring-boot-starter-data-jpa启动之后报错

滑过浪潮ξ 滑过浪潮ξ 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
:: 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.
...全文

相关推荐

评论 5
收藏 已收藏
分享
返回顶部
滑过浪潮ξ
Java 51,407 成员 86,127 内容