It's not a secret anymore!
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
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring with Generics Collection" Watch "Spring with Generics Collection" New topic

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

Joined: Feb 05, 2001
Posts: 17276

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.


Why would you expect otherwise?


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Spring with Generics Collection
It's not a secret anymore!