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

fmariani pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new 3ba6b847522 Expose jolokia doc to camel website
3ba6b847522 is described below

commit 3ba6b84752223106976d328bb3786c0088eb172e
Author: Croway <[email protected]>
AuthorDate: Fri Jan 23 10:55:54 2026 +0100

    Expose jolokia doc to camel website
---
 .../src/main/docs/jolokia.adoc                     | 109 --------------
 docs/spring-boot/modules/ROOT/nav.adoc             |   1 +
 docs/spring-boot/modules/ROOT/pages/jolokia.adoc   | 158 +++++++++++++++++++++
 3 files changed, 159 insertions(+), 109 deletions(-)

diff --git 
a/components-starter/camel-jolokia-starter/src/main/docs/jolokia.adoc 
b/components-starter/camel-jolokia-starter/src/main/docs/jolokia.adoc
deleted file mode 100644
index 99ffe34e8f9..00000000000
--- a/components-starter/camel-jolokia-starter/src/main/docs/jolokia.adoc
+++ /dev/null
@@ -1,109 +0,0 @@
-= Jolokia Starter
-//Manually maintained attributes
-:artifactid: camel-jolokia-starter
-:shortname: jolokia
-:camel-spring-boot-name: jolokia
-
-Integrates Jolokia agent configuration in Spring Boot,
-it wraps the https://jolokia.org/reference/html/manual/spring.html[Spring 
Support] adding
-default configurations to let the application working out-of-the-box without 
manually declaring Jolokia servers.
-
-This starter can be considered an alternative to the 
https://jolokia.org/reference/html/manual/agents.html[Jolokia JVM agent].
-
-To start the Jolokia endpoint it is enough to add the dependency:
-
-[source,xml]
-----
-<dependency>
-    <groupId>org.apache.camel.springboot</groupId>
-    <artifactId>camel-jolokia-starter</artifactId>
-</dependency>
-----
-
-This will expose the Jolokia endpoint at `http://0.0.0.0:8778/jolokia` ,
-the agent can be configured according to the 
https://jolokia.org/reference/html/manual/spring.html#_support_for_spring_framework_in_jolokia[Jolokia
 Spring support page]
-using the property prefix `camel.component.jolokia` i.e. it is possible to 
configure something like
-`camel.component.jolokia.lookup-config=true`.
-
-Moreover, it is possible to configure the Jolokia server accessing to the 
configuration map via properties
-according to 
https://jolokia.org/reference/html/manual/agents.html#jvm-agent-installation[Jolokia
 agent configuration]
