• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sharing bean(s) between applicationContext-security.xml and dispatcher-servlet.xml **SOLVED**

 
Edward Winchester
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EDIT: This is solved but any other ideas are more than welcome

Hello,

I'm incorporating Spring Security into my application. My web.xml contains another contextConfigLocation called /WEB-INF/applicationContext-security.xml.

I have an existing xml configuration for my dispatcher servlet: dispatcher-servlet.xml. This includes configuration for a few DAO service beans.

The "issue" is that some beans defined in the security configuration need to be injected with DAO/service beans.

This is where my knowledge of these bean containers and contexts gets sketchy so I ask what is the best way to do this?

Thanks,

Ed

N.B. Also posted at springsource.org but didn't get a reply.
 
Edward Winchester
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have discovered the import tag:



Even though I will have two instances of the common beans, this fits my requirements (for now!).

Thanks,

Ed
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic