123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <?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:context="http://www.springframework.org/schema/context"
- xmlns:task="http://www.springframework.org/schema/task"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xmlns:mvc="http://www.springframework.org/schema/mvc"
- xmlns:util="http://www.springframework.org/schema/util"
- 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/tx http://www.springframework.org/schema/tx/spring-tx.xsd
- http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
- http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
- http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
-
- <context:component-scan base-package="com.dbs.mplus" />
-
- <!-- 정적 환경설정 -->
- <!-- <util:properties id="mplusConfig" location="WEB-INF/config/env-local-${spring.profiles.active}.xml" /> -->
-
- <!-- 정적 환경설정 : 단독으로 실험하고 싶을 때 -->
- <util:properties id="mplusConfig" location="WEB-INF/config/env-local.xml" />
- <context:property-placeholder properties-ref="mplusConfig"/>
-
- <tx:annotation-driven transaction-manager="mplusTransactionManager" />
- <bean id="mplusTransactionManager"
- class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="mplusDataSource" />
- </bean>
-
- <bean id="mpNamedParameterJdbcTemplate"
- class="org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate">
- <constructor-arg>
- <ref bean="mplusDataSource" />
- </constructor-arg>
- </bean>
- <!-- M-Care 서비스용 데이터 소스 -->
- <bean id="mplusDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
- <property name="driverClassName" value="#{mplusConfig['mplus.db.driverClassName']}" />
- <property name="url" value="#{mplusConfig['mplus.db.url']}" />
- <property name="username" value="#{mplusConfig['mplus.db.username']}" />
- <property name="password" value="#{mplusConfig['mplus.db.password']}" />
- <property name="validationQuery" value="select 1" />
- <property name="testWhileIdle" value="true" />
- </bean>
-
- <!-- M-Care 서비스를 위한 중간 테이블에 접근하기 위한 데이터 소스 -->
- <bean id="mplusExtDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
- <property name="driverClassName" value="#{mplusConfig['mplus.ext.db.driverClassName']}" />
- <property name="url" value="#{mplusConfig['mplus.ext.db.url']}" />
- <property name="username" value="#{mplusConfig['mplus.ext.db.username']}" />
- <property name="password" value="#{mplusConfig['mplus.ext.db.password']}" />
- </bean>
-
- <bean id="messageSource"
- class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
- <property name="basenames">
- <list>
- <value>WEB-INF/messages/message</value>
- <value>WEB-INF/messages/version</value>
- </list>
- </property>
- <property name="defaultEncoding" value="UTF-8" />
- <property name="cacheSeconds" value="180" />
- </bean>
-
- <bean id="localeResolver"
- class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
- <property name="cookieName" value="user_locale" />
- <property name="cookieMaxAge" value="31536000" />
- <property name="defaultLocale" value="ko" />
- </bean>
-
- <mvc:interceptors>
- <bean id="localeChangeInterceptor"
- class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
- <property name="paramName" value="_locale" />
- </bean>
- <mvc:interceptor>
- <mvc:mapping path="/**/*.page"/>
- <mvc:mapping path="/**/*.json"/>
- <mvc:mapping path="/**/*.ext"/>
- <!--
- <mvc:exclude-mapping path="/**/login.page"/>
- -->
- <mvc:exclude-mapping path="/**/logout.page"/>
- <mvc:exclude-mapping path="/*/test/*"/>
- <bean class="com.dbs.mplus.interceptor.MPlusAuthenticationInterceptor" />
- </mvc:interceptor>
- </mvc:interceptors>
- <!-- MultipartResolver 설정 -->
- <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
- <property name="maxUploadSize" value="20000000" />
- <property name="maxInMemorySize" value="20000000" />
- </bean>
- <bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
- <property name="order" value="1" />
- <!-- <property name="mediaTypes">
- <map>
- <entry key="page" value="text/html" />
- <entry key="json" value="application/json" />
- <entry key="ext" value="text/html" />
- </map>
- </property> -->
-
- <property name="viewResolvers">
- <list>
- <bean class="org.springframework.web.servlet.view.UrlBasedViewResolver">
- <property name="viewClass"
- value="org.springframework.web.servlet.view.tiles3.TilesView" />
- </bean>
- <bean class="org.springframework.web.servlet.view.BeanNameViewResolver" />
- </list>
- </property>
- <property name="defaultViews">
- <list>
- <ref bean="jsonView" />
- </list>
- </property>
- </bean>
-
- <bean id="tilesConfigurer"
- class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
- <property name="definitions">
- <list>
- <value>/WEB-INF/config/tiles/template.xml</value>
- </list>
- </property>
- </bean>
-
- <bean class="org.springframework.web.servlet.view.BeanNameViewResolver">
- <property name="order" value="0" />
- </bean>
-
- <bean id="download" class="com.dbs.mplus.service.DownloadView" />
- <bean id="jsonView" class="org.springframework.web.servlet.view.json.MappingJackson2JsonView" />
-
- <mvc:annotation-driven>
- <mvc:message-converters>
- <bean class="org.springframework.http.converter.StringHttpMessageConverter">
- <property name="supportedMediaTypes">
- <list>
- <value>text/html;charset=UTF-8</value>
- </list>
- </property>
- </bean>
- <bean class="org.springframework.http.converter.FormHttpMessageConverter">
- <property name="charset">
- <bean class="java.nio.charset.Charset" factory-method="forName">
- <constructor-arg value="UTF-8" />
- </bean>
- </property>
- </bean>
- </mvc:message-converters>
- </mvc:annotation-driven>
-
- <!-- application 확인용 -->
- <bean id="frameworkAppListener" class="com.dbs.mplus.framework.listener.MPlusFrameworkApplicationListener"/>
- <bean id="serviceAppListener" class="com.dbs.mplus.listener.MPlusServiceApplicationListener"/>
- </beans>
|