Announcement Announcement Module
Collapse
No announcement yet.
Annotations based configurations Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Annotations based configurations

    Hi,

    I am new to spring; and most of the times use it by configuring via XML. Today I tried to move towards the annotations and what i discovered is as follows

    1. The actual bean definition has to be in xml only
    2. Once the bean is defined in the xml his private field variables ca be obtained by annotation (resource/ qualifier etc)

    How ever i strongly feel that even bean creation should happen over annotations; Can anybody help me understand why its not that way? any pointers would be a great help. I some how see the above 2 points dirty

    -R

  • #2
    All that is explained in the reference guide. Annotate your beans with @Component (or @Service, @Repository, @Controller depending on the type). Enable component-scanning in xml... And presto... However as I stated all that is explained in the reference guide and sample applications.

    Comment

    Working...
    X