@Autowired
private StringRedisTemplate stringRedisTemplate;
@Resource(name="stringRedisTemplate")
private ValueOperations<String,String> valOpsStr;
@Autowired
private RedisTemplate<Object, Object> redisTemplate;
@Resource(name="redisTemplate")
private ValueOperations<Object,Object> valOps;
found such a piece of code while reading, that is, what I want to ask is, [@ Autowired annotations StringRedisTemplate, automatically, but why can stringRedisTemplate be specified when the @ Resource annotation uses the name attribute to specify a name?] what is the principle of this, and this will not lead to the creation of a bean with the same name?