Skip to content

Instantly share code, notes, and snippets.

Created January 30, 2013 11:58
Show Gist options
  • Save anonymous/4672840 to your computer and use it in GitHub Desktop.
Save anonymous/4672840 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:beans="http://www.springframework.org/schema/beans"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<!-- déclaration du handler d'exception -->
<beans:import resource="exception-handling-config.xml" />
<context:property-placeholder location="classpath:exception-messages.properties" />
<!-- scan des annotations -->
<context:component-scan base-package="fr.icdc.dei.desote.presentation" />
<context:component-scan base-package="fr.icdc.dei.fwk.web.validator" />
<!-- Validation en entrée (HDIV + JSR 303 ) -->
<annotation-driven validator="editableValidator">
<!-- Ce bloc message-converters sert a la conversion CSV, a supprimer sinon -->
<message-converters register-defaults="true">
<beans:bean
class="fr.icdc.dei.desote.presentation.commande.view.CsvResponseMessageConverter" />
</message-converters>
</annotation-driven>
<beans:bean id="editableValidator"
class="fr.icdc.dei.fwk.web.validator.HdivEditableParameterValidator" />
<beans:bean id="jsr303ValidatorWrapper"
class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean" />
<!-- Ressources statiques -->
<resources location="/resources/img/" mapping="/resources/img/**" />
<resources location="/resources/css/" mapping="/resources/css/**" />
<resources location="/resources/js/" mapping="/resources/js/**" />
<resources location="/static/wro/" mapping="/static/wro/**" />
<!-- Messages externes -->
<beans:bean id="messageSource"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<beans:property name="basename">
<beans:value>classpath:messages</beans:value>
</beans:property>
<beans:property name="defaultEncoding" value="UTF-8" />
</beans:bean>
<!-- TILES -->
<beans:bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"
p:definitions="/WEB-INF/pages/layout/templates.xml" />
<beans:bean id="tilesViewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver"
p:viewClass="org.springframework.web.servlet.view.tiles2.TilesView">
<beans:property name="order" value="1"></beans:property>
</beans:bean>
<!-- Vue Hybride Html AnglarJS -->
<beans:bean id="htmlViewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix"
value="/WEB-INF/pages/scenes/dref/ouvrage/" />
<beans:property name="suffix" value=".html" />
<beans:property name="order" value="3" />
</beans:bean>
<!-- Vue non tiles (Excel, PDF ..) -->
<beans:bean id="xmlViewResolver"
class="org.springframework.web.servlet.view.XmlViewResolver">
<beans:property name="location">
<beans:value>/WEB-INF/pages/layout/xml-views.xml</beans:value>
</beans:property>
<beans:property name="order" value="2"></beans:property>
</beans:bean>
<!-- Internationnalisation -->
<beans:bean id="localeResolver"
class="org.springframework.web.servlet.i18n.CookieLocaleResolver" />
<interceptors>
<beans:bean id="localeChangeInterceptor"
class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
<beans:property name="paramName" value="lang" />
</beans:bean>
</interceptors>
<!-- Utilisation implémentation de RequestDataValueProcessor de Hdiv -->
<beans:bean id="requestDataValueProcessor"
class="org.hdiv.web.servlet.support.HdivRequestDataValueProcessor">
<beans:property name="linkUrlProcessor" ref="linkUrlProcessor" />
<beans:property name="formUrlProcessor" ref="formUrlProcessor" />
</beans:bean>
<!-- URL PROCESSOR -->
<beans:bean id="linkUrlProcessor" class="org.hdiv.urlProcessor.LinkUrlProcessor">
<beans:property name="config" ref="config" />
</beans:bean>
<beans:bean id="formUrlProcessor" class="org.hdiv.urlProcessor.FormUrlProcessor">
<beans:property name="config" ref="config" />
</beans:bean>
</beans:beans>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment