Skip to content

Instantly share code, notes, and snippets.

@skeller1
Created September 14, 2011 07:37
Show Gist options
  • Save skeller1/1216043 to your computer and use it in GitHub Desktop.
Save skeller1/1216043 to your computer and use it in GitHub Desktop.
xml spring config file
<?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:p="http://www.springframework.org/schema/p"
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.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven />
<mvc:view-controller path="/index.html" />
<bean id="tilesConfigurer"
class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"
p:definitions="/WEB-INF/tiles-defs/templates.xml" />
<bean id="tilesViewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver"
p:viewClass="org.springbyexample.web.servlet.view.tiles2.DynamicTilesView"
p:prefix="/WEB-INF/jsp/"
p:suffix=".jsp" />
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"
p:basenames="messages" />
<!-- Declare the Interceptor -->
<mvc:interceptors>
<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"
p:paramName="locale" />
</mvc:interceptors>
<!-- Declare the Resolver -->
<bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver" />
</beans>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment