Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In 2.X this has been extended to allow selective inclusion and exclusion of discovered route classes using Ant like path matching. In spring this is specified by adding a <packageScan/> tag. The tag must contain one or more 'packagespackage' elements (similar to 1.x), and optionally one or more 'includes' or 'excludes' elements specifying patterns to be applied to the fully qualified names of the discovered classes. e.g.

Code Block
xml
xml
  <camelContext xmlns="http://camel.apache.org/schema/spring">
    <packageScan>
      <packages>org<package>org.example.routes</packages>package>
      <excludes>**.*Excluded*</excludes>
      <includes>**.*</includes>
    </packageScan>
  </camelContext>

...