java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enableRedisKeyspaceNotificationsInitializer' defined in org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: 'java.util.List org.springframework.data.redis.connection.RedisConnection.getConfig(java.lang.String)'
Caused by: java.lang.NoSuchMethodError: 'java.util.List org.springframework.data.redis.connection.RedisConnection.getConfig(java.lang.String)'
에러 로그
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis', version: '2.7.0'
implementation group: 'org.springframework.session', name: 'spring-session-data-redis', version: '1.3.5.RELEASE'
수정 전 'spring-boot-starter-data-redis', 'spring-session-data-redis'의 dependency
처음에 2.7.0할려고 했는데 취약점이 있다고 해서
✨ 해결
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-redis', version: '2.7.0'
implementation group: 'org.springframework.session', name: 'spring-session-data-redis', version: '2.7.0'
결국 2.7.0으로 버전을 똑같이 맞춤.
아니면 둘다 버전을 낮추는 방법도 있다.
참고 👇
https://mvnrepository.com/artifact/org.springframework.session/spring-session-data-redis/2.7.0
반응형