When I add below dependency to pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
Below error comes
2018-05-31 12:02:38.217 INFO 1416 --- [ost-startStop-1] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2018-05-31 12:02:39.233 ERROR 1416 --- [ost-startStop-1] o.s.b.c.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'registerCorePageControllerServlet' defined in com.amd.apps.employee.cloud.AddonApplication: Unsatisfied dependency expressed through method 'registerCorePageControllerServlet' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authenticationContextImpl' defined in URL [jar:file:/C:/Users/shiv/AppData/Local/Temp/employee.cloud-1.0.0.jar-spring-boot-libs-1766ddea-c2ae-424e-9565-d00395eb0d5c/core.cloud-1.0.0.jar!/com/amd/apps/cloud/service/common/AuthenticationContextImpl.class]: Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'companyServiceImpl' defined in URL [jar:file:/C:/Users/shiv/AppData/Local/Temp/employee.cloud-1.0.0.jar-spring-boot-libs-1766ddea-c2ae-424e-9565-d00395eb0d5c/core.cloud-1.0.0.jar!/com/amd/apps/cloud/service/directory/impl/CompanyServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.atlassian.connect.spring.AtlassianHostRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
However if i remove this dependency, everything works perfectly. Redis service is configured, running and accessible. However i see below messages as well, which i do not see during normmal execution
2018-05-31 12:02:28.955 INFO 1416 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode! 2018-05-31 12:02:29.071 INFO 1416 --- [ main] .RepositoryConfigurationExtensionSupport : Spring Data JPA - Could not safely identify store assignment for repository candidate interface com.atlassian.connect.spring.AtlassianHostRepository. 2018-05-31 12:02:29.171 INFO 1416 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
The problem is caused by RedisRepositoriesAutoConfiguration. It registers EnableRedisRepositories repeatedly only with default config, which with empty basePackages. To solve the problem, you could exclude RedisRepositoriesAutoConfiguration by: