This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 489d2ae4f89e CAMEL-16861: Update docs
489d2ae4f89e is described below

commit 489d2ae4f89ef17eabcb6ddb0a43ccac90219e18
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Feb 24 21:01:35 2026 +0100

    CAMEL-16861: Update docs
---
 .../modules/ROOT/pages/spring-xml-extensions.adoc  | 72 ++++++++++++++--------
 docs/user-manual/modules/ROOT/pages/spring.adoc    |  4 +-
 .../modules/ROOT/pages/startup-condition.adoc      |  1 -
 .../modules/ROOT/pages/stream-caching.adoc         | 72 ++++++++++------------
 4 files changed, 81 insertions(+), 68 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/spring-xml-extensions.adoc 
b/docs/user-manual/modules/ROOT/pages/spring-xml-extensions.adoc
index 8ca5ad40afba..83d166270b62 100644
--- a/docs/user-manual/modules/ROOT/pages/spring-xml-extensions.adoc
+++ b/docs/user-manual/modules/ROOT/pages/spring-xml-extensions.adoc
@@ -1,11 +1,13 @@
 = Spring XML
 
 Using Camel with Spring XML files, is a classic way, of using XML DSL with 
Camel.
+
 Camel has historically been using Spring XML for a long time.
 The Spring framework started with XML files as a popular and common 
configuration for building Spring applications.
 
 The following is an example of what it looks like:
 
+.Spring XML Classic
 [source,xml]
 ----
 <beans xmlns="http://www.springframework.org/schema/beans";
@@ -41,35 +43,48 @@ The following is an example of what it looks like:
 
 The following dependency needs to be added to your pom.xml so that Spring XML 
files can be scanned by Camel:
 
+[tabs]
+====
+
+Standalone::
++
 [source,xml]
---------------------------------------------------------------------------------------------------------------
+----
+ <dependency>
+     <groupId>org.apache.camel</groupId>
+     <artifactId>camel-spring-xml</artifactId>
+ </dependency>
+----
+
+Spring Boot::
++
+[source,xml]
+----
  <dependency>
      <groupId>org.apache.camel.springboot</groupId>
      <artifactId>camel-spring-boot-xml-starter</artifactId>
  </dependency>
---------------------------------------------------------------------------------------------------------------
+----
+====
 
 You can use Spring XML files to specify Camel routes using XML DSL as shown:
 
 [source,xml]
---------------------------------------------------------------------------------------------------------------
+----
 <camelContext id="camel-A" xmlns="http://camel.apache.org/schema/spring";>
   <route>
     <from uri="seda:start"/>
     <to uri="mock:result"/>
   </route>
 </camelContext>
---------------------------------------------------------------------------------------------------------------
+----
 
 === Configuring Components and Endpoints
 
 You can configure your Component or xref:endpoint.adoc[Endpoint] instances in 
your Spring XML as follows in this example.
 
 [source,xml]
---------------------------------------------------------------------------------------------------------------
-<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring";>
-</camelContext>
-
+----
 <bean id="activemq" 
class="org.apache.camel.component.activemq.ActiveMQComponent">
   <property name="connectionFactory">
     <bean class="org.apache.activemq.ActiveMQConnectionFactory">
@@ -77,9 +92,16 @@ You can configure your Component or 
xref:endpoint.adoc[Endpoint] instances in yo
     </bean>
   </property>
 </bean>
---------------------------------------------------------------------------------------------------------------
 
-Which allows you to configure a component using any name, but its common to 
use the same name
+<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring";>
+  <route>
+    <from uri="activemq:cheese"/>
+    <to uri="log:cheese"/>
+  </route>
+</camelContext>
+----
+
+Which allows you to configure a component using any name, but it's common to 
use the same name
 eg (`activemq`). Then you can refer to the component using 
`activemq:destinationName`.
 
 This works by the Camel lazily fetching components from the Spring context for 
