Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesComponentTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesComponentTest.java?rev=907650&view=auto ============================================================================== --- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesComponentTest.java (added) +++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesComponentTest.java Mon Feb 8 13:17:41 2010 @@ -0,0 +1,64 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.properties; + +import org.apache.camel.spring.SpringTestSupport; +import org.springframework.context.support.AbstractXmlApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +/** + * @version $Revision$ + */ +public class SpringPropertiesComponentTest extends SpringTestSupport { + + @Override + protected AbstractXmlApplicationContext createApplicationContext() { + return new ClassPathXmlApplicationContext("org/apache/camel/component/properties/SpringPropertiesComponentTest.xml"); + } + + public void testSpringPropertiesComponentStart() throws Exception { + getMockEndpoint("mock:result").expectedMessageCount(1); + + template.sendBody("direct:start", "Hello World"); + + assertMockEndpointsSatisfied(); + } + + public void testSpringPropertiesComponentBar() throws Exception { + getMockEndpoint("mock:bar").expectedMessageCount(1); + + template.sendBody("direct:bar", "Hello World"); + + assertMockEndpointsSatisfied(); + } + + public void testSpringPropertiesComponentStart2() throws Exception { + getMockEndpoint("mock:result").expectedMessageCount(1); + + template.sendBody("direct:start2", "Hello World"); + + assertMockEndpointsSatisfied(); + } + + public void testSpringPropertiesComponentBar2() throws Exception { + getMockEndpoint("mock:bar").expectedMessageCount(1); + + template.sendBody("direct:bar2", "Hello World"); + + assertMockEndpointsSatisfied(); + } +}
Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesComponentTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesComponentTest.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolver2Test.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolver2Test.java?rev=907650&view=auto ============================================================================== --- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolver2Test.java (added) +++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolver2Test.java Mon Feb 8 13:17:41 2010 @@ -0,0 +1,32 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.properties; + +import org.springframework.context.support.AbstractXmlApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +/** + * @version $Revision$ + */ +public class SpringPropertiesResolver2Test extends SpringPropertiesResolverTest { + + @Override + protected AbstractXmlApplicationContext createApplicationContext() { + return new ClassPathXmlApplicationContext("org/apache/camel/component/properties/SpringPropertiesResolver2Test.xml"); + } + +} \ No newline at end of file Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolver2Test.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolver2Test.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolver3Test.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolver3Test.java?rev=907650&view=auto ============================================================================== --- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolver3Test.java (added) +++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolver3Test.java Mon Feb 8 13:17:41 2010 @@ -0,0 +1,32 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.properties; + +import org.springframework.context.support.AbstractXmlApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +/** + * @version $Revision$ + */ +public class SpringPropertiesResolver3Test extends SpringPropertiesResolverTest { + + @Override + protected AbstractXmlApplicationContext createApplicationContext() { + return new ClassPathXmlApplicationContext("org/apache/camel/component/properties/SpringPropertiesResolver3Test.xml"); + } + +} \ No newline at end of file Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolver3Test.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolver3Test.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolverTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolverTest.java?rev=907650&view=auto ============================================================================== --- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolverTest.java (added) +++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolverTest.java Mon Feb 8 13:17:41 2010 @@ -0,0 +1,41 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.properties; + +import org.apache.camel.spring.SpringTestSupport; +import org.springframework.context.support.AbstractXmlApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +/** + * @version $Revision$ + */ +public class SpringPropertiesResolverTest extends SpringTestSupport { + + @Override + protected AbstractXmlApplicationContext createApplicationContext() { + return new ClassPathXmlApplicationContext("org/apache/camel/component/properties/SpringPropertiesResolverTest.xml"); + } + + public void testSpringPropertiesResolver() throws Exception { + getMockEndpoint("mock:result").expectedMessageCount(1); + + template.sendBody("direct:start", "Hello World"); + + assertMockEndpointsSatisfied(); + } + +} \ No newline at end of file Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolverTest.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/properties/SpringPropertiesResolverTest.java ------------------------------------------------------------------------------ svn:keywords = Rev Date Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponent2Test.xml URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponent2Test.xml?rev=907650&view=auto ============================================================================== --- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponent2Test.xml (added) +++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponent2Test.xml Mon Feb 8 13:17:41 2010 @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<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-2.5.xsd + http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd + "> + + <propertyPlaceholder id="properties" + location="classpath:org/apache/camel/component/properties/cheese.properties" + xmlns="http://camel.apache.org/schema/spring"/> + + <camelContext xmlns="http://camel.apache.org/schema/spring"> + + <route> + <from uri="direct:start"/> + <to uri="properties:#{cool.end}"/> + </route> + + <route> + <from uri="direct:bar"/> + <to uri="properties:mock:#{cool.bar}"/> + </route> + + <route> + <from uri="direct:start2"/> + <to uri="#{cool.end}"/> + </route> + + <route> + <from uri="direct:bar2"/> + <to uri="mock:#{cool.bar}"/> + </route> + </camelContext> + +</beans> Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponent2Test.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponent2Test.xml ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponent2Test.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponent3Test.xml URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponent3Test.xml?rev=907650&view=auto ============================================================================== --- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponent3Test.xml (added) +++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponent3Test.xml Mon Feb 8 13:17:41 2010 @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<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-2.5.xsd + http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd + "> + + <camelContext xmlns="http://camel.apache.org/schema/spring"> + + <propertyPlaceholder id="properties" + location="classpath:org/apache/camel/component/properties/cheese.properties"/> + + <route> + <from uri="direct:start"/> + <to uri="properties:#{cool.end}"/> + </route> + + <route> + <from uri="direct:bar"/> + <to uri="properties:mock:#{cool.bar}"/> + </route> + + <route> + <from uri="direct:start2"/> + <to uri="#{cool.end}"/> + </route> + + <route> + <from uri="direct:bar2"/> + <to uri="mock:#{cool.bar}"/> + </route> + </camelContext> + +</beans> Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponent3Test.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponent3Test.xml ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponent3Test.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Copied: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponentTest.xml (from r907402, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/log/SpringLogTest-context.xml) URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponentTest.xml?p2=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponentTest.xml&p1=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/log/SpringLogTest-context.xml&r1=907402&r2=907650&rev=907650&view=diff ============================================================================== --- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/log/SpringLogTest-context.xml (original) +++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesComponentTest.xml Mon Feb 8 13:17:41 2010 @@ -22,20 +22,30 @@ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd "> - <bean id="log" class="org.apache.camel.component.log.LogEndpoint"> - <property name="logger" ref="myLogger"/> - </bean> - - <bean id="myLogger" class="org.apache.camel.processor.Logger"> - <property name="level" value="WARN"/> - <property name="logName" value="cool"/> + <bean id="properties" class="org.apache.camel.component.properties.PropertiesComponent"> + <property name="location" value="classpath:org/apache/camel/component/properties/cheese.properties"/> </bean> <camelContext xmlns="http://camel.apache.org/schema/spring"> + <route> <from uri="direct:start"/> - <to ref="log"/> - <to uri="mock:result"/> + <to uri="properties:#{cool.end}"/> + </route> + + <route> + <from uri="direct:bar"/> + <to uri="properties:mock:#{cool.bar}"/> + </route> + + <route> + <from uri="direct:start2"/> + <to uri="#{cool.end}"/> + </route> + + <route> + <from uri="direct:bar2"/> + <to uri="mock:#{cool.bar}"/> </route> </camelContext> Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolver2Test.xml URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolver2Test.xml?rev=907650&view=auto ============================================================================== --- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolver2Test.xml (added) +++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolver2Test.xml Mon Feb 8 13:17:41 2010 @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<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-2.5.xsd + http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd + "> + + <bean id="myResolver" class="org.apache.camel.component.properties.PropertiesResolverTest$MyCustomResolver"/> + + <propertyPlaceholder id="properties" + location="foo" + propertiesResolverRef="myResolver" + xmlns="http://camel.apache.org/schema/spring"/> + + <camelContext xmlns="http://camel.apache.org/schema/spring"> + <route> + <from uri="direct:start"/> + <to uri="properties:#{foo}"/> + </route> + </camelContext> + +</beans> Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolver2Test.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolver2Test.xml ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolver2Test.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolver3Test.xml URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolver3Test.xml?rev=907650&view=auto ============================================================================== --- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolver3Test.xml (added) +++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolver3Test.xml Mon Feb 8 13:17:41 2010 @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<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-2.5.xsd + http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd + "> + + <bean id="myResolver" class="org.apache.camel.component.properties.PropertiesResolverTest$MyCustomResolver"/> + + <camelContext xmlns="http://camel.apache.org/schema/spring"> + <propertyPlaceholder id="properties" location="foo" propertiesResolverRef="myResolver"/> + + <route> + <from uri="direct:start"/> + <to uri="properties:#{foo}"/> + </route> + </camelContext> + +</beans> Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolver3Test.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolver3Test.xml ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolver3Test.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolverTest.xml URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolverTest.xml?rev=907650&view=auto ============================================================================== --- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolverTest.xml (added) +++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolverTest.xml Mon Feb 8 13:17:41 2010 @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<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-2.5.xsd + http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd + "> + + <bean id="myResolver" class="org.apache.camel.component.properties.PropertiesResolverTest$MyCustomResolver"/> + + <bean id="properties" class="org.apache.camel.component.properties.PropertiesComponent"> + <property name="location" value="foo"/> + <property name="propertiesResolver" ref="myResolver"/> + </bean> + + <camelContext xmlns="http://camel.apache.org/schema/spring"> + <route> + <from uri="direct:start"/> + <to uri="properties:#{foo}"/> + </route> + </camelContext> + +</beans> Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolverTest.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolverTest.xml ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/SpringPropertiesResolverTest.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/cheese.properties URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/cheese.properties?rev=907650&view=auto ============================================================================== --- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/cheese.properties (added) +++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/cheese.properties Mon Feb 8 13:17:41 2010 @@ -0,0 +1,19 @@ +## ------------------------------------------------------------------------ +## Licensed to the Apache Software Foundation (ASF) under one or more +## contributor license agreements. See the NOTICE file distributed with +## this work for additional information regarding copyright ownership. +## The ASF licenses this file to You under the Apache License, Version 2.0 +## (the "License"); you may not use this file except in compliance with +## the License. You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## ------------------------------------------------------------------------ + +cool.end=mock:result +cool.bar=bar \ No newline at end of file Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/cheese.properties ------------------------------------------------------------------------------ svn:eol-style = native Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/cheese.properties ------------------------------------------------------------------------------ svn:keywords = Rev Date Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/properties/cheese.properties ------------------------------------------------------------------------------ svn:mime-type = text/plain