在J2EE的web应用里面配置spring非常简单,最简单的只需要把spring得ContextLoaderListener添加到你的web.xml文件里面就可以了,示例如下: org.springframework.web.context.ContextLoaderListener