Springboot use annotations in @Qualifier

Automatically when needed injection javabean, if the injection is an interface, and this interface have a plurality of implementation classes, an error is reported.

The solution is on the implementation class plus @Service ( "Alias"), an increase @Qualifier ( "Alias") and @Autowired comment on the injection hub

Guess you like

Origin www.cnblogs.com/supertan/p/12381802.html