If I have more than 2 implementations of DAO how to define in ServiceImpl that, which implementation should execute when run the program in Spring BOOT?
>Solution :
You can use @Qualifier annotation in this case along with @Autowired if you want to specify which bean you want to use.
for eg:-
@Qualifier("Dao1")
@Autowired
private final Dao daoImpl1;
This will make sure that the bean or Dao bean with name Dao1 will only be injected so that you can use it .
You can learn more about this from the below post:
https://www.baeldung.com/spring-qualifier-annotation