-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(dependency): upgrade spring boot from 2.6.x to 2.7.x (#1186)
Unpin netty-bom to align with spring boot during upgrade to spring boot 2.7.x With spring boot 2.7.18, separate dependency management for netty-tcnative has been removed in favor of the dependency management provided by Netty’s bom. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes#separate-dependency-management-for-netty-tcnative-removed Exclude DataSourcePoolMetricsAutoConfiguration class from auto-configuration to resolve circular reference issue during upgrade to spring boot 2.7.x While upgrading spring boot 2.7.18, encounter below error during test compilation of kork-sql module: ``` *************************** APPLICATION FAILED TO START *************************** Description: The dependencies of some of the beans in the application context form a cycle: ┌─────┐ | registry defined in class path resource [com/netflix/spinnaker/kork/metrics/SpectatorConfiguration.class] ↑ ↓ | simpleMeterRegistry defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/export/simple/SimpleMetricsExportAutoConfiguration.class] ↑ ↓ | dataSourcePoolMetadataMeterBinder defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/jdbc/DataSourcePoolMetricsAutoConfiguration$DataSourcePoolMetadataMetricsConfiguration.class] ↑ ↓ | dataSource defined in class path resource [com/netflix/spinnaker/kork/sql/config/DefaultSqlConfiguration.class] ↑ ↓ | dataSourceFactory defined in class path resource [com/netflix/spinnaker/kork/sql/config/HikariDataSourceConfiguration.class] ↑ ↓ | hikariMetricsTrackerFactory defined in class path resource [com/netflix/spinnaker/kork/sql/config/HikariDataSourceConfiguration.class] └─────┘ Action: Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove the dependency cycle between beans. As a last resort, it may be possible to break the cycle automatically by setting spring.main.allow-circular-references to true. ``` To fix circular reference issue excluded the `org.springframework.boot.actuate.autoconfigure.metrics.jdbc.DataSourcePoolMetricsAutoConfiguration` class from auto-configuration while building sql configuration in `DefaultSqlConfiguration` class. Replace spring.factories with AutoConfiguration.imports file to enable auto-configuration during upgrade to spring boot 2.7.x In spring boot 2.7.x, major change has been introduced for auto-configuration registration. The registration has been moved from spring.factories under the org.springframework.boot.autoconfigure.EnableAutoConfiguration key to a new file named META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes#changes-to-auto-configuration So, replacing the registration of auto-configuration classes from spring.factories to META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports. Update mysql connector coordinate during upgrade to spring boot 2.7.x In spring boot 2.7.8 onwards mysql connector coordinate `mysql:mysql-connector-java` has been removed and only `com.mysql:mysql-connector-j` coordinate exist. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes#mysql-jdbc-driver So, updating the mysql connector coordinate as `com.mysql:mysql-connector-j` with spring boot upgrade to 2.7.18. https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.7.18/spring-boot-dependencies-2.7.18.pom Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
fba3eea
commit 8180419
Showing
26 changed files
with
33 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ | ||
com.netflix.spinnaker.kork.actuator.ActuatorEndpointsConfiguration,\ | ||
com.netflix.spinnaker.kork.actuator.ResolvedEnvEndpointAutoConfiguration | ||
2 changes: 2 additions & 0 deletions
2
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
com.netflix.spinnaker.kork.actuator.ActuatorEndpointsConfiguration | ||
com.netflix.spinnaker.kork.actuator.ResolvedEnvEndpointAutoConfiguration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +0,0 @@ | ||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ | ||
com.netflix.spinnaker.kork.aws.AwsComponents | ||
1 change: 1 addition & 0 deletions
1
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.netflix.spinnaker.kork.aws.AwsComponents |
5 changes: 0 additions & 5 deletions
5
kork-cloud-config-server/src/main/resources/META-INF/spring.factories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,2 @@ | ||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ | ||
com.netflix.spinnaker.kork.configserver.autoconfig.CloudConfigAutoConfiguration, \ | ||
com.netflix.spinnaker.kork.configserver.autoconfig.SpringCloudAwsConfiguration, \ | ||
com.netflix.spinnaker.kork.configserver.autoconfig.SpringCloudAwsS3ResourceLoaderConfiguration, \ | ||
io.awspring.cloud.context.config.annotation.ContextResourceLoaderConfiguration | ||
org.springframework.context.ApplicationListener=\ | ||
com.netflix.spinnaker.kork.configserver.CloudConfigApplicationListener |
4 changes: 4 additions & 0 deletions
4
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
com.netflix.spinnaker.kork.configserver.autoconfig.CloudConfigAutoConfiguration | ||
com.netflix.spinnaker.kork.configserver.autoconfig.SpringCloudAwsConfiguration | ||
com.netflix.spinnaker.kork.configserver.autoconfig.SpringCloudAwsS3ResourceLoaderConfiguration | ||
io.awspring.cloud.context.config.annotation.ContextResourceLoaderConfiguration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ | ||
com.netflix.spinnaker.kork.PlatformComponents,\ | ||
com.netflix.spinnaker.kork.discovery.DiscoveryAutoConfiguration | ||
|
||
|
||
org.springframework.context.ApplicationListener=\ | ||
com.netflix.spinnaker.kork.spring.SpringBoot1CompatibilityApplicationListener,\ | ||
com.netflix.spinnaker.kork.web.exceptions.DefaultThreadUncaughtExceptionHandler |
2 changes: 2 additions & 0 deletions
2
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
com.netflix.spinnaker.kork.PlatformComponents | ||
com.netflix.spinnaker.kork.discovery.DiscoveryAutoConfiguration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ | ||
com.netflix.spinnaker.credentials.jackson.SensitiveAutoConfiguration | ||
|
1 change: 1 addition & 0 deletions
1
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.netflix.spinnaker.credentials.jackson.SensitiveAutoConfiguration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ | ||
com.netflix.spinnaker.kork.archaius.ArchaiusAutoConfiguration,\ | ||
com.netflix.spinnaker.kork.eureka.EurekaAutoConfiguration | ||
|
2 changes: 2 additions & 0 deletions
2
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
com.netflix.spinnaker.kork.archaius.ArchaiusAutoConfiguration | ||
com.netflix.spinnaker.kork.eureka.EurekaAutoConfiguration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ | ||
com.netflix.spinnaker.kork.retrofit.RetrofitServiceFactoryAutoConfiguration | ||
|
1 change: 1 addition & 0 deletions
1
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.netflix.spinnaker.kork.retrofit.RetrofitServiceFactoryAutoConfiguration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ | ||
com.netflix.spinnaker.kork.retrofit.Retrofit2ServiceFactoryAutoConfiguration | ||
|
1 change: 1 addition & 0 deletions
1
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.netflix.spinnaker.kork.retrofit.Retrofit2ServiceFactoryAutoConfiguration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ | ||
com.netflix.spinnaker.kork.secrets.SecretConfiguration | ||
|
1 change: 1 addition & 0 deletions
1
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.netflix.spinnaker.kork.secrets.SecretConfiguration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ | ||
com.netflix.spinnaker.config.SpringfoxHandlerProviderBeanPostProcessor | ||
|
1 change: 1 addition & 0 deletions
1
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.netflix.spinnaker.config.SpringfoxHandlerProviderBeanPostProcessor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ | ||
com.netflix.spinnaker.kork.tomcat.TomcatConfiguration | ||
|
||
|
1 change: 1 addition & 0 deletions
1
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.netflix.spinnaker.kork.tomcat.TomcatConfiguration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters