317.2. Camel 스키마 추가

Camel 1.x의 경우 다음 네임스페이스를 사용해야 합니다.

http://activemq.apache.org/camel/schema/spring

다음 스키마 위치:

http://activemq.apache.org/camel/schema/spring/camel-spring.xsd

스키마Location 선언에 Camel을 추가해야 합니다.

http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd

XML 파일은 다음과 같습니다.

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
          http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
          http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">

317.2.1. camel: 네임스페이스 사용

또는 XML 선언에서 제공되는 XSD를 참조할 수 있습니다.

xmlns:camel="http://camel.apache.org/schema/spring"
  1. 선언은 다음과 같습니다.
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:camel="http://camel.apache.org/schema/spring"
       xsi:schemaLocation="
          http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
          http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
  1. 그런 다음 camel: namespace 접두사를 사용한 후 인라인 네임스페이스 선언을 생략할 수 있습니다.
<camel:camelContext id="camel5">
  <camel:package>org.apache.camel.spring.example</camel:package>
</camel:camelContext>