| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?xml version="1.0" encoding="UTF-8"?>
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
- <mvc:annotation-driven>
- <!-- 解决Controller返回String时中文乱码的问题 -->
- <mvc:message-converters>
- <bean class="org.springframework.http.converter.StringHttpMessageConverter">
- <!-- 不可为text/plain -->
- <property name="supportedMediaTypes" value="text/html;charset=UTF-8" />
- </bean>
- </mvc:message-converters>
- </mvc:annotation-driven>
- <mvc:default-servlet-handler />
- <mvc:resources mapping="/static/**" location="/resources/" />
- <context:component-scan base-package="com.uas.report" />
- <bean id="multipartResolver"
- class="org.springframework.web.multipart.commons.CommonsMultipartResolver" />
- <bean
- class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="prefix" value="/WEB-INF/views/" />
- <property name="suffix" value=".html" />
- <property name="contentType" value="text/html;charset=UTF-8" />
- </bean>
- <mvc:view-controller path="/" view-name="index" />
- <mvc:view-controller path="/console" view-name="console" />
- <mvc:view-controller path="/fileUpload" view-name="fileUpload" />
- <mvc:view-controller path="/preview" view-name="preview" />
- <mvc:view-controller path="/files" view-name="files" />
- </beans>
|