具体报错为
The bean 'sessionRepository', defined in class path resource [org/springframework/boot/autoconfigure/session/RedisSessionConfiguration$SpringBootRedisHttpSessionConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/session/data/redis/config/annotation/web/server/RedisWebSessionConfiguration.class] and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
网上查了多遍相关的内容,具体原因应该是springboot自动装配和springsession配置重复定义了sessionRepository这个bean,试过在启动类的@SpringBootApplication进行排除操作,但是又会引起其他的问题错误,使用提示配置的话,担心之后再排查错误的时候会不清不楚的,现在不清楚是否不使用spring.main.allow-bean-definition-overriding=true的情况下解决问题