Springboot空项目启动时报错

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'inMemoryDatabaseShutdownExecutor' defined in class path resource 
[org/springframework/boot/devtools/autoconfigure/DevToolsDataSourceAutoConfiguration.class]: Unsatisfied dependency expressed through method 'inMemoryDatabaseShutdownExecutor' 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$Hikari.class]: Bean instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is 
org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
上面的错加上@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
2018-12-06 17:01:23.248  WARN 11028 --- [  restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.session.SessionAutoConfiguration$ServletSessionRepositoryImplementationValidator': Invocation of init method failed; nested exception is org.springframework.boot.autoconfigure.session.NonUniqueSessionRepositoryException: Multiple session repository candidates are available, set the 'spring.session.store-type' property accordingly
2018-12-06 17:01:23.249  INFO 11028 --- [  restartedMain] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
2018-12-06 17:01:23.269  INFO 11028 --- [  restartedMain] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2018-12-06 17:01:23.323  INFO 11028 --- [  restartedMain] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-12-06 17:01:23.339 ERROR 11028 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Multiple Spring Session store implementations are available on the classpath:
    - org.springframework.session.jdbc.JdbcOperationsSessionRepository
    - org.springframework.session.data.redis.RedisOperationsSessionRepository


Action:

Consider any of the following:
    - Define the `spring.session.store-type` property to the store you want to use
    - Review your classpath and remove the unwanted store implementation(s)

上面的错springboot集成springsession利用redis来实现session共享

所以没有配置redis的代码和properties,但是pom中 引入了redis;要配置spring.session.store-type=none

  • 6
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值