the scheme name you use for Endpoint xref:uris.adoc[URI]s.
@@ -89,42 +111,40 @@ This works by the Camel lazily fetching components from 
the Spring context for t
 You can use Java Code to define your xref:route-builder.adoc[RouteBuilder] 
implementations. These can be defined as beans in spring and then referenced in 
your camel context e.g.
 
 [source,xml]
---------------------------------------------------------------------------------------------------------------
+----
+<bean id="myBuilder" class="com.foo.MyRouteBuilder"/>
+
 <camelContext xmlns="http://camel.apache.org/schema/spring";>
   <routeBuilder ref="myBuilder"/>
 </camelContext>
-
-<bean id="myBuilder" 
class="org.apache.camel.spring.example.test1.MyRouteBuilder"/>
---------------------------------------------------------------------------------------------------------------
+----
 
 === Using package scanning
 
 Camel also provides a powerful feature that allows for the automatic discovery 
and initialization of routes in given packages. This is configured by adding 
tags to the camel context in your spring context definition, specifying the 
packages to be recursively searched for RouteBuilder implementations. To use 
this feature in 1.X, requires a <package></package> tag specifying a comma 
separated list of packages that should be searched e.g.
 
 [source,xml]
---------------------------------------------------------------------------------------------------------------
+----
 <camelContext>
   <packageScan>
     <package>com.foo</package>
-    <excludes>**.*Excluded*</excludes>
-    <includes>**.*</includes>
   </packageScan>
 </camelContext>
---------------------------------------------------------------------------------------------------------------
+----
 
 This will scan for `RouteBuilder` classes in the _com.foo_ and sub-packages.
 
 You can also filter the classes with includes or excludes such as:
 
 [source,xml]
---------------------------------------------------------------------------------------------------------------
+----
 <camelContext>
   <packageScan>
     <package>com.foo</package>
     <excludes>**.*Special*</excludes>
   </packageScan>
 </camelContext>
---------------------------------------------------------------------------------------------------------------
+----
 
 Which will skip classes that has _Special_ in the name.
 
@@ -137,7 +157,7 @@ Exclude patterns are applied before the include patterns. 
If no include or exclu
 You can allow Camel to scan the container context, e.g. the Spring 
ApplicationContext for route builder instances. This allow you to use the 
Spring *<component-scan>* feature and have Camel pickup any *`RouteBuilder`* 
instances which was created by Spring in its scan process.
 
 [source,xml]
---------------------------------------------------------------------------------------------------------------
+----
 <!-- enable Spring @Component scan -->
 <context:component-scan 
base-package="org.apache.camel.spring.issues.contextscan"/>
 
@@ -145,12 +165,12 @@ You can allow Camel to scan the container context, e.g. 
the Spring ApplicationCo
     <!-- and then let Camel use those @Component scanned route builders -->
     <contextScan/>
 </camelContext>
---------------------------------------------------------------------------------------------------------------
+----
 
 This allows you to just annotate your routes using the Spring *`@Component`*  
and have those routes included by Camel:
 
 [source,java]
---------------------------------------------------------------------------------------------------------------
+----
 @Component
 public class MyRoute extends RouteBuilder {
 
@@ -160,10 +180,12 @@ public class MyRoute extends RouteBuilder {
             .to("mock:result");
     }
 }
---------------------------------------------------------------------------------------------------------------
+----
 
 You can also use the ANT style for inclusion and exclusion, as mentioned above 
in the package scan section.
 
 == Additional configuration of Spring XML
 
-See more details at 
xref:advanced-configuration-of-camelcontext-using-spring.adoc[Camel Spring XML 
Auto Configuration].
+See more details at 
xref:advanced-configuration-of-camelcontext-using-spring.adoc[Camel Spring XML 
Auto Configuration]
+and 
https://github.com/apache/camel-spring-boot-examples/tree/main/xml-import[Spring
 Boot classic XML] example.
