I am trying to use spring-data-redis in a spring-boot application to work with redis. I am creating JedisConnectionFactory
as follows:
RedisStandalo
Even though many people benefit from this framework, sometimes it takes more time troubleshooting its dependencies. It's a known issue and I had the same problem as below.
java.lang.NoSuchMethodError: org.springframework.data.repository.config.RepositoryConfigurationSource.getAttribute(Ljava/lang/String;)Ljava/util/Optional; at org.springframework.data.jpa.repository.config.JpaRepositoryConfigExtension.postProcess(JpaRepositoryConfigExtension.java:125) ~[spring-data-jpa-2.0.2.RELEASE.jar:2.0.2.RELEASE]
I paid attention to the 1st jar file and its version - 2.0.2 and removed of the file .. spring-data-jpa-2.0.2.RELEASE.jar. After that I let parent decide it's dependencies and it downloaded 1.10.5 version.
org.springframework.boot
spring-boot-starter-parent
1.4.2.RELEASE
org.springframework.boot
spring-boot-starter-data-jpa
....
spring-data-jpa-2.0.2.RELEASE.jar (conflict with parent)
spring-data-jpa-1.10.5.RELEASE.jar (resolved version)
Everyone might have different versions when they run into this error. But it would be faster if you double check with it's dependencies' version first.