Announcement Announcement Module
No announcement yet.
Quick Question Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Quick Question

    Is there an annotation equivalent for the following?

    <bean id="fooService" class="" destroy-method="stop" init-method="start" />

    I need to define a start and stop method for my beans and it works fine with that xml but I want to use annotations.

    Also using annotations, I am still required to do the following:

    <service ref="barService" interface="" />
    <reference id="barService" interface="" />

    I thought annotations were supposed to be a replacement for XML. I have @Service on BarService and FooService, and @AutoWire whenever I use these services.

    Thank you!

  • #2
    Well how about reading the documentation, scroll down to section 3.11.6


    • #3
      Awww, who's the newb who didn't RTFM? Thanks though that helped a lot, I couldn't see the annotations because I was missing an import package for javax.annotation.