Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

method call in spring-config.xml file

 
Mathew Lee
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In spring-config.xml can we call a method on the dao say ProductDAO (which return a list) to use that same list iin other bean id definition within same spring-config.xml. ANy suggestions, ideas, sample code, resources, links highly appreciated. Thanks in advance.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Matt Li wrote:Hi,

In spring-config.xml can we call a method on the dao say ProductDAO (which return a list) to use that same list iin other bean id definition within same spring-config.xml. ANy suggestions, ideas, sample code, resources, links highly appreciated. Thanks in advance.


In Spring 3.x there is the Spring Expression Language SPel, which does that.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic