Error starting ApplicationContext. To display the Auto-configuration report re-run your application with ' debug ' enabled.2017-05-13 20:11:30.651 ERROR 1869- --[main] O.s.b.d.loggingfailureanalysisreporter: ***************************application FAILED to START**** Description:parameter 0 of the method Setredis in Cn.andhub.authorization.manager.impl.RedisTokenManager required a single beans, but 2 were found:-Redistemplate:defin Ed by method ' Redistemplate ' in class path resource [org/springframework/boot/autoconfigure/data/redis/ Redisautoconfiguration$redisconfiguration.class]-stringredistemplate:defined by method ' Stringredistemplate ' in CLA SS Path Resource [org/springframework/boot/autoconfigure/data/redis/redisautoconfiguration$ Redisconfiguration.class]action:consider marking one of the beans as @Primary, updating the consumer to accept multiple be ans, or using @Qualifier to identify the bean, which should be consumed
Workaround:
Spring-boot-starter-parent the latest version should be 2.0.0, will report this error, change as follows:
<parent>
<groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.6.RELEASE</version> //降低parent版本 <relativePath/> <!-- lookup parent from repository --></parent>
Spring boot using Redis, error, there are redistemplate and stringredistemplate two beans?