Loading

Springboot的坑

SpringBoot关于依赖注入的坑很多,记录一下

2021-11-29 21:18:12.938  WARN 10175 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'testController': Unsatisfied dependency expressed through field 'wechatTokenUtil'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'wechatTokenUtil' defined in file [/Users/linjiashen/IdeaProjects/MetasequoiaService/shuishan-wechat-server/target/classes/com/wechat/official/util/WechatTokenUtil.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisUtil': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'redisTemplate' is expected to be of type 'org.springframework.data.redis.core.StringRedisTemplate' but was actually of type 'org.springframework.data.redis.core.RedisTemplate'
posted @ 2021-11-29 21:31  ljs9  阅读(53)  评论(0)    收藏  举报