• Post Reply Bookmark Topic Watch Topic
  • New Topic

method call in spring-config.xml file  RSS feed

 
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: 17309
11
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!