| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:mvc="http://www.springframework.org/schema/mvc"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-4.0.xsd
- http://www.springframework.org/schema/mvc
- http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
- <!-- scan the package and the sub package -->
- <context:component-scan base-package="com.redhat.crowdfunding.controller"/>
- <!-- don't handle the static resource -->
- <mvc:default-servlet-handler/>
- <mvc:resources mapping="/js/**" location="/static/js/"/>
- <mvc:resources mapping="/css/**" location="/static/css/"/>
- <mvc:resources mapping="/dist/**" location="/static/dist/"/>
- <!-- 配置驱动 -->
- <mvc:annotation-driven>
- <mvc:message-converters>
- <bean class="org.springframework.http.converter.StringHttpMessageConverter">
- <property name="supportedMediaTypes">
- <list>
- <value>text/plain;charset=UTF-8</value>
- <value>text/html;charset=UTF-8</value>
- <value>application/json;charset=UTF-8</value>
- </list>
- </property>
- </bean>
- </mvc:message-converters>
- </mvc:annotation-driven>
- <!-- 配置视图 -->
- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" id="internalResourceViewResolver">
- <!-- 前缀 -->
- <property name="prefix" value="/WEB-INF/jsp/"/>
- <!-- 后缀 -->
- <property name="suffix" value=".jsp"/>
- </bean>
- </beans>
|