-using `camel.component.jolokia.server-config` map configuration,
-i.e. `camel.component.jolokia.server-config.port=8779` or 
`camel.component.jolokia.server-config.authMode=jaas`
- The value of the `discoveryEnabled` configuration key is set to `true` on JVM 
local environment (not on Kubernetes), to allow the Hawtio process to discover 
the Jolokia agent. It is possible to disable the default configuration by 
setting `camel.component.jolokia.server-config.discoveryEnabled=false`.
-
-To avoid to expose all the JMX MBeans (see 
https://jolokia.org/reference/html/manual/security.html[Security] 
considerations),
-it is provided a default Jolokia 
https://jolokia.org/reference/html/manual/security.html#security-restrictor[Restrictor]
-that allows only Camel related data and some basic information from java.
-Everytime it is possible to avoid to use the restrictor with the property 
`camel.component.jolokia.use-camel-restrictor=false`
-or to use your own custom one with the property 
`camel.component.jolokia.server-config.restrictorClass=org.example.MyRestrictor`
-
-An example to extend the provided restrictor can be
-
-[source,java]
-----
-public class MyRestrictor extends CamelRestrictor {
-
-       //getDefaultDomains() contains default domains, if you want to add some 
domain to the existing list
-       @Override
-       protected List<String> getAllowedDomains() {
-               final List<String> newDomains = new 
ArrayList<>(getDefaultDomains());
-               newDomains.add("my.domain");
-               return newDomains;
-       }
-}
-----
-
-The starter creates a default configuration according to the provided 
properties,
-that covers all the configuration for the Jolokia agent/server but if you want
-to use your custom `SpringJolokiaConfigHolder` implementation, it is possible 
declaring
-in the Spring context a Bean named `camelConfigHolder`
-
-[source,java]
-----
-    @Bean("camelConfigHolder")
-    public SpringJolokiaConfigHolder myConfigHolder() {
-        final SpringJolokiaConfigHolder myConfig = new 
SpringJolokiaConfigHolder();
-        myConfig.setConfig(Map.of("threadNr", "5", "executor", "fixed"));
-        return myConfig;
-    }
-----
-In this case the executor configuration will be taken from the custom Bean if 
the same properties
-are not defined in the application.properties. This behaviour is also 
configurable with the property
-`camel.component.jolokia.config-from-properties-first=false`, it means that 
the configuration,
-in case the key is present in both application.properties and Bean 
implementation, uses the one from Bean.
-If the keys from properties and beans are not overridden each other, the 
simple merge will be applied.
-Anyway the configuration properties allow to cover all the configurable aspect 
of the Jolokia server.
-
-There is a log configuration also provided in the starter that uses the 
`slf4j` implementation.
-It is possible to change this configuration providing a Bean named 
`camelLogHandlerHolder`
-
-[source,java]
-----
-    @Bean
-       @ConditionalOnMissingBean(name = "camelLogHandlerHolder")
-       public SpringJolokiaLogHandlerHolder myLogHandlerHolder() {
-               final SpringJolokiaLogHandlerHolder stdoutHandlerHolder = new 
SpringJolokiaLogHandlerHolder();
-               stdoutHandlerHolder.setType("stdout");
-               return stdoutHandlerHolder;
-       }
-----
-The category for the Camel Spring Boot starter is 
`org.apache.camel.component.jolokia`
-while it is possible to configure level of the core Jolokia server with 
`org.jolokia`
-
-example in application.properties
-[source,properties]
-----
-logging.level.org.apache.camel.component.jolokia = TRACE
-logging.level.org.jolokia = TRACE
-----
-
-The starter also provides some default configurations in case of the 
environment is a
-Kubernetes cluster. The starter checks the existence of a specific file to use 
as
-certification authority 
(`/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt`) and, if this 
file exists, it initializes the server using
-TLS protocol and client authentication. So the endpoint become 
`https://0.0.0.0:8778/jolokia`
-It is possible to avoid this behaviour with the property 
`camel.component.jolokia.kubernetes-discover=false`
-
-The wrapped library `Jolokia Spring Support` provides the integration with
-the Spring Boot Actuator as per 
https://jolokia.org/reference/html/manual/spring.html#_registering_agent_servlet_under_spring_boot_actuator[configuration]
-where it is possible to retrieve information about Jolokia server.
-As any other actuator endpoint, it is possible to be excluded or disabled.
diff --git a/docs/spring-boot/modules/ROOT/nav.adoc 
b/docs/spring-boot/modules/ROOT/nav.adoc
index 377dc223b80..0f7969211c8 100644
--- a/docs/spring-boot/modules/ROOT/nav.adoc
+++ b/docs/spring-boot/modules/ROOT/nav.adoc
@@ -2,6 +2,7 @@
 * xref:spring-boot.adoc[Camel Context starter]
 * xref:list.adoc[List of starters]
 * xref:starter-configuration.adoc[Starter Configuration]
+* xref:jolokia.adoc[Jolokia]
 * Cluster Services
 ** xref:consul-cluster-service.adoc[Consul]
 ** xref:file-cluster-service.adoc[File]
diff --git a/docs/spring-boot/modules/ROOT/pages/jolokia.adoc 
b/docs/spring-boot/modules/ROOT/pages/jolokia.adoc
new file mode 100644
index 00000000000..a78f8bf94f0
--- /dev/null
+++ b/docs/spring-boot/modules/ROOT/pages/jolokia.adoc
@@ -0,0 +1,158 @@
+= Jolokia Starter
+
+The Jolokia Starter integrates https://jolokia.org/[Jolokia] agent 
configuration in Spring Boot, wrapping the 
https://jolokia.org/reference/html/manual/spring.html[Jolokia Spring Support] 
with default configurations to let the application work out-of-the-box without 
manually declaring Jolokia servers.
+
+This starter can be considered an alternative to the 
https://jolokia.org/reference/html/manual/agents.html[Jolokia JVM agent]. When 
enabled, it exposes the Jolokia endpoint at `http://0.0.0.0:8778/jolokia`.
+
+== Maven Dependency
+
+[source,xml]
+----
+<dependency>
+    <groupId>org.apache.camel.springboot</groupId>
+    <artifactId>camel-jolokia-starter</artifactId>
+</dependency>
+----
+
+== Configuration Options
+
+The following configuration options are available under the 
`camel.component.jolokia` prefix:
+
+[cols="3,2,5",options="header"]
+|===
+| Option | Default | Description
+
+| enabled
+| true
+| Enable the component.
+
+| lookup-config
+| false
+| If true, Spring's application context is searched for additional 
`SpringJolokiaConfigHolder` beans to configure the agent.
+
+| lookup-services
+| false
+| If true, Spring's application context is searched for additional 
`JolokiaService` beans to add to Jolokia's internal context.
+
+| system-properties-mode
+| never
+| Specifies how system properties with `jolokia.` prefix affect configuration. 
Values: `never`, `fallback`, `override`.
+
+| expose-application-context
+| false
+| If true, adds `SpringRequestHandler` to the agent allowing Spring bean 
operations via Jolokia protocol.
+
+| use-camel-restrictor
+| true
+| Use the Camel restrictor that allows only operations on Camel domain MBeans.
+
+| config-from-properties-first
+| true
+| When using custom bean configuration, prefer values from properties over 
values from bean.
+
+| kubernetes-discover
+| true
+| Auto-configure for Kubernetes/OpenShift environments (sets protocol=https, 
enables client authentication).
+
+| kubernetes-use-default-ca
+| true
+| Use the default Kubernetes CA file at 
`/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt`.
+
+| server-config
+|
+| Map of Jolokia server configuration options (e.g., 
`server-config.port=8779`).
+|===
+
+For detailed server configuration options, see the 
https://jolokia.org/reference/html/manual/agents.html#jvm-agent[Jolokia JVM 
agent configuration documentation].
+
+== Usage Example
+
+[source,java]
+----
+@SpringBootApplication
+public class MyApplication {
+    // The Jolokia agent is auto-configured when the starter is on the 
classpath
+    // and camel.component.jolokia.enabled=true (default)
+}
+----
+
+Configure in `application.properties`:
+
+[source,properties]
+----
+# Change the default port
+camel.component.jolokia.server-config.port=8779
+
+# Enable discovery for Hawtio
+camel.component.jolokia.server-config.discoveryEnabled=true
+----
+
+== Security Restrictor
+
+To avoid exposing all JMX MBeans (see 
https://jolokia.org/reference/html/manual/security.html[Security] 
considerations), a default Jolokia 
https://jolokia.org/reference/html/manual/security.html#security-restrictor[Restrictor]
 is provided that allows only Camel related data and some basic information 
