提交 | 用户 | 时间
|
58d006
|
1 |
package com.mandi.common; |
A |
2 |
|
|
3 |
|
|
4 |
import org.springframework.beans.BeansException; |
|
5 |
import org.springframework.context.ApplicationContext; |
|
6 |
import org.springframework.context.ApplicationContextAware; |
|
7 |
import org.springframework.stereotype.Service; |
|
8 |
|
|
9 |
/** |
|
10 |
* @author mengly |
|
11 |
* @version 创建时间:2016年3月3日 下午12:32:14 |
|
12 |
* 类说明 |
|
13 |
*/ |
|
14 |
@Service |
|
15 |
public class SpringContext implements ApplicationContextAware { |
|
16 |
private static ApplicationContext ctx=null; |
|
17 |
public static ApplicationContext getAppContext() |
|
18 |
{ |
|
19 |
return SpringContext.ctx; |
|
20 |
} |
|
21 |
@Override |
|
22 |
public void setApplicationContext(ApplicationContext arg0) |
|
23 |
throws BeansException { |
|
24 |
System.out.println("#%#$#%#%#%#%#%#%#%#%#%#%#%%%%%%%%%%%%%%%%%%%%"+arg0); |
|
25 |
SpringContext.ctx=arg0; |
|
26 |
} |
|
27 |
} |