0% found this document useful (0 votes)
23 views1 page

Spring Servlet

The document defines the configuration for an internationalized Spring MVC application. It sets up a component scan for the application packages, configures a message source for internationalized messages, and defines a locale change interceptor to support internationalization.

Uploaded by

TRicKyyy GamER
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views1 page

Spring Servlet

The document defines the configuration for an internationalized Spring MVC application. It sets up a component scan for the application packages, configures a message source for internationalized messages, and defines a locale change interceptor to support internationalization.

Uploaded by

TRicKyyy GamER
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

<?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">
<context:component-scan base-package="com.cts"/>
<bean id="messageSource"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basename" value="/WEB-INF/ResourceBundle/login" />
</bean>

<!-- Locale(Language) Change Interceptor to achieve internationalization. -->


<mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/user_i18n" />
<bean
class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
<property name="paramName" value="lang"></property>
</bean>
</mvc:interceptor>
</mvc:interceptors>

</beans>

You might also like