Created
May 4, 2013 13:06
-
-
Save jhiemer/5517467 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns:mvc="http://www.springframework.org/schema/mvc" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns="http://www.springframework.org/schema/beans" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd | |
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> | |
<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure --> | |
<!-- Enables the Spring MVC @Controller programming model --> | |
<mvc:annotation-driven /> | |
<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory --> | |
<mvc:resources mapping="/resources/**" location="/resources/" /> | |
<mvc:resources mapping="/home/css/**" location="/WEB-INF/views/css/" /> | |
<mvc:resources mapping="/home/libs/**" location="/WEB-INF/views/libs/" /> | |
<mvc:resources mapping="/home/js/**" location="/WEB-INF/views/js/" /> | |
<mvc:resources mapping="/home/partials/**" location="/WEB-INF/views/partials/" /> | |
<mvc:resources mapping="/home/img/**" location="/WEB-INF/views/img/" /> | |
<!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory --> | |
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> | |
<property name="prefix" value="/WEB-INF/views/" /> | |
<property name="suffix" value=".jsp" /> | |
</bean> | |
<context:component-scan base-package="de.cloudscale.web" /> | |
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> | |
<property name="basenames" value="/WEB-INF/messages/messages,/WEB-INF/classes/messages/ValidationMessages" /> | |
<property name="cacheSeconds" value="0" /> | |
<property name="fallbackToSystemLocale" value="false" /> | |
</bean> | |
<mvc:interceptors> | |
<!-- Changes the locale when a 'locale' request parameter is sent; e.g. /?locale=de --> | |
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"> | |
<property name="paramName" value="locale" /> | |
</bean> | |
</mvc:interceptors> | |
<!-- Saves a locale change using a cookie --> | |
<bean id="localeResolver" class="de.cloudscale.web.utils.BaseCookieLocaleResolver"> | |
<property name="supportedLocales" value="en_GB,de_DE" /> | |
<property name="defaultLocale" value="en_GB" /> | |
</bean> | |
<!-- File upload handler --> | |
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> | |
<!-- one of the properties available; the maximum file size in bytes --> | |
<property name="maxUploadSize" value="25000000"/> | |
</bean> | |
</beans> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment