Reputation: 1541
In struts2 i almost did not use any xml configs and used much of annotations for MVC. I build a small application in that way using struts2. Now i want to develop same project using spring 3.2. Now i want to use annotation to create beans and request mapping (this i used). I want a clear example of using bean annotations and is it possible to set properties using annotations. I am getting confused because the documentation is too large, and many annotations. providing a simple list of annotations and their usage with simple example will be a great help.
Upvotes: 0
Views: 1082
Reputation: 597
Iam doing sample project on Spring 3.1. I have used some annotations to create beans.Below are the annotations i have used. @Component - Annotation used to create a bean given by Spring @Resource,@Bean JSR Annotations: @Controller,@Repository, @Service
If you are annotating your class with above annotations Spring Container will create beans for you.
Your properties will be set with help of @Autowired annotation.
Upvotes: 1