初识spring boot maven管理--配置文件(二)

2014-11-23 23:19:25 · 作者: · 浏览: 1




再配置spring mvc:









class="org.springframework.web.servlet.i18n.CookieLocaleResolver">




class="org.springframework.web.multipart.commons.CommonsMultipartResolver">





class="org.springframework.web.servlet.view.InternalResourceViewResolver">

jsp">

最后需要配置web.xml


xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
MyMVC

index.jsp




contextConfigLocation
classpath:applicationContext.xml


log4jConfigLocation
classpath:log4j.properties





m vc
org.springframework.web.servlet.DispatcherServlet

contextConfigLocation
classpath:mvc.xml

true
1


mvc
*.mvc


org.springframework.web.util.Log4jConfigListener


org.springframework.web.context.ContextLoaderListener