Retrieve bean from parent bean factory if not found, as per http://forum.springframework.org/viewtopic.php?t=3005.

This commit is contained in:
Ben Alex 2005-01-19 21:21:07 +00:00
parent 7e234869a5
commit cc669f4e35
1 changed files with 4 additions and 1 deletions

View File

@ -15,6 +15,8 @@
package net.sf.acegisecurity.util;
import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.context.ApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
@ -167,7 +169,8 @@ public class FilterToBeanProxy implements Filter {
+ " not found in classloader");
}
Map beans = ctx.getBeansOfType(targetClass, true, true);
Map beans = BeanFactoryUtils.beansOfTypeIncludingAncestors(ctx,
targetClass, true, true);
if (beans.size() == 0) {
throw new ServletException(