|
@ -7,11 +7,15 @@ import org.springframework.context.ApplicationContextAware;
|
7
|
7
|
public class BeanHolder implements ApplicationContextAware{
|
8
|
8
|
private static ApplicationContext context;
|
9
|
9
|
|
|
10
|
private static void setContext(ApplicationContext context) {
|
|
11
|
BeanHolder.context = context;
|
|
12
|
}
|
|
13
|
|
10
|
14
|
@Override
|
11
|
15
|
public void setApplicationContext(ApplicationContext applicationContext)
|
12
|
16
|
throws BeansException {
|
13
|
17
|
// TODO Auto-generated method stub
|
14
|
|
BeanHolder.context = applicationContext;
|
|
18
|
setContext(applicationContext);
|
15
|
19
|
}
|
16
|
20
|
|
17
|
21
|
public static Object getBean(String name) {
|