启动springboot时候的错误信息:

An attempt was made to call the method org.springframework.boot.autoconfigure.session.RedisSessionConfiguration$SpringBootRedisHttpSessionConfiguration.setCleanupCron(Ljava/lang/String;)V but it does not exist. Its class, org.springframework.boot.autoconfigure.session.RedisSessionConfiguration$SpringBootRedisHttpSessionConfiguration, is available from the following locations:

jar:file:/C:/Users/wwty/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.0.5.RELEASE/spring-boot-autoconfigure-2.0.5.RELEASE.jar!/org/springframework/boot/autoconfigure/session/RedisSessionConfiguration$SpringBootRedisHttpSessionConfiguration.class

It was loaded from the following location:

file:/C:/Users/wwty/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.0.5.RELEASE/spring-boot-autoconfigure-2.0.5.RELEASE.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.boot.autoconfigure.session.RedisSessionConfiguration$SpringBootRedisHttpSessionConfiguration

 

这个错误需要在  配置文件中添加:

spring.session.store-type = none

session store type使用来存放session的存储方式,目前Spring boot中只支持Redis方式。 由于本应用暂无需将session放入redis的需求,故这里就可以将session store type设置为none.

额, 莫名其妙、

 

相关文章:

  • 2021-12-16
  • 2022-12-23
  • 2021-10-12
  • 2022-12-23
  • 2021-05-09
  • 2021-09-07
  • 2021-08-15
  • 2022-01-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-24
  • 2021-07-10
  • 2022-12-23
  • 2021-06-07
  • 2021-10-26
相关资源
相似解决方案