File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring with Generics Collection

 
deepak carter
Ranch Hand
Posts: 165
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic