프로퍼티서비스 문의
일반 bean 클래스에서 프로퍼티 서비스를 사용하려고 하는데
템플릿에 제시되어 있는대로 설정해서 해 보는데 아래 부분에서
nullpoint Excepion이 발생합니다.
--------------------------------------------------------------------------------------
// 프로퍼티 서비스를 위한 설정
ClassPathXmlApplicationContext context = null;
IPropertiesService propertyiesService = (IPropertiesService) context.getBean("propertiesService");
serverip = propertyiesService.getString("SOCKET_IP1");
portno = propertyiesService.getString("PORT_NO1");
--------------------------------------------------------------------------------------
* context-properties.xml 설정은 아래와 같음.
--------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.anyframejava.org/schema/service
http://www.anyframejava.org/schema/service/anyframe-core-service-2.0.xsd">
--------------------------------------------------------------------------------------
또 다른 설정이 필요한가요?


다음과 같은 형태로 설정하시기 바랍니다.
<?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:config="http://www.anyframejava.org/schema/service"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.anyframejava.org/schema/service
http://www.anyframejava.org/schema/service/anyframe-core-service-2.0.xsd">
<bean name="propertiesService" class="anyframe.core.properties.impl.PropertiesServiceImpl">
<config:configuration>
<properties>
<element key="PAGE_SIZE" value="3"/>
<element key="PAGE_UNIT" value="10"/>
</properties>
</config:configuration>
</bean>
</b