Search code examples
springspring-ioc

Is it possible to autowire bean name in Spring?


Is it possible to autowire bean name in Spring using annotations instead of using BeanNameAware interface?


Solution

  • It is not possible out of the box, you can create own annotation @BeanNameInjected and register own BeanPostProcessor to deal with it.