spring boot启动报错
来源:2-1 开发环境安装

朵儿一支
2017-10-15
spring boot启动报错,错误为:
:: Spring Boot :: (v1.5.3.RELEASE)
2017-10-15 00:09:18.551 INFO 52508 --- [ main] com.cssiot.CssformApplication : Starting CssformApplication on my-athena with PID 52508 (E:\stsWorkPlace\cssform\target\classes started by asus in E:\stsWorkPlace\cssform)
2017-10-15 00:09:18.555 INFO 52508 --- [ main] com.cssiot.CssformApplication : No active profile set, falling back to default profiles: default
2017-10-15 00:09:18.644 INFO 52508 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4461c7e3: startup date [Sun Oct 15 00:09:18 CST 2017]; root of context hierarchy
2017-10-15 00:09:19.744 INFO 52508 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2017-10-15 00:09:19.809 INFO 52508 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2017-10-15 00:09:19.842 INFO 52508 --- [ main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.cssiot.modules.bas.repository.PileTypeRepository.
2017-10-15 00:09:22.203 INFO 52508 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2017-10-15 00:09:22.220 INFO 52508 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2017-10-15 00:09:22.222 INFO 52508 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.14
2017-10-15 00:09:22.359 INFO 52508 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2017-10-15 00:09:22.360 INFO 52508 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3720 ms
2017-10-15 00:09:22.630 INFO 52508 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2017-10-15 00:09:22.633 INFO 52508 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-10-15 00:09:22.634 INFO 52508 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-10-15 00:09:22.635 INFO 52508 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-10-15 00:09:22.636 INFO 52508 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2017-10-15 00:09:22.693 WARN 52508 --- [ 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.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.tomcat.jdbc.pool.DataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. 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).
2017-10-15 00:09:22.696 INFO 52508 --- [ main] o.apache.catalina.core.StandardService : Stopping service Tomcat
2017-10-15 00:09:22.718 INFO 52508 --- [ main] utoConfigurationReportLoggingInitializer :
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-10-15 00:09:22.724 ERROR 52508 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
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).
上网查询都说是配置没配数据源,但是我配置了
spring:
profiles:
active: dev
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://127.0.0.1:5432/sims
username: root
password: root
jpa:
database: postgresql
show-sql: true
hibernate:
ddl-auto: update
redis:
host: 192.168.2.108
port: 6379
而且pom.xml里也导入了
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
还有之前也是好的,感觉突然就不行了,不知道怎么回事
老师,帮我看看,谢谢
1回答
-
JoJo
2017-10-16
之前是好的?那就恢复到好的时候,然后一点一点加代码,看看是加了什么出的问题,现在从你提供的信息看是没问题的。
122017-10-19
Spring Security技术栈开发企业级认证与授权
2662 学习 · 1561 问题
相似问题