diff --git a/kork-actuator/src/main/resources/META-INF/spring.factories b/kork-actuator/src/main/resources/META-INF/spring.factories index adcedf113..e69de29bb 100644 --- a/kork-actuator/src/main/resources/META-INF/spring.factories +++ b/kork-actuator/src/main/resources/META-INF/spring.factories @@ -1,3 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - com.netflix.spinnaker.kork.actuator.ActuatorEndpointsConfiguration,\ - com.netflix.spinnaker.kork.actuator.ResolvedEnvEndpointAutoConfiguration diff --git a/kork-actuator/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/kork-actuator/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 000000000..2ec0ba41c --- /dev/null +++ b/kork-actuator/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1,2 @@ +com.netflix.spinnaker.kork.actuator.ActuatorEndpointsConfiguration +com.netflix.spinnaker.kork.actuator.ResolvedEnvEndpointAutoConfiguration diff --git a/kork-aws/src/main/resources/META-INF/spring.factories b/kork-aws/src/main/resources/META-INF/spring.factories index 68bfdd1d5..e69de29bb 100644 --- a/kork-aws/src/main/resources/META-INF/spring.factories +++ b/kork-aws/src/main/resources/META-INF/spring.factories @@ -1,2 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - com.netflix.spinnaker.kork.aws.AwsComponents diff --git a/kork-aws/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/kork-aws/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 000000000..38e572f03 --- /dev/null +++ b/kork-aws/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.netflix.spinnaker.kork.aws.AwsComponents diff --git a/kork-cloud-config-server/src/main/resources/META-INF/spring.factories b/kork-cloud-config-server/src/main/resources/META-INF/spring.factories index f6c1e8bca..3f35e6924 100644 --- a/kork-cloud-config-server/src/main/resources/META-INF/spring.factories +++ b/kork-cloud-config-server/src/main/resources/META-INF/spring.factories @@ -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 diff --git a/kork-cloud-config-server/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/kork-cloud-config-server/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 000000000..fee943ed0 --- /dev/null +++ b/kork-cloud-config-server/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -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 diff --git a/kork-core/src/main/resources/META-INF/spring.factories b/kork-core/src/main/resources/META-INF/spring.factories index 18c0c8d3c..4e47472ea 100644 --- a/kork-core/src/main/resources/META-INF/spring.factories +++ b/kork-core/src/main/resources/META-INF/spring.factories @@ -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 diff --git a/kork-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/kork-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 000000000..87c694b25 --- /dev/null +++ b/kork-core/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1,2 @@ +com.netflix.spinnaker.kork.PlatformComponents +com.netflix.spinnaker.kork.discovery.DiscoveryAutoConfiguration diff --git a/kork-credentials/src/main/resources/META-INF/spring.factories b/kork-credentials/src/main/resources/META-INF/spring.factories index f5f6e2c7f..8b1378917 100644 --- a/kork-credentials/src/main/resources/META-INF/spring.factories +++ b/kork-credentials/src/main/resources/META-INF/spring.factories @@ -1,2 +1 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - com.netflix.spinnaker.credentials.jackson.SensitiveAutoConfiguration + diff --git a/kork-credentials/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/kork-credentials/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 000000000..a72b954e9 --- /dev/null +++ b/kork-credentials/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.netflix.spinnaker.credentials.jackson.SensitiveAutoConfiguration diff --git a/kork-eureka/src/main/resources/META-INF/spring.factories b/kork-eureka/src/main/resources/META-INF/spring.factories index 8e253a0e3..8b1378917 100644 --- a/kork-eureka/src/main/resources/META-INF/spring.factories +++ b/kork-eureka/src/main/resources/META-INF/spring.factories @@ -1,3 +1 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - com.netflix.spinnaker.kork.archaius.ArchaiusAutoConfiguration,\ - com.netflix.spinnaker.kork.eureka.EurekaAutoConfiguration + diff --git a/kork-eureka/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/kork-eureka/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 000000000..cc5799d2e --- /dev/null +++ b/kork-eureka/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1,2 @@ +com.netflix.spinnaker.kork.archaius.ArchaiusAutoConfiguration +com.netflix.spinnaker.kork.eureka.EurekaAutoConfiguration diff --git a/kork-retrofit/src/main/resources/META-INF/spring.factories b/kork-retrofit/src/main/resources/META-INF/spring.factories index bf79b5722..8b1378917 100644 --- a/kork-retrofit/src/main/resources/META-INF/spring.factories +++ b/kork-retrofit/src/main/resources/META-INF/spring.factories @@ -1,2 +1 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - com.netflix.spinnaker.kork.retrofit.RetrofitServiceFactoryAutoConfiguration + diff --git a/kork-retrofit/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/kork-retrofit/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 000000000..fe31dc982 --- /dev/null +++ b/kork-retrofit/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.netflix.spinnaker.kork.retrofit.RetrofitServiceFactoryAutoConfiguration diff --git a/kork-retrofit2/src/main/resources/META-INF/spring.factories b/kork-retrofit2/src/main/resources/META-INF/spring.factories index 237fc6ab6..8b1378917 100644 --- a/kork-retrofit2/src/main/resources/META-INF/spring.factories +++ b/kork-retrofit2/src/main/resources/META-INF/spring.factories @@ -1,2 +1 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - com.netflix.spinnaker.kork.retrofit.Retrofit2ServiceFactoryAutoConfiguration + diff --git a/kork-retrofit2/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/kork-retrofit2/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 000000000..0da5f2481 --- /dev/null +++ b/kork-retrofit2/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.netflix.spinnaker.kork.retrofit.Retrofit2ServiceFactoryAutoConfiguration diff --git a/kork-secrets/src/main/resources/META-INF/spring.factories b/kork-secrets/src/main/resources/META-INF/spring.factories index b6b391607..8b1378917 100644 --- a/kork-secrets/src/main/resources/META-INF/spring.factories +++ b/kork-secrets/src/main/resources/META-INF/spring.factories @@ -1,2 +1 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - com.netflix.spinnaker.kork.secrets.SecretConfiguration + diff --git a/kork-secrets/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/kork-secrets/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 000000000..36b63d9e4 --- /dev/null +++ b/kork-secrets/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.netflix.spinnaker.kork.secrets.SecretConfiguration diff --git a/kork-sql-test/kork-sql-test.gradle b/kork-sql-test/kork-sql-test.gradle index e2a8a0992..fdd79dc92 100644 --- a/kork-sql-test/kork-sql-test.gradle +++ b/kork-sql-test/kork-sql-test.gradle @@ -11,7 +11,7 @@ dependencies { runtimeOnly "com.h2database:h2" - testRuntimeOnly "mysql:mysql-connector-java" + testRuntimeOnly "com.mysql:mysql-connector-j" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine" testRuntimeOnly "org.postgresql:postgresql" } diff --git a/kork-sql/kork-sql.gradle b/kork-sql/kork-sql.gradle index 32623831d..032ef2e05 100644 --- a/kork-sql/kork-sql.gradle +++ b/kork-sql/kork-sql.gradle @@ -22,7 +22,7 @@ dependencies { testImplementation "org.springframework.boot:spring-boot-starter-test" testRuntimeOnly project(":kork-web") - testRuntimeOnly "mysql:mysql-connector-java" + testRuntimeOnly "com.mysql:mysql-connector-j" } detekt { diff --git a/kork-sql/src/main/kotlin/com/netflix/spinnaker/kork/sql/config/DefaultSqlConfiguration.kt b/kork-sql/src/main/kotlin/com/netflix/spinnaker/kork/sql/config/DefaultSqlConfiguration.kt index 73b52ef1e..9ca08a228 100644 --- a/kork-sql/src/main/kotlin/com/netflix/spinnaker/kork/sql/config/DefaultSqlConfiguration.kt +++ b/kork-sql/src/main/kotlin/com/netflix/spinnaker/kork/sql/config/DefaultSqlConfiguration.kt @@ -35,6 +35,7 @@ import org.jooq.impl.DefaultExecuteListenerProvider import org.slf4j.LoggerFactory import org.springframework.beans.factory.BeanCreationException import org.springframework.beans.factory.annotation.Value +import org.springframework.boot.actuate.autoconfigure.metrics.jdbc.DataSourcePoolMetricsAutoConfiguration import org.springframework.boot.autoconfigure.EnableAutoConfiguration import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty @@ -55,7 +56,7 @@ import org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy @Configuration @ConditionalOnProperty("sql.enabled") @EnableConfigurationProperties(SqlProperties::class) -@EnableAutoConfiguration(exclude = [DataSourceAutoConfiguration::class]) +@EnableAutoConfiguration(exclude = [DataSourceAutoConfiguration::class, DataSourcePoolMetricsAutoConfiguration::class]) @Import(HikariDataSourceConfiguration::class, DataSourcePoolMetadataProvidersConfiguration::class) class DefaultSqlConfiguration { diff --git a/kork-swagger/src/main/resources/META-INF/spring.factories b/kork-swagger/src/main/resources/META-INF/spring.factories index 29d91a604..8b1378917 100644 --- a/kork-swagger/src/main/resources/META-INF/spring.factories +++ b/kork-swagger/src/main/resources/META-INF/spring.factories @@ -1,2 +1 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - com.netflix.spinnaker.config.SpringfoxHandlerProviderBeanPostProcessor + diff --git a/kork-swagger/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/kork-swagger/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 000000000..e83bab705 --- /dev/null +++ b/kork-swagger/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.netflix.spinnaker.config.SpringfoxHandlerProviderBeanPostProcessor diff --git a/kork-tomcat/src/main/resources/META-INF/spring.factories b/kork-tomcat/src/main/resources/META-INF/spring.factories index fcf69be06..139597f9c 100644 --- a/kork-tomcat/src/main/resources/META-INF/spring.factories +++ b/kork-tomcat/src/main/resources/META-INF/spring.factories @@ -1,3 +1,2 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - com.netflix.spinnaker.kork.tomcat.TomcatConfiguration + diff --git a/kork-tomcat/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/kork-tomcat/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 000000000..e04c3bfd5 --- /dev/null +++ b/kork-tomcat/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.netflix.spinnaker.kork.tomcat.TomcatConfiguration diff --git a/spinnaker-dependencies/spinnaker-dependencies.gradle b/spinnaker-dependencies/spinnaker-dependencies.gradle index cb2786a00..1c06ff4cf 100644 --- a/spinnaker-dependencies/spinnaker-dependencies.gradle +++ b/spinnaker-dependencies/spinnaker-dependencies.gradle @@ -14,11 +14,10 @@ ext { gcp : "25.3.0", jsch : "0.1.54", jschAgentProxy : "0.0.9", - // spring boot 2.6.15 specifies logback 1.2.12. Pin to 1.2.13 to resolve + // spring boot 2.7.18 specifies logback 1.2.12. Pin to 1.2.13 to resolve // CVE-2023-6378 and CVE-2023-6481 until spring boot 3.1.7 which brings in // 1.4.14. See https://logback.qos.ch/news.html#1.3.12. logback : "1.2.13", - netty : "4.1.100.Final", protobuf : "3.21.12", okhttp : "2.7.5", // CVE-2016-2402 okhttp3 : "4.9.3", @@ -28,14 +27,12 @@ ext { spectator : "1.0.6", spek : "1.1.5", spek2 : "2.0.9", - springBoot : "2.6.15", + springBoot : "2.7.18", springCloud : "2021.0.8", springfoxSwagger : "3.0.0", swagger : "1.5.20", //this should stay in sync with what springfoxSwagger expects. - // Spring boot 2.6.15 bring in 9.0.75. 2.7.18 - // brings in 9.0.83, which fixes all CVEs to date (20-feb-24). - // + // 2.7.18 brings in 9.0.83, which fixes all CVEs to date (20-feb-24). Continue to pin. // See https://tomcat.apache.org/security-9.html for latest security fixes. tomcat : "9.0.83" ] @@ -59,8 +56,6 @@ dependencies { // this project and need to configure gradle plugins etc. api(platform("org.jetbrains.kotlin:kotlin-bom:$kotlinVersion")) api(platform("io.zipkin.brave:brave-bom:${versions.brave}")) - api(platform("org.junit:junit-bom:5.8.2")) // remove with spring boot >= 2.6.2 - api(platform("io.netty:netty-bom:${versions.netty}")) api(platform("org.springframework.boot:spring-boot-dependencies:${versions.springBoot}")) api(platform("com.amazonaws:aws-java-sdk-bom:${versions.aws}")) api(platform("com.google.protobuf:protobuf-bom:${versions.protobuf}")) @@ -180,7 +175,7 @@ dependencies { // pf4j:3.10.0 brings in slf4j-api:2.0.6 which is not compatible with logback 1.2.x. // And the upgraded logback version(1.3.8) is becoming incompatible with SpringBoot's LogbackLoggingSystem: // java.lang.NoClassDefFoundError at LogbackLoggingSystem.java:293 - // Hence pinning slf4j-api at 1.7.36 which spring boot 2.6.15 brings in. + // Hence pinning slf4j-api at 1.7.36 which spring boot 2.7.18 brings in. api("org.slf4j:slf4j-api"){ version { strictly("1.7.36") @@ -188,7 +183,7 @@ dependencies { } api("org.pf4j:pf4j-update:2.3.0") - // Spring boot 2.6.15 brings in snakeyaml 1.29, which fails to parse yaml (including some + // Spring boot 2.7.18 brings in snakeyaml 1.30, which fails to parse yaml (including some // k8s manifests). See https://github.com/spring-projects/spring-boot/issues/30159#issuecomment-1125969155. // It's safe to upgrade beyond 1.29 with spring boot >= 2.6.12 (see // https://github.com/spring-projects/spring-boot/issues/32228#issue-136185850.0). However,