속성 파일의 요청에 따라 특정 값을 얻고 싶습니다. 어떻게해야합니까? 속성은 콩에 Properties를 주입런타임에 속성 파일의 가치를 읽음
<bean id="Prop" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>classpath:ErrorMessage.properties</value>
</property>
</bean>
<bean id="PropertiesBean" class="com.util.PropertiesUtil">
<property name="Exprops" value="${EXampleExceptiion}"></property>
</bean>
PropertyPlaceholderConfigurer는 어떻게 든 정적 인 응용 프로그램을 구성하기위한 것일뿐입니다. 당신이 신청할 수 있습니다. – Ralph
직접 구현해야 할 것 같습니다. 제가 아는 한 그것에 대한 구체적인 지원은 없습니다. –
@ Ralph, @ Benjamin..can 어느 곳에서나 PropertyPlaceholderConfigurer에서 읽은 파일을 런타임에 값을 설정하는 데 사용할 수있는 곳을 제공합니다. – Vish