ch.tatool.app.util
Class ContextUtils
java.lang.Object
ch.tatool.app.util.ContextUtils
- All Implemented Interfaces:
- org.springframework.context.ApplicationContextAware
public class ContextUtils
- extends Object
- implements org.springframework.context.ApplicationContextAware
Bean utilities - hides some Spring internal code.
- Author:
- Michael Ruflin
|
Method Summary |
static org.springframework.beans.factory.BeanFactory |
createBeanFactory(String classpath,
Properties properties)
Create a new BeanFactory using the main ApplicationContext as parent. |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Implementation of interface ApplicationContextAware
Provides a reference to the ApplicationContext object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContextUtils
public ContextUtils()
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
- Implementation of interface ApplicationContextAware
Provides a reference to the ApplicationContext object.
- Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
createBeanFactory
public static org.springframework.beans.factory.BeanFactory createBeanFactory(String classpath,
Properties properties)
- Create a new BeanFactory using the main ApplicationContext as parent.
- Parameters:
classpath - the path to the bean definition file in the classpathproperties - set of properties that should be replaced in the definitions
- Returns:
- a BeanFactory instance
Copyright © 2012. All Rights Reserved.