앱)java spring application Config xml방식
applicationContext.xml
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>file:${home.dir}/applicationConfig${server.type}.xml</value>
</list>
</property>
</bean>
<bean id="CommConfig" class="util.CommConfig">
<property name="keytest" value=${keytest}" />
<property name="keytest" value=${keytest}" />
<property name="keytest" value=${keytest}" />
<property name="keytest" value=${keytest}" />
<property name="keytest" value=${keytest}" />
<property name="keytest" value=${keytest}" />
</bean>
applicationConfig{DEV/STG/PRD}.xml
<?xml version="1.0" encoding="UTF-8"?>
<properties>
<comment> sample</comment>
<entry key="keytest">keyvalue</entry>
<entry key="keytest">keyvalue</entry>
<entry key="keytest">keyvalue</entry>
<entry key="keytest">keyvalue</entry>
<entry key="keytest">keyvalue</entry>
</properties>
CommConfig.java
public class CommConfig{
private static String keytest;
private static String keytest;
private static String keytest;
private static String keytest;
private static String keytest;
private static String keytest;
private static String keytest;
private static String keytest;
}
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>file:${home.dir}/applicationConfig${server.type}.xml</value>
</list>
</property>
</bean>
<bean id="CommConfig" class="util.CommConfig">
<property name="keytest" value=${keytest}" />
<property name="keytest" value=${keytest}" />
<property name="keytest" value=${keytest}" />
<property name="keytest" value=${keytest}" />
<property name="keytest" value=${keytest}" />
<property name="keytest" value=${keytest}" />
</bean>
applicationConfig{DEV/STG/PRD}.xml
<?xml version="1.0" encoding="UTF-8"?>
<properties>
<comment> sample</comment>
<entry key="keytest">keyvalue</entry>
<entry key="keytest">keyvalue</entry>
<entry key="keytest">keyvalue</entry>
<entry key="keytest">keyvalue</entry>
<entry key="keytest">keyvalue</entry>
</properties>
CommConfig.java
public class CommConfig{
private static String keytest;
private static String keytest;
private static String keytest;
private static String keytest;
private static String keytest;
private static String keytest;
private static String keytest;
private static String keytest;
}
'백엔드개발 > 자바스프링' 카테고리의 다른 글
앱)java spring에서 web page간의 연동처리 (0) | 2018.11.14 |
---|---|
앱)java spring application config properties 방식 (0) | 2018.11.14 |
앱)대량호출 방어로직 및 checkusersession (0) | 2018.11.14 |
앱)mybatis resultMap과 resultType 차이 (0) | 2018.11.14 |
앱)select box 선택시에 팝업이 뜨는 로직정리 (0) | 2018.11.14 |