+
diff --git a/docs/user-manual/modules/ROOT/pages/spring.adoc 
b/docs/user-manual/modules/ROOT/pages/spring.adoc
index c125efc7f29e..98cfe1c60c9b 100644
--- a/docs/user-manual/modules/ROOT/pages/spring.adoc
+++ b/docs/user-manual/modules/ROOT/pages/spring.adoc
@@ -23,7 +23,7 @@ To use Camel with Spring XML files see the 
xref:spring-xml-extensions.adoc[Sprin
 
 == Using Spring dependency injection
 
-Spring dependency injection is integrated first-class when using Spring and 
Spring together.
+Spring dependency injection is integrated first-class when using Camel and 
Spring together.
 
 For example when using Camel on Spring Boot, then you can use any kind of 
Spring dependency and
 be able to inject Camel resources such as 'CamelContext', 
xref:endpoint.adoc[Endpoint] and many more.
@@ -38,5 +38,5 @@ See 
xref:components:eips:transactional-client.adoc[Transactional Client] EIP.
 
 == Using Camel with Spring testing
 
-See xref:components:others:test-spring-junit5.adoc[camel-test-spring-junit5] 
documentation.
+See xref:components:others:test-spring-junit5.adoc[camel-test-spring-junit5] 
and xref:components:others:test-spring-junit6.adoc[camel-test-spring-junit6] 
documentation.
 
diff --git a/docs/user-manual/modules/ROOT/pages/startup-condition.adoc 
b/docs/user-manual/modules/ROOT/pages/startup-condition.adoc
index a337b3f713b6..eb3099e45172 100644
--- a/docs/user-manual/modules/ROOT/pages/startup-condition.adoc
+++ b/docs/user-manual/modules/ROOT/pages/startup-condition.adoc
@@ -37,4 +37,3 @@ Or to use a custom condition by its class name:
 camel.startupcondition.enabled = true
 camel.startupcondition.customClassNames = com.foo.MyStartupCondition
 ----
-
diff --git a/docs/user-manual/modules/ROOT/pages/stream-caching.adoc 
b/docs/user-manual/modules/ROOT/pages/stream-caching.adoc
index cca9b463ff59..161eb0b44ec2 100644
--- a/docs/user-manual/modules/ROOT/pages/stream-caching.adoc
+++ b/docs/user-manual/modules/ROOT/pages/stream-caching.adoc
@@ -31,47 +31,23 @@ Stream caching is configured using 
`org.apache.camel.spi.StreamCachingStrategy`.
 
 The strategy has the following options:
 
-[width="100%",cols="20%,20%,60%",options="header"]
-|=======================================================================
+[width="100%",cols="1m,1,4",options="header"]
+|===
 | Option | Default | Description
-
-| enabled | true
-| Whether stream caching is enabled
-
 | allowClasses | | To filter stream caching of a given set of allowed/denied 
classes. By default, all classes that are `java.io.InputStream` is allowed. 
Multiple class names can be separated by comma.
-
+| anySpoolRules | false | Whether any or all ``SpoolRule``s must return `true` 
to determine if the stream should be spooled or not. This can be used as 
applying AND/OR binary logic to all the rules. By default it's AND based.
+| bufferSize | 4096 | Sets the buffer size to use when allocating in-memory 
buffers used for in-memory stream caches.
 | denyClasses | | To filter stream caching of a given set of allowed/denied 
classes. By default, all classes that are `java.io.InputStream` is allowed. 
Multiple class names can be separated by comma.
-
-| spoolEnabled | false
-| Whether spool to disk is enabled
-
-| spoolDirectory | ${java.io.tmpdir}/camel/camel-tmp-\#uuid#
-| Base directory where temporary files for spooled streams should be stored. 
This option supports naming patterns as documented below.
-
-| spoolCipher | null
-| If set, the temporary files are encrypted using the specified cipher 
transformation (i.e., a valid stream or 8-bit cipher name such as "RC4", 
"AES/CTR/NoPadding". An empty name "" is treated as null).
-
-| spoolThreshold | 128 KB
-| Size in bytes when the stream should be spooled to disk instead of keeping 
in memory. Use a value of 0 or negative to disable it all together so streams 
is always kept in memory regardless of their size.
-
-| spoolUsedHeapMemoryThreshold | 0
-| A percentage (1 to 99) of current used heap memory to use as threshold for 
spooling streams to disk. The upper bounds is based on heap committed 
(guaranteed memory the JVM can claim). This can be used to spool to disk when 
running low on memory.
-
-| spoolUsedHeapMemoryLimit | Max
-| If `spoolUsedHeapMemoryThreshold` is in use, then whether the used heap 
memory upper limit is either Max or Committed.
-
-| anySpoolRules | false
-| Whether any or all ``SpoolRule``s must return `true` to determine if the 
stream should be spooled or not. This can be used as applying AND/OR binary 
logic to all the rules. By default it's AND based.
-
-| bufferSize | 4096
-| Sets the buffer size to use when allocating in-memory buffers used for 
in-memory stream caches.
-
-| removeSpoolDirectoryWhenStopping | true
-| Whether to remove the spool directory when stopping 
xref:camelcontext.adoc[CamelContext].
-
-| statisticsEnabled | false
-| Whether utilization statistics is enabled. By enabling this you can see 
these statics for example with JMX.
-|=======================================================================
+| enabled | true | Whether stream caching is enabled
+| removeSpoolDirectoryWhenStopping | true | Whether to remove the spool 
directory when stopping xref:camelcontext.adoc[CamelContext].
+| spoolCipher | null | If set, the temporary files are encrypted using the 
specified cipher transformation (i.e., a valid stream or 8-bit cipher name such 
as "RC4", "AES/CTR/NoPadding". An empty name "" is treated as null).
+| spoolDirectory | ${java.io.tmpdir}/camel/camel-tmp-\#uuid# | Base directory 
where temporary files for spooled streams should be stored. This option 
supports naming patterns as documented below.
+| spoolEnabled | false | Whether spool to disk is enabled
+| spoolThreshold | 128 KB | Size in bytes when the stream should be spooled to 
disk instead of keeping in memory. Use a value of 0 or negative to disable it 
all together so streams is always kept in memory regardless of their size.
+| spoolUsedHeapMemoryLimit | Max | If `spoolUsedHeapMemoryThreshold` is in 
use, then whether the used heap memory upper limit is either Max or Committed.
+| spoolUsedHeapMemoryThreshold | 0 | A percentage (1 to 99) of current used 
heap memory to use as threshold for spooling streams to disk. The upper bounds 
is based on heap committed (guaranteed memory the JVM can claim). This can be 
used to spool to disk when running low on memory.
+| statisticsEnabled | false | Whether utilization statistics is enabled. By 
enabling this you can see these statics for example with JMX.
+|===
 
 === SpoolDirectory naming pattern
 
@@ -133,9 +109,25 @@ from("file:inbox")
   .to("bean:foo");
 ----
 
-== Configuring StreamCachingStrategy in XML
+== Configuring Stream Caching using Application Properties
+
+When using Spring Boot, Quarkus or Camel Standalone It's recommended to 
configure stream caching in the `application.properties` configuration file:
+
+.Application Properties
+[source,properties]
+----
+camel.main.streamCachingSpoolEnabled = true
+camel.main.streamCachingSpoolDirectory = /tmp/cachedir
+camel.main.streamCachingSpoolThreshold = 65536
+camel.main.streamCachingBufferSize = 16384;
+----
+
+TIP: You can run Camel JBang: `camel doc main --filter=stream` from CLI to see 
all the options.
+
+
+== Configuring StreamCachingStrategy in Spring XML
 
-In XML you can enable stream caching on the `<camelContext>` and then do the 
configuration in the `streamCaching` element:
+In xref:spring-xml-extensions.adoc[Spring XML] you can enable stream caching 
on the `<camelContext>` and then do the configuration in the `streamCaching` 
element:
 
 [source,xml]
 ----

Reply via email to