HandlerTest.java 文件源码

java
阅读 70 收藏 0 点赞 0 评论 0

项目:gwt-sl 作者:
@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    ServletContext servletContext = new MockServletContext(
            new FileSystemResourceLoader());
    requestService = new MockHttpServletRequest("PUT", "/service");
    applicationContext = new XmlWebApplicationContext();
    applicationContext.setServletContext(servletContext);
    applicationContext.setConfigLocations(new String[] {
            "src/main/webapp/WEB-INF/handler-servlet.xml",
            "src/main/webapp/WEB-INF/applicationContext.xml" });
    try{
    applicationContext.refresh();
    }
    catch (Throwable e){
        e.printStackTrace();
    }
    handler = (GWTHandler) applicationContext.getBean("urlMapping", GWTHandler.class);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号