Package org.zkoss.spring
Class SpringUtil
java.lang.Object
org.zkoss.spring.SpringUtil
SpringUtil, a Spring utility.
- Since:
- 1.0
- Author:
- henrichen
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SpringUtil
public SpringUtil()
-
-
Method Details
-
getApplicationContext
public static org.springframework.context.ApplicationContext getApplicationContext()Get the current spring application context.- Returns:
- the current application context
- Throws:
org.zkoss.zk.ui.UiException- when not in an active zk execution
-
getBean
Get the spring bean by the specified name.- Parameters:
name- the bean name- Returns:
- the bean found in the current spring application context or null if no bean was found under the name
- See Also:
-
BeanFactory.getBean(java.lang.String)
-
getBean
Get the spring bean by the specified name and class.- Parameters:
name- the bean namecls- the bean class- Returns:
- the bean found in the current spring application context or null if no bean was found under the name
- See Also:
-
BeanFactory.getBean(java.lang.String, java.lang.Class)
-