aspose file tools
The moose likes Spring and the fly likes Spring with Generics Collection Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Reply 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: 159
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: 17234
    
    1

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 - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Spring with Generics Collection
 
Similar Threads
Junit + ContextConfiguration
@Autowired problem
Spring,JUnit, Hibernate and persistence db but not insert
tell me what is this error?
getting same result in AutoWiring byType and byName