Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring with Generics Collection

 
deepak carter
Ranch Hand
Posts: 165
  • 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: 17278
6
IntelliJ IDE Mac Spring
  • 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
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic