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
Equivlent of destroy-method attribute Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Equivlent of destroy-method attribute

    Here is an XML config sample:

    <bean id="exampleInitBean" class="examples.ExampleBean"
    destroy-method="cleanup"/>

    Is there any java-based annotation that does the exact same thing as the "destroy-method" bean attribute?

    For example:

    @Configuration
    public class SimpleConfig
    {
    @Bean
    @???????????
    public ExampleBean exampleBean()
    {
    return new ExampleBean();
    }
    }


    Thanks.
    Last edited by zollen; Dec 30th, 2009, 12:59 PM.

  • #2
    Sure!

    http://static.springsource.org/sprin...ean-annotation

    http://static.springsource.org/sprin...oyMethod%28%29

    Comment

    Working...
    X