This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic