Class ActionFactoryBeanForSpring<T>
java.lang.Object
com.iohao.net.extension.spring.ActionFactoryBeanForSpring<T>
- All Implemented Interfaces:
ActionFactoryBean<T>, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
public class ActionFactoryBeanForSpring<T>
extends Object
implements ActionFactoryBean<T>, org.springframework.context.ApplicationContextAware
Spring-backed
ActionFactoryBean implementation that resolves action controllers from the
ApplicationContext and enables the framework's component-based injection integration.- Author:
- 渔民小镇
- date:
- 2022-03-22
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBean(ActionCommand actionCommand) Get or create the action controller instance for the given action command.Get or create an action controller instance by class.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)
-
Constructor Details
-
ActionFactoryBeanForSpring
public ActionFactoryBeanForSpring()
-
-
Method Details
-
getBean
Description copied from interface:ActionFactoryBeanGet or create the action controller instance for the given action command.- Specified by:
getBeanin interfaceActionFactoryBean<T>- Parameters:
actionCommand- the action command describing the target controller- Returns:
- the action controller instance
-
getBean
Description copied from interface:ActionFactoryBeanGet or create an action controller instance by class. Returns null by default.- Specified by:
getBeanin interfaceActionFactoryBean<T>- Parameters:
actionControllerClazz- the action controller class- Returns:
- the action controller instance, or null if not supported
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-