79233781

Date: 2024-11-28 11:57:07
Score: 1.5
Natty:
Report link

As of springboot 3.4, it has builtin support for that, by using @Bean(defaultCandidate=false)

see https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.4-Release-Notes#defining-additional-beans

Additionally, in this case, the type-based @Autowired needs changing. Otherwise it will inject the auto-configured one.

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: imba-tjd