博客
关于我
spring集成web
阅读量:101 次
发布时间:2019-02-26

本文共 547 字,大约阅读时间需要 1 分钟。

spring集成web

①在web.xml中配置ContextLoaderListener监听器(导入spring-web坐标)

org.springframework
spring-web
5.3.1
contextConfigLocation
classpath:appliactionContext.xml
org.springframework.web.context.ContextLoaderListener

②使用WebApplicationContextUtils获得应用上下文对象ApplicationContext

ServletContext servletContext = this.getServletContext();WebApplicationContext app = WebApplicationContextUtils.getWebApplicationContext(servletContext);

 

转载地址:http://aheu.baihongyu.com/

你可能感兴趣的文章
MySQL与Informix数据库中的同义表创建:深入解析与比较
查看>>
mysql与mem_细说 MySQL 之 MEM_ROOT
查看>>
MySQL与Oracle的数据迁移注意事项,另附转换工具链接
查看>>
mysql丢失更新问题
查看>>
MySQL两千万数据优化&迁移
查看>>
MySql中 delimiter 详解
查看>>
MYSQL中 find_in_set() 函数用法详解
查看>>