from Java.
+
+You can disable the restrictor with 
`camel.component.jolokia.use-camel-restrictor=false` or use your own custom one 
with 
`camel.component.jolokia.server-config.restrictorClass=org.example.MyRestrictor`.
+
+An example to extend the provided restrictor:
+
+[source,java]
+----
+public class MyRestrictor extends CamelRestrictor {
+
+    @Override
+    protected List<String> getAllowedDomains() {
+        final List<String> newDomains = new ArrayList<>(getDefaultDomains());
+        newDomains.add("my.domain");
+        return newDomains;
+    }
+}
+----
+
+== Custom Configuration
+
+The starter creates a default configuration according to the provided 
properties, but you can provide a custom `SpringJolokiaConfigHolder` 
implementation by declaring a Bean named `camelConfigHolder`:
+
+[source,java]
+----
+@Bean("camelConfigHolder")
+public SpringJolokiaConfigHolder myConfigHolder() {
+    final SpringJolokiaConfigHolder myConfig = new SpringJolokiaConfigHolder();
+    myConfig.setConfig(Map.of("threadNr", "5", "executor", "fixed"));
+    return myConfig;
+}
+----
+
+The executor configuration will be taken from the custom Bean if the same 
properties are not defined in `application.properties`. This behaviour is 
configurable with `camel.component.jolokia.config-from-properties-first=false`, 
meaning the configuration uses the Bean value when the key is present in both 
places. If the keys from properties and beans do not override each other, they 
will be merged.
+
+== Logging Configuration
+
+The starter provides a log configuration using the `slf4j` implementation. You 
can change this by providing a Bean named `camelLogHandlerHolder`:
+
+[source,java]
+----
+@Bean
+@ConditionalOnMissingBean(name = "camelLogHandlerHolder")
+public SpringJolokiaLogHandlerHolder myLogHandlerHolder() {
+    final SpringJolokiaLogHandlerHolder stdoutHandlerHolder = new 
SpringJolokiaLogHandlerHolder();
+    stdoutHandlerHolder.setType("stdout");
+    return stdoutHandlerHolder;
+}
+----
+
+The logging category for the Camel Spring Boot starter is 
`org.apache.camel.component.jolokia`, while the core Jolokia server uses 
`org.jolokia`:
+
+[source,properties]
+----
+logging.level.org.apache.camel.component.jolokia=TRACE
+logging.level.org.jolokia=TRACE
+----
+
+== Kubernetes Support
+
+The starter provides default configurations for Kubernetes environments. It 
checks for the existence of a certification authority file at 
`/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt` and, if present, 
initializes the server using TLS protocol and client authentication. The 
endpoint becomes `https://0.0.0.0:8778/jolokia`.
+
+You can disable this behaviour with 
`camel.component.jolokia.kubernetes-discover=false`.
+
+== Spring Boot Actuator Integration
+
+The wrapped 
https://jolokia.org/reference/html/manual/spring.html#_registering_agent_servlet_under_spring_boot_actuator[Jolokia
 Spring Support] library provides integration with Spring Boot Actuator, where 
it is possible to retrieve information about the Jolokia server. As with any 
other actuator endpoint, it can be excluded or disabled.

Reply via email to