0

Why is it that manually declaring a RedisTemplate bean with the same name as the RedisTemplate provided by Spring does not conflict, and can correctly obtain the bean declared by oneself for use.

When there is no manual declaration, it can be obtained normally. It is indicated that Spring is being used. But it itself does not support beans with the same name, why can we manually declare a bean named "redisTemplate"

1
  • Why wouldn't it? The bean is provided by Spring Boot and is only conditionally provided if none has been provided manually. That is the whole point of conditional beans.
    – M. Deinum
    Commented Jul 9 at 6:54

0

Browse other questions tagged or ask your own question.