在Spring+Struts+Hibernate中,有时需要使用到Spring上下文.项目启动时,会自动根据applicationContext配置文件初始化上下文,可以使用ApplicationContextAware接口去获得Spring上下文.创建以下的类: package com.school.tool; import org.springframework.beans.BeansException; import org.springframework.context.Applicat…