Skip to content

Commit

Permalink
Fixed spring-boot doc as xml-routes is changed to routes-include-pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
davsclaus committed Jan 1, 2022
1 parent 6c37cb7 commit 6fb06a2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
},
properties = {
"debug=false",
"camel.springboot.xml-rests=false",
"camel.springboot.xml-routes=false",
"camel.springboot.routes-include-pattern=false",
"camel.rest.enabled=true",
"camel.rest.component=dummy-rest",
"camel.rest.host=localhost",
Expand Down
47 changes: 4 additions & 43 deletions core/camel-spring-boot/src/main/docs/spring-boot.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,12 @@ this off using the configuration option
[source,properties]
----
# turn off
camel.springboot.xml-routes = false
# scan in the com/foo/routes classpath
camel.springboot.xml-routes = classpath:com/foo/routes/*.xml
camel.springboot.routes-include-pattern = false
# scan only in the com/foo/routes classpath
camel.springboot.routes-include-pattern = classpath:com/foo/routes/*.xml
----

The XML files should be Camel XML routes (not CamelContext) such as
The XML files should be Camel XML routes (*not* `<CamelContext>`) such as

[source,xml]
----
Expand All @@ -351,45 +351,6 @@ The XML files should be Camel XML routes (not CamelContext) such as
</routes>
----

== Adding XML Rest-DSL

By default, you can put Camel Rest-DSL XML routes in the classpath under the
directory camel-rest, which camel-spring-boot will auto-detect and include.
You can configure the directory name or turn this off using the configuration option

[source,properties]
----
# turn off
camel.springboot.xml-rests = false
# scan in the com/foo/routes classpath
camel.springboot.xml-rests = classpath:com/foo/rests/*.xml
----

The Rest-DSL XML files should be Camel XML rests (not CamelContext) such as

[source,xml]
----
<rests xmlns="http://camel.apache.org/schema/spring">
<rest>
<post uri="/persons">
<to uri="direct:postPersons"/>
</post>
<get uri="/persons">
<to uri="direct:getPersons"/>
</get>
<get uri="/persons/{personId}">
<to uri="direct:getPersionId"/>
</get>
<put uri="/persons/{personId}">
<to uri="direct:putPersionId"/>
</put>
<delete uri="/persons/{personId}">
<to uri="direct:deletePersionId"/>
</delete>
</rest>
</rests>
----

== Testing the JUnit 4 way (deprecated)

For testing, Maven users will need to add the following dependencies to their `pom.xml`:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
SupervisingRouteControllerRestartTest.TestConfiguration.class
},
properties = {
"camel.springboot.xml-routes = false",
"camel.springboot.main-run-controller = true",
"camel.springboot.routeControllerSuperviseEnabled = true",
"camel.springboot.routeControllerInitialDelay = 500",
Expand Down

0 comments on commit 6fb06a2

Please sign in to comment.