...
Code Block | ||||
---|---|---|---|---|
| ||||
<?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:context="http://www.springframework.org/schema/context" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd"> <camelContext xmlns="http://activemq.apache.org/camel/schema/spring"> <route> <from uri="seda:foo"/> <to uri="mock:results"/> </route> </camelContext> </beans> |
Then boot up your web application and you're good to go!
Hints and Tips
If you use Maven to build your application your directory tree will look like this...
Code Block |
---|
src/main/webapp/WEB-INF
web.xml
applicationContext.xml
|
To enable more rapid development we hightly recommend the jetty:run maven plugin.
Please refer to the help for more information - but briefly if you add the following to your pom.xml
Code Block |
---|
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<webAppConfig>
<contextPath>/</contextPath>
</webAppConfig>
<scanIntervalSeconds>10</scanIntervalSeconds>
</configuration>
</plugin>
</plugins>
</build>
|
Then you can run your web application as follows
Code Block |
---|
mvn jetty:run
|
Then Jetty will also monitor your target/classes directory and your src/main/webapp directory so that if you modify your spring XML, your web.xml or your java code