0

So im trying to understand why a @Bean created object that contains a @LookUp doesnt work, but works with a @Component one. Here one user says that annotations on @bean called classes will not be processed, but i just tried a class that contains an @Autowired field and this class was instantiated with @Bean in the @Configuration class and it worked.

Maxrunner
  • 1,955
  • 4
  • 24
  • 41
  • 1
    The last sentence in the [javadoc](https://docs.spring.io/spring-framework/docs/5.2.x/javadoc-api/org/springframework/beans/factory/annotation/Lookup.html) also states that it will not work. – LucasP Dec 17 '19 at 16:30
  • But i assume that some annotations do work in a class when called with @bean. – Maxrunner Dec 18 '19 at 10:19

0 Answers0