lynnetest

问题一

Field redisUtil in com.sui.demo.controller.redisController required a bean of type \'com.sui.demo.util.RedisUtil\' that could not be found

原因:

未扫描到RediUtil包,无法用spring ioc容器自动创建对象

解决方法一:

去掉@Autowired注解,手动创建对象 private JedisPool jedisPool= new JedisPool();

解决方法二:

启动类手动添加扫描该包

 

分类:

技术点:

相关文章: