Skip to content

Commit 398c304

Browse files
committed
Merge changes from upgrade to spring boot 2.7.0 into experimental spring boot 3 branch
2 parents 366a503 + 084c2cc commit 398c304

File tree

33 files changed

+187
-168
lines changed

33 files changed

+187
-168
lines changed

spring-boot-admin-client/src/main/resources/META-INF/spring.factories

Lines changed: 0 additions & 3 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration
2+
de.codecentric.boot.admin.client.config.SpringBootAdminClientCloudFoundryAutoConfiguration

spring-boot-admin-client/src/test/java/de/codecentric/boot/admin/client/config/CloudFoundryApplicationPropertiesTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616

1717
package de.codecentric.boot.admin.client.config;
1818

19-
import org.apache.commons.logging.LogFactory;
2019
import org.junit.jupiter.api.Test;
2120
import org.springframework.boot.cloud.CloudFoundryVcapEnvironmentPostProcessor;
2221
import org.springframework.boot.context.properties.bind.Bindable;
2322
import org.springframework.boot.context.properties.bind.Binder;
23+
import org.springframework.boot.logging.DeferredLogs;
2424
import org.springframework.mock.env.MockEnvironment;
2525

2626
import static org.assertj.core.api.Assertions.assertThat;
@@ -41,8 +41,7 @@ public void bind() {
4141

4242
MockEnvironment env = new MockEnvironment();
4343
env.setProperty("VCAP_APPLICATION", vcap);
44-
new CloudFoundryVcapEnvironmentPostProcessor(LogFactory.getLog(CloudFoundryApplicationPropertiesTest.class))
45-
.postProcessEnvironment(env, null);
44+
new CloudFoundryVcapEnvironmentPostProcessor(new DeferredLogs()).postProcessEnvironment(env, null);
4645

4746
CloudFoundryApplicationProperties cfProperties = Binder.get(env)
4847
.bind("vcap.application", Bindable.of(CloudFoundryApplicationProperties.class)).get();

spring-boot-admin-docs/src/main/asciidoc/customizing.adoc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,22 @@ And this is how you register the top-level view.
8181
----
8282
include::{samples-dir}/spring-boot-admin-sample-custom-ui/src/index.js[tags=customization-ui-toplevel]
8383
----
84-
<1> Name of the view and the route to the view
85-
<2> Path where the view will be accessible
84+
<1> Name of the view and the route to the view.
85+
<2> Path where the view will be accessible.
8686
<3> The imported custom component, which will be rendered on the route.
8787
<4> The label for the custom view to be shown in the top navigation bar.
8888
<5> Order for the view. Views in the top navigation bar are sorted by ascending order.
8989

90+
===== Example
91+
[source,javascript]
92+
----
93+
include::{samples-dir}/spring-boot-admin-sample-custom-ui/src/index.js[tags=customization-ui-child]
94+
----
95+
<1> References the name of the parent view.
96+
<2> Router path used to navigate to.
97+
<3> Define whether the path should be registered as child route in parent's route.
98+
When set to `true`, the parent component has to implement `<router-view>`
99+
90100
The `routes.txt` config with the added route:
91101
[source,text]
92102
----

spring-boot-admin-docs/src/main/asciidoc/server-discovery.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ spring:
3636
----
3737

3838
==== Other DiscoveryClients ====
39-
Spring Boot Admin supports all other implementations of Spring Cloud's `DiscoveryClient` (Eureka, Zookeeper, Consul, ...). You need to add it to the Spring Boot Admin Server and configure it properly.
39+
Spring Boot Admin supports all other implementations of Spring Cloud's `DiscoveryClient` (https://docs.spring.io/spring-cloud-netflix/docs/current/reference/html/#service-discovery-eureka-clients/[Eureka], https://docs.spring.io/spring-cloud-zookeeper/docs/current/reference/html/#spring-cloud-zookeeper-discovery[Zookeeper], https://docs.spring.io/spring-cloud-consul/docs/current/reference/html/#spring-cloud-consul-discovery[Consul], https://docs.spring.io/spring-cloud-kubernetes/docs/current/reference/html/#discoveryclient-for-kubernetes[Kubernetes], ...). You need to add it to the Spring Boot Admin Server and configure it properly.
4040
An <<discover-clients-via-spring-cloud-discovery,example setup using Eureka>> is shown above.
4141

4242
==== Converting ServiceInstances ====

spring-boot-admin-samples/spring-boot-admin-sample-consul/src/main/resources/application.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,16 @@ management:
3232

3333
---
3434
spring:
35-
profiles: insecure
36-
35+
config:
36+
activate:
37+
on-profile: insecure
3738
---
3839
spring:
39-
profiles: secure
4040
security:
4141
user:
4242
name: "user"
4343
password: "password"
44+
config:
45+
activate:
46+
on-profile: secure
4447

spring-boot-admin-samples/spring-boot-admin-sample-eureka/src/main/resources/application.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,18 @@ management:
3030

3131
---
3232
spring:
33-
profiles: insecure
34-
33+
config:
34+
activate:
35+
on-profile: insecure
3536
---
3637
spring:
37-
profiles: secure
3838
security:
3939
user:
4040
name: "user"
4141
password: "password"
42+
config:
43+
activate:
44+
on-profile: secure
4245
eureka:
4346
instance:
4447
metadata-map:

spring-boot-admin-samples/spring-boot-admin-sample-hazelcast/src/main/resources/application.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ spring:
2525

2626
---
2727
spring:
28-
profiles: insecure
29-
28+
config:
29+
activate:
30+
on-profile: insecure
3031
---
3132
spring:
32-
profiles: secure
3333
security:
3434
user:
3535
name: "user"
@@ -43,5 +43,8 @@ spring:
4343
metadata:
4444
user.name: "user" #These two are needed so that the server
4545
user.password: "password" #can access the protected client endpoints
46+
config:
47+
activate:
48+
on-profile: secure
4649

4750

spring-boot-admin-samples/spring-boot-admin-sample-reactive/src/main/java/de/codecentric/boot/admin/SpringBootAdminReactiveApplication.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
import org.springframework.security.config.Customizer;
2525
import org.springframework.security.config.web.server.ServerHttpSecurity;
2626
import org.springframework.security.web.server.SecurityWebFilterChain;
27+
import reactor.core.publisher.Mono;
2728

2829
import de.codecentric.boot.admin.server.config.AdminServerProperties;
2930
import de.codecentric.boot.admin.server.config.EnableAdminServer;
30-
import de.codecentric.boot.admin.server.domain.entities.InstanceRepository;
31-
import de.codecentric.boot.admin.server.notify.LoggingNotifier;
31+
import de.codecentric.boot.admin.server.notify.Notifier;
3232

3333
@Configuration(proxyBeanMethods = false)
3434
@EnableAutoConfiguration
@@ -65,8 +65,8 @@ public SecurityWebFilterChain securityWebFilterChainSecure(ServerHttpSecurity ht
6565
}
6666

6767
@Bean
68-
public LoggingNotifier loggerNotifier(InstanceRepository repository) {
69-
return new LoggingNotifier(repository);
68+
public Notifier notifier() {
69+
return (e) -> Mono.empty();
7070
}
7171

7272
}

spring-boot-admin-samples/spring-boot-admin-sample-reactive/src/main/resources/application.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ spring:
2929

3030
---
3131
spring:
32-
profiles: dev
32+
config:
33+
activate:
34+
on-profile: dev
3335
boot:
3436
admin:
3537
ui:
@@ -41,11 +43,11 @@ spring:
4143

4244
---
4345
spring:
44-
profiles: insecure
45-
46+
config:
47+
activate:
48+
on-profile: insecure
4649
---
4750
spring:
48-
profiles: secure
4951
security:
5052
user:
5153
name: "user"
@@ -59,5 +61,8 @@ spring:
5961
metadata:
6062
user.name: "user" #These two are needed so that the server
6163
user.password: "password" #can access the protected client endpoints
64+
config:
65+
activate:
66+
on-profile: secure
6267

6368

0 commit comments

Comments
 (0)