This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Spring and the fly likes clarity required on spring annotations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "clarity required on spring annotations" Watch "clarity required on spring annotations" New topic
Author

clarity required on spring annotations

Paranidharan Selvaraj
Greenhorn

Joined: Mar 19, 2010
Posts: 17
We have a web application developed using sturts-springs framework.. We are now trying to annotate the classes by which we are avoiding extended application context xml configuration. My issue is how to use annotations for passing a list of property values.

ApplicationContext.xml

<bean name="/showAdminInbox" class="com.web.inbox.ShowAdminInboxAction">
<property name="inboxService" ref="inboxService" />
<property name="requiredPermissions">
<list>
<value>CR_PerformRating</value>
<value>CR_ApproveRating</value>
<value>CR_RerouteFinalApprover</value>
</list>
</property>
</bean>

Impl using Annotations:

@Component("/showAdminInbox")
public class ShowAdminInboxAction extends ApplicationAction{

@Autowired @Qualifier("inboxService")
private InboxService inboxService;

@Autowired @Qualifier("requiredPermissions");
// how to pass the list of values that is provided in xml file

}



how do i pass the collection values using annotations?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: clarity required on spring annotations