Spring Boot實戰(四)Spring MVC基礎 4.6 Spring MVC的測試

爲了測試Web項目通常不需要啓動項目,我們需要一些Servlet相關的模擬對象,比如:MockMVC、MockHttpServletRequest、MockHttpServletResponse、MockHttpSession等。 在Spring裏,我們使用@WebAppConfiguration指定加載的ApplicationContext是一個WebApplicationContext是一個W
相關文章
相關標籤/搜索