262.9. Spring XML에서 구성


Spring XML은 두 가지 변형을 제공합니다. Spring 빈을 Java DSL에서 수행되는 방식과 유사한 PropertiesComponent 로 정의할 수 있습니다. 또는 < propertyPlaceholder> 태그를 사용할 수 있습니다.

<bean id="properties" class="org.apache.camel.component.properties.PropertiesComponent">
    <property name="location" value="classpath:com/mycompany/myprop.properties"/>
</bean>

< propertyPlaceholder > 태그를 사용하면 다음과 같이 구성이 약간 더 새로 생성됩니다.

<camelContext ...>
   <propertyPlaceholder id="properties" location="com/mycompany/myprop.properties"/>
</camelContext>

위치 태그를 통해 속성 위치를 설정하면 잘 작동하지만, Camel 2.19.0 에서 시작하고 전용 propertiesLocation으로 속성 위치를 설정할 수 있는 많은 리소스가 있습니다.

<camelContext ...>
  <propertyPlaceholder id="myPropertyPlaceholder">
    <propertiesLocation
      resolver = "classpath"
      path     = "com/my/company/something/my-properties-1.properties"
      optional = "false"/>
    <propertiesLocation
      resolver = "classpath"
      path     = "com/my/company/something/my-properties-2.properties"
      optional = "false"/>
    <propertiesLocation
      resolver = "file"
      path     = "${karaf.home}/etc/my-override.properties"
      optional = "true"/>
   </propertyPlaceholder>
</camelContext>
작은 정보

XML
Camel 2.10 이후 내에서 cache 옵션
을 지정하면 Spring XML뿐만 아니라 Spring XML 내에서 캐시 옵션의 값을 지정할 수 있습니다.

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동