Spring Boot: How spring boot handle if we use both @Component and @Bean annotation for same class
In my spring boot application. I created a class name Book and annotated that class with @Component annotation. Then I created a AppConfig class with @Configration annotation and in that class created a method name getBook() annotated with @Bean annotation which returns Book object.