@Override public void setBeanFactory(BeanFactory beanFactory) { if (beanFactory instanceof ConfigurableListableBeanFactory) { ((ConfigurableListableBeanFactory) beanFactory).ignoreDependencyType(MetaClass.class); } }
@Override public void setBeanFactory(BeanFactory beanFactory) { if (beanFactory instanceof ConfigurableListableBeanFactory) { ((ConfigurableListableBeanFactory) beanFactory).ignoreDependencyType(MetaClass.class); } }
@Override public void afterPropertiesSet() throws Exception { if (this.beanFactory != null && this.beanFactory instanceof ConfigurableListableBeanFactory) { ((ConfigurableListableBeanFactory) this.beanFactory).ignoreDependencyType(MetaClass.class); } CompilerConfiguration compilerConfig = this.compilerConfiguration; if (compilerConfig == null && this.compileStatic) { compilerConfig = new CompilerConfiguration(); compilerConfig.addCompilationCustomizers(new ASTTransformationCustomizer(CompileStatic.class)); } this.groovyClassLoader = new GroovyClassLoader(this.beanClassLoader, compilerConfig); }
@Override public void setBeanFactory(BeanFactory beanFactory) { if (beanFactory instanceof ConfigurableListableBeanFactory) { ((ConfigurableListableBeanFactory) beanFactory).ignoreDependencyType(MetaClass.class); } }
/** * Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext, * falling back to the root WebApplicationContext. This context is supposed * to contain the service layer beans to wire the Struts Actions with. * @param actionServlet the associated ActionServlet * @param moduleConfig the associated ModuleConfig * @return the WebApplicationContext * @throws IllegalStateException if no WebApplicationContext could be found * @see DelegatingActionUtils#findRequiredWebApplicationContext * @see ContextLoaderPlugIn#SERVLET_CONTEXT_PREFIX */ protected WebApplicationContext initWebApplicationContext( ActionServlet actionServlet, ModuleConfig moduleConfig) throws IllegalStateException { WebApplicationContext wac = DelegatingActionUtils.findRequiredWebApplicationContext(actionServlet, moduleConfig); if (wac instanceof ConfigurableApplicationContext) { ((ConfigurableApplicationContext) wac).getBeanFactory().ignoreDependencyType(ActionServlet.class); } return wac; }
/** * Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext, * falling back to the root WebApplicationContext. This context is supposed * to contain the service layer beans to wire the Struts Actions with. * @param actionServlet the associated ActionServlet * @param moduleConfig the associated ModuleConfig * @return the WebApplicationContext * @throws IllegalStateException if no WebApplicationContext could be found * @see DelegatingActionUtils#findRequiredWebApplicationContext * @see ContextLoaderPlugIn#SERVLET_CONTEXT_PREFIX */ protected WebApplicationContext initWebApplicationContext( ActionServlet actionServlet, ModuleConfig moduleConfig) throws IllegalStateException { WebApplicationContext wac = DelegatingActionUtils.findRequiredWebApplicationContext(actionServlet, moduleConfig); if (wac instanceof ConfigurableApplicationContext) { ((ConfigurableApplicationContext) wac).getBeanFactory().ignoreDependencyType(ActionServlet.class); } return wac; }
/** * Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext, * falling back to the root WebApplicationContext. This context is supposed * to contain the service layer beans to wire the Struts Actions with. * @param actionServlet the associated ActionServlet * @param moduleConfig the associated ModuleConfig * @return the WebApplicationContext * @throws IllegalStateException if no WebApplicationContext could be found * @see DelegatingActionUtils#findRequiredWebApplicationContext * @see ContextLoaderPlugIn#SERVLET_CONTEXT_PREFIX */ protected WebApplicationContext initWebApplicationContext( ActionServlet actionServlet, ModuleConfig moduleConfig) throws IllegalStateException { WebApplicationContext wac = DelegatingActionUtils.findRequiredWebApplicationContext(actionServlet, moduleConfig); if (wac instanceof ConfigurableApplicationContext) { ((ConfigurableApplicationContext) wac).getBeanFactory().ignoreDependencyType(ActionServlet.class); } return wac; }
/** * Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext, * falling back to the root WebApplicationContext. This context is supposed * to contain the service layer beans to wire the Struts Actions with. * @param actionServlet the associated ActionServlet * @param moduleConfig the associated ModuleConfig * @return the WebApplicationContext * @throws IllegalStateException if no WebApplicationContext could be found * @see DelegatingActionUtils#findRequiredWebApplicationContext * @see ContextLoaderPlugIn#SERVLET_CONTEXT_PREFIX */ protected WebApplicationContext initWebApplicationContext( ActionServlet actionServlet, ModuleConfig moduleConfig) throws IllegalStateException { WebApplicationContext wac = DelegatingActionUtils.findRequiredWebApplicationContext(actionServlet, moduleConfig); if (wac instanceof ConfigurableApplicationContext) { ((ConfigurableApplicationContext) wac).getBeanFactory().ignoreDependencyType(ActionServlet.class); } return wac; }
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) { beanFactory.addBeanPostProcessor(new ActionServletAwareProcessor(getActionServlet())); beanFactory.ignoreDependencyType(ActionServlet.class); } }
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) { beanFactory.addBeanPostProcessor(new ActionServletAwareProcessor(getActionServlet())); beanFactory.ignoreDependencyType(ActionServlet.class); } }
@Override public void afterPropertiesSet() throws Exception { if (this.beanFactory != null && this.beanFactory instanceof ConfigurableListableBeanFactory) { ((ConfigurableListableBeanFactory) this.beanFactory).ignoreDependencyType(MetaClass.class); } CompilerConfiguration compilerConfig = this.compilerConfiguration; if (compilerConfig == null && this.compileStatic) { compilerConfig = new CompilerConfiguration(); compilerConfig.addCompilationCustomizers(new ASTTransformationCustomizer(CompileStatic.class)); } this.groovyClassLoader = new GroovyClassLoader(this.beanClassLoader, compilerConfig); }