Spring Boot: "No qualifying bean of type... found" when autowiring concrete class

If you want a special bean you have to use the @Qualifier annotation:

@Autowired
@Qualifier("SomethingImpl")
private Something _something;

I figured out you can do the same with a javax.inject style DI:

@Named("myConcreteThing")
public class SomethingImpl implements Something { ... }

Where you want to inject it:

@Inject
@Named("myConcreteThing")
private Something _something;

This is correctly picked up by @EnableAutoConfiguration and @ComponentScan.


I think you need to add @Service in implementing class.. like

@Service public class SomethingImpl implements Something { // implementation }