This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Spring and the fly likes Spring with Generics Collection 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 this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring with Generics Collection" Watch "Spring with Generics Collection" New topic
Author

Spring with Generics Collection

deepak carter
Ranch Hand

Joined: Feb 19, 2011
Posts: 165
Hi All,

I have written a small program for list using spring framework.This is what i have written

Context file



two files are there for address setting





and my MAIN CLASS..



However its throwing an error


Can anyone help me in this regard
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17276
    
    6

Yes, you are trying to add two Strings to a Collection that only takes Address objects. This would throw an exception in Java without Spring.

<value>someString</value>

Why would you expect otherwise?

Mark


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring with Generics Collection
 
jQuery in Action, 3rd edition