zhuguifei
2026-03-10 2c1fd10c6fbabb8e9f0e9f07fe66fb36c008e883
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package com.shlanbao.tzsc.utils.tools;
 
import org.springframework.context.ApplicationContext;
 
/**
 * 
 * @项目名称     :     RDP【快速开发平台】
 * @类名        :    ApplicationContextHolder
 * @类描述    :    TODO 保存ApplicationContext的单例.
 * @程序员    :    杨波
 * @版本号    :      V1.0 
 * @日期        :    2014-8-16 上午11:06:24
 */
public class ApplicationContextHolder {
    private static ApplicationContextHolder instance = new ApplicationContextHolder();
 
    private ApplicationContext applicationContext;
 
    /**
     * 
     * @方法名    :    getApplicationContext
     * @功能描述    :      TODO 获取Spring上下文
     * @参数        :    @return   
     * @返回类型    :    ApplicationContext   
     * @程序员    :    杨波
     * @日期时间    :    2014-8-16 上午11:06:47
     */
    public ApplicationContext getApplicationContext() {
        return applicationContext;
    }
 
    /**
     * 
     * @方法名    :    setApplicationContext
     * @功能描述    :      TODO 设置Spring 上下文
     * @参数        :    @param applicationContext   
     * @返回类型    :    void   
     * @程序员    :    杨波
     * @日期时间    :    2014-8-16 上午11:07:01
     */
    public void setApplicationContext(ApplicationContext applicationContext) {
        this.applicationContext = applicationContext;
    }
 
    /**
     * 
     * @方法名    :    getInstance
     * @功能描述    :      TODO 获取实例化
     * @参数        :    @return   
     * @返回类型    :    ApplicationContextHolder   
     * @程序员    :    杨波
     * @日期时间    :    2014-8-16 上午11:07:26
     */
    public static ApplicationContextHolder getInstance() {
        return instance;
    }
}