- 博客(4)
- 资源 (4)
- 收藏
- 关注
原创 spring mvc 配置多个dispatcherservlet
在spring mvc中,可以配置多个转发器,只需要改变加载权重,如: doWeb org.springframework.web.servlet.DispatcherServlet 1 poWeb org.springframework.web.servlet.DispatcherServlet 2
2016-01-13 10:20:00
1770
原创 关于struts2配置文件不放在默认位置
当我们想把struts.xml放在非src目录下时,需要在web.xml文件中配置struts2过滤器注入值config,比如把配置文件放在com.luo.config包下,配置如下 struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
2015-11-16 16:18:45
417
原创 获取spring管理的bean
ServletContext servletContext = this.getServletContext();WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(servletContext);bean实例名 = (bean所属类) ctx.getBean("【bean的名称】"
2014-12-03 15:34:14
433
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人