Skip to content

Commit 4657841

Browse files
committed
Fixing Boot 4 breaking changes
1 parent 2af03fd commit 4657841

File tree

24 files changed

+37
-43
lines changed

24 files changed

+37
-43
lines changed

docs/modules/ROOT/pages/property-source-config/configmap-propertysource.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -575,12 +575,12 @@ If you want your application to fail the start-up process in such cases, you can
575575

576576
[#config-map-retry]
577577
You can also make your application retry loading `ConfigMap` property sources on a failure. First, you need to
578-
set `spring.cloud.kubernetes.config.fail-fast=true`. Then you need to add `spring-retry`
579-
and `spring-boot-starter-aop` to your classpath. You can configure retry properties such as
578+
set `spring.cloud.kubernetes.config.fail-fast=true`. Then you need to add `spring-retry`
579+
and `spring-boot-starter-aspectj` to your classpath. You can configure retry properties such as
580580
the maximum number of attempts, backoff options like initial interval, multiplier, max interval by setting the
581581
`spring.cloud.kubernetes.config.retry.*` properties.
582582

583-
NOTE: If you already have `spring-retry` and `spring-boot-starter-aop` on the classpath for some reason
583+
NOTE: If you already have `spring-retry` and `spring-boot-starter-aspectj` on the classpath for some reason
584584
and want to enable fail-fast, but do not want retry to be enabled; you can disable retry for `ConfigMap` `PropertySources`
585585
by setting `spring.cloud.kubernetes.config.retry.enabled=false`.
586586

docs/modules/ROOT/pages/property-source-config/secrets-propertysource.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ When enabled, the `Fabric8SecretsPropertySource` looks up Kubernetes for `Secret
1111
. Named after the application (as defined by `spring.application.name`)
1212
. Matching some labels
1313

14-
*Note:*
14+
*Note:*
1515

1616
By default, consuming Secrets through the API (points 2 and 3 above) *is not enabled* for security reasons. The permission 'list' on secrets allows clients to inspect secrets values in the specified namespace.
1717
Further, we recommend that containers share secrets through mounted volumes.
1818

19-
If you enable consuming Secrets through the API, we recommend that you limit access to Secrets by using an authorization policy, such as RBAC.
19+
If you enable consuming Secrets through the API, we recommend that you limit access to Secrets by using an authorization policy, such as RBAC.
2020
For more information about risks and best practices when consuming Secrets through the API refer to https://kubernetes.io/docs/concepts/configuration/secret/#best-practices[this doc].
2121

2222
If the secrets are found, their data is made available to the application.
@@ -135,16 +135,16 @@ the `Secret` named `s1` would be looked up in the namespace that the application
135135
See xref:property-source-config/namespace-resolution.adoc[namespace-resolution] to get a better understanding of how the namespace
136136
of the application is resolved.
137137

138-
xref:property-source-config/configmap-propertysource.adoc#config-map-fail-fast[Similar to the `ConfigMaps`]; if you want your application to fail to start
138+
xref:property-source-config/configmap-propertysource.adoc#config-map-fail-fast[Similar to the `ConfigMaps`]; if you want your application to fail to start
139139
when it is unable to load `Secrets` property sources, you can set `spring.cloud.kubernetes.secrets.fail-fast=true`.
140140

141141
It is also possible to enable retry for `Secret` property sources xref:property-source-config/configmap-propertysource.adoc#config-map-retry[like the `ConfigMaps`].
142-
As with the `ConfigMap` property sources, first you need to set `spring.cloud.kubernetes.secrets.fail-fast=true`.
143-
Then you need to add `spring-retry` and `spring-boot-starter-aop` to your classpath.
142+
As with the `ConfigMap` property sources, first you need to set `spring.cloud.kubernetes.secrets.fail-fast=true`.
143+
Then you need to add `spring-retry` and `spring-boot-starter-aspectj` to your classpath.
144144
Retry behavior of the `Secret` property sources can be configured by setting the `spring.cloud.kubernetes.secrets.retry.*`
145145
properties.
146146

147-
NOTE: If you already have `spring-retry` and `spring-boot-starter-aop` on the classpath for some reason
147+
NOTE: If you already have `spring-retry` and `spring-boot-starter-aspectj` on the classpath for some reason
148148
and want to enable fail-fast, but do not want retry to be enabled; you can disable retry for `Secrets` `PropertySources`
149149
by setting `spring.cloud.kubernetes.secrets.retry.enabled=false`.
150150

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
org.springframework.boot.env.EnvironmentPostProcessor=\
1+
org.springframework.boot.EnvironmentPostProcessor=\
22
org.springframework.cloud.kubernetes.client.profile.KubernetesClientProfileEnvironmentPostProcessor

spring-cloud-kubernetes-client-config/pom.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@
5959
<artifactId>spring-retry</artifactId>
6060
<optional>true</optional>
6161
</dependency>
62-
<dependency>
63-
<groupId>org.springframework.boot</groupId>
64-
<artifactId>spring-boot-starter-aop</artifactId>
65-
<optional>true</optional>
66-
</dependency>
67-
6862
<dependency>
6963
<groupId>org.springframework.boot</groupId>
7064
<artifactId>spring-boot-health</artifactId>
@@ -107,7 +101,7 @@
107101
</dependency>
108102
<dependency>
109103
<groupId>org.springframework.boot</groupId>
110-
<artifactId>spring-boot-starter-aop</artifactId>
104+
<artifactId>spring-boot-starter-aspectj</artifactId>
111105
<scope>test</scope>
112106
</dependency>
113107
<dependency>

spring-cloud-kubernetes-client-config/src/main/java/org/springframework/cloud/kubernetes/client/config/KubernetesClientConfigDataLocationResolver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
import io.kubernetes.client.openapi.ApiClient;
2020
import io.kubernetes.client.openapi.apis.CoreV1Api;
2121

22-
import org.springframework.boot.BootstrapRegistry;
23-
import org.springframework.boot.ConfigurableBootstrapContext;
22+
import org.springframework.boot.bootstrap.BootstrapRegistry;
23+
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
2424
import org.springframework.boot.context.config.ConfigDataLocation;
2525
import org.springframework.boot.context.config.ConfigDataLocationResolverContext;
2626
import org.springframework.boot.context.config.Profiles;

spring-cloud-kubernetes-client-config/src/test/java/org/springframework/cloud/kubernetes/client/config/KubernetesClientConfigDataLocationResolverTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.junit.jupiter.api.extension.ExtendWith;
2626
import org.mockito.Mockito;
2727

28-
import org.springframework.boot.DefaultBootstrapContext;
28+
import org.springframework.boot.bootstrap.DefaultBootstrapContext;
2929
import org.springframework.boot.context.config.ConfigDataLocation;
3030
import org.springframework.boot.context.config.ConfigDataLocationResolverContext;
3131
import org.springframework.boot.context.config.Profiles;

spring-cloud-kubernetes-client-discovery/src/main/java/org/springframework/cloud/kubernetes/client/discovery/KubernetesClientConfigServerBootstrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import org.apache.commons.logging.Log;
3232
import org.apache.commons.logging.LogFactory;
3333

34-
import org.springframework.boot.BootstrapRegistry;
34+
import org.springframework.boot.bootstrap.BootstrapRegistry;
3535
import org.springframework.cloud.config.client.ConfigServerConfigDataLocationResolver;
3636
import org.springframework.cloud.config.client.ConfigServerConfigDataLocationResolver.PropertyResolver;
3737
import org.springframework.cloud.config.client.ConfigServerInstanceProvider;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
org.springframework.cloud.bootstrap.BootstrapConfiguration=\
22
org.springframework.cloud.kubernetes.client.discovery.KubernetesDiscoveryClientConfigClientBootstrapConfiguration
33

4-
org.springframework.boot.BootstrapRegistryInitializer=\
4+
org.springframework.boot.bootstrap.BootstrapRegistryInitializer=\
55
org.springframework.cloud.kubernetes.client.discovery.KubernetesClientConfigServerBootstrapper
66

spring-cloud-kubernetes-commons/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
</dependency>
6767
<dependency>
6868
<groupId>org.springframework.boot</groupId>
69-
<artifactId>spring-boot-starter-aop</artifactId>
69+
<artifactId>spring-boot-starter-aspectj</artifactId>
7070
<optional>true</optional>
7171
</dependency>
7272
<dependency>

spring-cloud-kubernetes-commons/src/main/java/org/springframework/cloud/kubernetes/commons/config/ConfigUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
import org.apache.commons.logging.Log;
3535
import org.apache.commons.logging.LogFactory;
3636

37-
import org.springframework.boot.BootstrapRegistry;
38-
import org.springframework.boot.ConfigurableBootstrapContext;
37+
import org.springframework.boot.bootstrap.BootstrapRegistry;
38+
import org.springframework.boot.bootstrap.ConfigurableBootstrapContext;
3939
import org.springframework.context.ApplicationListener;
4040
import org.springframework.core.env.Environment;
4141
import org.springframework.core.style.ToStringCreator;

0 commit comments

Comments
 (0)