错误是bean仓库找不到这个类,这个类是依赖中的类,不能直接配置Bean
Field redisTemplate in com.dhcc.wdqz.pubdb.util.RedisOperator required a bean of type 'org.springframework.data.redis.core.StringRedisTemplate' that could not be found.
@Configuration//spingboot中的注解,相当于---spring applicationContext.xml public class configBean { @Bean public StringRedisTemplate StringRedisTemplate(){ return new StringRedisTemplate(); } }