Skip to content

Commit 9053daa

Browse files
SteKoeCopilot
andauthored
fix(docs): correct URLs and enhance clarity in documentation (#5158)
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
1 parent 7817925 commit 9053daa

7 files changed

Lines changed: 45 additions & 36 deletions

File tree

spring-boot-admin-docs/src/site/docs/01-getting-started/50-snapshots.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ sonatype snapshot repositories:
3636
<snapshots>
3737
<enabled>true</enabled>
3838
</snapshots>
39-
<url>http:s//repo.spring.io/snapshot</url>
39+
<url>https://repo.spring.io/snapshot</url>
4040
</repository>
4141
</repositories>
4242
```

spring-boot-admin-docs/src/site/docs/02-server/02-security.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ A Spring Security configuration for your server could look like this:
1313

1414
```java title="SecuritySecureConfig.java"
1515

16+
import org.springframework.http.HttpMethod;
17+
1618
@Configuration(proxyBeanMethods = false)
1719
public class SecuritySecureConfig {
1820

@@ -32,13 +34,17 @@ public class SecuritySecureConfig {
3234
successHandler.setDefaultTargetUrl(this.adminServer.path("/"));
3335

3436
http.authorizeHttpRequests((authorizeRequests) -> authorizeRequests //
35-
.requestMatchers(new AntPathRequestMatcher(this.adminServer.path("/assets/**")))
37+
.requestMatchers(PathPatternRequestMatcher.withDefaults()
38+
.matcher(this.adminServer.path("/assets/**")))
3639
.permitAll() // (1)
37-
.requestMatchers(new AntPathRequestMatcher(this.adminServer.path("/actuator/info")))
40+
.requestMatchers(PathPatternRequestMatcher.withDefaults()
41+
.matcher(this.adminServer.path("/actuator/info")))
3842
.permitAll()
39-
.requestMatchers(new AntPathRequestMatcher(adminServer.path("/actuator/health")))
43+
.requestMatchers(PathPatternRequestMatcher.withDefaults()
44+
.matcher(this.adminServer.path("/actuator/health")))
4045
.permitAll()
41-
.requestMatchers(new AntPathRequestMatcher(this.adminServer.path("/login")))
46+
.requestMatchers(PathPatternRequestMatcher.withDefaults()
47+
.matcher(this.adminServer.path("/login")))
4248
.permitAll()
4349
.dispatcherTypeMatchers(DispatcherType.ASYNC)
4450
.permitAll() // https://github.com/spring-projects/spring-security/issues/11027
@@ -53,9 +59,12 @@ public class SecuritySecureConfig {
5359
.csrf((csrf) -> csrf.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse())
5460
.csrfTokenRequestHandler(new CsrfTokenRequestAttributeHandler())
5561
.ignoringRequestMatchers(
56-
new AntPathRequestMatcher(this.adminServer.path("/instances"), POST.toString()), // (6)
57-
new AntPathRequestMatcher(this.adminServer.path("/instances/*"), DELETE.toString()), // (6)
58-
new AntPathRequestMatcher(this.adminServer.path("/actuator/**")) // (7)
62+
PathPatternRequestMatcher.withDefaults()
63+
.matcher(HttpMethod.POST, this.adminServer.path("/instances")), // (6)
64+
PathPatternRequestMatcher.withDefaults()
65+
.matcher(HttpMethod.DELETE, this.adminServer.path("/instances/*")), // (6)
66+
PathPatternRequestMatcher.withDefaults()
67+
.matcher(this.adminServer.path("/actuator/**")) // (7)
5968
));
6069

6170
http.rememberMe((rememberMe) -> rememberMe.key(UUID.randomUUID().toString()).tokenValiditySeconds(1209600));

spring-boot-admin-docs/src/site/docs/02-server/20-Clustering.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ Spring Boot Admin Server supports cluster replication via Hazelcast. It is autom
1212
You can also configure the Hazelcast instance to be persistent, to keep the status over restarts. Also have a look at the [Spring Boot support for Hazelcast](http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-hazelcast/).
1313

1414
When using clustering, Spring Boot Admin Events and Notifications are replicated across the members in the cluster.
15-
The applications are not replicated, each instance of Spring Boot Admin will have its own set of applications.
16-
This means that each instance has to monitor all applications, which may lead to increased load on the monitored services.
17-
Otherwise, you would have to ensure that each application is only monitored by one instance of Spring Boot Admin.
15+
The registered applications themselves are not replicated — each instance of Spring Boot Admin independently polls
16+
its own set of registered clients. This means each node monitors all applications, which may lead to increased
17+
load on the monitored services. If that is a concern, ensure that each application is registered with only one
18+
instance of Spring Boot Admin.
1819

1920
![Architecture](hazelcast-component-diagram.png)
2021

spring-boot-admin-docs/src/site/docs/02-server/notifications/notifier-mail.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { PropertyTable } from "@sba/spring-boot-admin-docs/src/site/src/componen
77

88
# Mail Notifications
99

10-
Mail notifications will be delivered as HTML emails rendered using https://www.thymeleaf.org/[Thymeleaf] templates.
10+
Mail notifications will be delivered as HTML emails rendered using [Thymeleaf](https://www.thymeleaf.org/) templates.
1111
To enable Mail notifications, configure a `JavaMailSender` using `spring-boot-starter-mail` and set a recipient.
1212

1313
<figure>

spring-boot-admin-docs/src/site/docs/03-client/10-client-features.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,17 @@ You might want to set spring.jmx.enabled=true if you want to expose Spring beans
5252
Spring Boot 4 does not support Jolokia directly, you need a separate dependency for Spring Boot 4-based applications.
5353
See https://jolokia.org/reference/html/manual/spring.html for more details.
5454

55+
:::note
56+
The artifact for Spring Boot 4 is named `jolokia-support-springboot` (no number suffix) — this is the
57+
current/latest Jolokia Spring Boot integration, intended for Spring Boot 4+. The Spring Boot 3 variant carries
58+
an explicit `3` suffix (`jolokia-support-springboot3`).
59+
:::
60+
5561
```xml title="pom.xml"
5662
<dependency>
5763
<groupId>org.jolokia</groupId>
5864
<artifactId>jolokia-support-springboot</artifactId>
59-
<version>2.5.0</version>
65+
<version>x.y.z</version> <!-- replace with a concrete Jolokia Spring Boot integration version (for example, the latest from Maven Central), or omit this element if the version is already managed via a BOM in your <dependencyManagement> section -->
6066
</dependency>
6167
```
6268

@@ -68,8 +74,8 @@ See https://jolokia.org/reference/html/manual/spring.html for more details.
6874
```xml title="pom.xml"
6975
<dependency>
7076
<groupId>org.jolokia</groupId>
71-
<artifactId>jolokia-support-springboot-3</artifactId>
72-
<version>2.5.0</version>
77+
<artifactId>jolokia-support-springboot3</artifactId>
78+
<version>x.y.z</version> <!-- replace with a concrete Jolokia Spring Boot 3 integration version (for example, the latest from Maven Central), or omit this element if the version is already managed via a BOM in your <dependencyManagement> section -->
7379
</dependency>
7480
```
7581

@@ -82,6 +88,7 @@ provided the actuator itself, so you only need the plain jolokia dependency.
8288
<dependency>
8389
<groupId>org.jolokia</groupId>
8490
<artifactId>jolokia-core</artifactId>
91+
<version>x.y.z</version> <!-- replace with the desired Jolokia core version -->
8592
</dependency>
8693
```
8794

spring-boot-admin-docs/src/site/docs/06-customization/monitoring/02-custom-health-status.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,14 @@ import de.codecentric.boot.admin.server.web.client.InstanceWebClient;
220220

221221
public class CustomHealthEndpointStatusUpdater extends StatusUpdater {
222222

223+
private final InstanceWebClient instanceWebClient;
224+
223225
public CustomHealthEndpointStatusUpdater(
224226
InstanceRepository repository,
225227
InstanceWebClient instanceWebClient,
226228
ApiMediaTypeHandler apiMediaTypeHandler) {
227229
super(repository, instanceWebClient, apiMediaTypeHandler);
230+
this.instanceWebClient = instanceWebClient;
228231
}
229232

230233
@Override
@@ -238,11 +241,10 @@ public class CustomHealthEndpointStatusUpdater extends StatusUpdater {
238241
.getMetadata()
239242
.getOrDefault("health-path", "/actuator/health");
240243

241-
return instanceWebClient.instance(instance)
244+
return this.instanceWebClient.instance(instance)
242245
.get()
243246
.uri(customHealthPath)
244247
.exchangeToMono(this::convertStatusInfo)
245-
.timeout(getTimeoutWithMargin())
246248
.onErrorResume(this::handleError)
247249
.map(instance::withStatusInfo);
248250
}

spring-boot-admin-docs/src/site/docs/11-upgrading/01-spring-boot-admin-4.md

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -176,30 +176,21 @@ spring:
176176
- Search your configuration files for `prefer-ip`
177177
- Replace with `service-host-type: IP` (if `prefer-ip: true`) or `service-host-type: HOST_NAME` (if `prefer-ip: false`)
178178

179-
---
180-
181179
### 4. Jolokia Compatibility
182180

183181
**What Changed:**
184182

185-
The current stable Jolokia version (2.4.2) does not yet support Spring Boot 4. Spring Boot Admin 4 temporarily
186-
downgrades to **Jolokia 2.1.0** for basic JMX functionality.
187-
188-
**Limitations:**
189-
190-
- Some advanced Jolokia features may not be available
191-
- JMX operations work but with reduced functionality compared to Jolokia 2.4.2
192-
193-
**Future Outlook:**
194-
195-
Spring Boot Admin will upgrade to a newer Jolokia version once Spring Boot 4 support is added. Monitor
196-
the [Jolokia project](https://github.com/jolokia/jolokia) for updates on Spring Boot 4 compatibility.
183+
Spring Boot Admin 4 manages the Jolokia Spring Boot integration **`org.jolokia:jolokia-support-springboot` 2.5.x**, which supports Spring Boot 4.
197184

198185
**Action Required:**
199186

200-
- **No immediate action needed** - Jolokia 2.1.0 is included automatically and provides basic JMX functionality
201-
- Test your JMX operations to ensure they work with the limited feature set
202-
- If JMX functionality is critical, consider waiting for full Jolokia support before upgrading
187+
- Jolokia 2.5.x is compatible with Spring Boot 4 and Spring Boot Admin 4.
188+
- If you use **JMX-Bean Management**, you must add the appropriate Jolokia Spring Boot support dependency to each
189+
client application, matching the client's Spring Boot major version (for example, `jolokia-support-springboot`
190+
for Spring Boot 4+ clients and `jolokia-support-springboot3` for Spring Boot 3.x clients). For Spring Boot 2.x
191+
applications managed by Spring Boot Admin 2 or 3, use `jolokia-core` as described in the corresponding SBA
192+
version documentation. See the [JMX-Bean Management](../03-client/10-client-features.md#jmx-bean-management)
193+
section for the exact dependency coordinates per Spring Boot version.
203194

204195
---
205196

@@ -281,7 +272,7 @@ mvn spring-boot:run
281272
- Health checks update correctly
282273
- Actuator endpoints are accessible
283274
- Notifications fire properly
284-
- JMX operations work (with Jolokia 2.1.0 limitations)
275+
- JMX operations work via Jolokia
285276

286277
### Step 5: Monitor Logs
287278

@@ -314,7 +305,6 @@ If you encounter issues during the upgrade:
314305
- ✅ Replace `org.springframework.lang.Nullable` with `org.jspecify.annotations.Nullable`
315306
- ✅ Migrate client from `WebClient` to `RestClient`
316307
- ✅ Change `prefer-ip` to `service-host-type`
317-
- ⚠️ Accept Jolokia 2.1.0 limitations temporarily
318308

319309
Most applications can upgrade with minimal code changes, primarily focused on configuration updates and dependency
320310
management.

0 commit comments

Comments
 (0)