Announcement Announcement Module
Collapse

JavaConfig forum decommissioned in favor of Core Container

As described at

http://static.springsource.org/sprin...fig/README.TXT

key features of the Spring JavaConfig project have been migrated into the core Spring Framework as of version 3.0.

Please see the Spring 3.0 documentation on @Configuration and @Bean support:

http://static.springsource.org/sprin...tml#beans-java

For any questions related to @Configuration classes and @Bean methods in Spring 3.0, please post in the dedicated 'Core Container' forum at

http://forum.springsource.org/forumdisplay.php?f=26
See more
See less
Extension annotations on Bean methods Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Extension annotations on Bean methods

    Hi,

    How can I put an annotation on a @Bean method, so I can post process the bean/beandef with the data in the annotation?

    If I try to post process the bean/factory in the standard way, I can't get an (easy) access to the annotation. @Bean#meta can't provide enough information in a robust way (meaning, without going into stringulation techniques).

    Thank you,
    Ittay

  • #2
    Hi Ittay,

    There is no such support right now, unfortunately. Perhaps if you spell out your particular use case, we might be able to find some other way of addressing it with JavaConfig?

    Or, you can feel free to create a new feature request (against the core Spring JIRA 'SPR' project) requesting that custom annotations be propagated through to the BeanDefinition objects that get registered when processing @Configuration classes. I'll can't make any promises as to whether it will be implemented, but a JIRA issue will be the right place to discuss it and solicit other feedback.

    It's an interesting idea, for sure. If a @Bean annotation is also annotated with @CustomAnno, it would be nice for a Bean[Factory]PostProcessor to be able to access that annotation instance and act upon it.

    Comment


    • #3
      ok, created http://jira.springframework.org/browse/SPR-5611

      Comment

      Working...
      X