diff --git a/README.md b/README.md index d6b4ab4..5822c20 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,13 @@ It also requires a Spring Boot **MVC** web application. | Spring Boot | starter-errors | Kotlin | |:-----------:|:--------------:|:------:| -| 2.6 | 7.x | 1.6 | -| 2.5 | 5.x | 1.5 | -| 2.4 | 4.x | 1.4 | -| 2.3 | 3.x | 1.3 | -| 2.2 | 2.x | 1.3 | -| 2.1 | 1.x | 1.3 | +| 2.7 | 8.x | 1.6 | +| 2.6 | 7.x | 1.6 | +| 2.5 | 5.x | 1.5 | +| 2.4 | 4.x | 1.4 | +| 2.3 | 3.x | 1.3 | +| 2.2 | 2.x | 1.3 | +| 2.1 | 1.x | 1.3 | Other combinations might work, but they're not supported. @@ -30,7 +31,7 @@ Other combinations might work, but they're not supported. For example with Gradle Kotlin DSL : ```kotlin -implementation("com.ekino.oss.spring:ekino-spring-boot-starter-errors:6.0.0") +implementation("com.ekino.oss.spring:ekino-spring-boot-starter-errors:8.0.0") ``` NB : if you want to use snapshots you need to add the following configuration to your Gradle build script : diff --git a/build.gradle.kts b/build.gradle.kts index 3538623..4be1bf7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ plugins { id("ekino.oss.test") } -version = "7.0.1-SNAPSHOT" +version = "8.0.0-SNAPSHOT" repositories { mavenCentral() diff --git a/buildSrc/src/main/kotlin/ekino.oss.maven-central-publishing.gradle.kts b/buildSrc/src/main/kotlin/ekino.oss.maven-central-publishing.gradle.kts index da52aa1..43f7e81 100644 --- a/buildSrc/src/main/kotlin/ekino.oss.maven-central-publishing.gradle.kts +++ b/buildSrc/src/main/kotlin/ekino.oss.maven-central-publishing.gradle.kts @@ -66,5 +66,6 @@ publishing { } signing { + setRequired { gradle.taskGraph.hasTask("publish") } sign(publishing.publications[publicationName]) } diff --git a/src/main/kotlin/com/ekino/oss/errors/ErrorsAutoConfiguration.kt b/src/main/kotlin/com/ekino/oss/errors/ErrorsAutoConfiguration.kt index 13dbf04..bc64593 100644 --- a/src/main/kotlin/com/ekino/oss/errors/ErrorsAutoConfiguration.kt +++ b/src/main/kotlin/com/ekino/oss/errors/ErrorsAutoConfiguration.kt @@ -7,7 +7,7 @@ import com.ekino.oss.errors.handler.SecurityExceptionHandler import com.ekino.oss.errors.handler.TxExceptionHandler import com.ekino.oss.errors.property.ErrorsProperties import org.springframework.beans.factory.annotation.Value -import org.springframework.boot.autoconfigure.AutoConfigureBefore +import org.springframework.boot.autoconfigure.AutoConfiguration import org.springframework.boot.autoconfigure.condition.ConditionalOnClass import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type.SERVLET @@ -19,9 +19,8 @@ import org.springframework.context.annotation.Configuration /** * We have inner class for some config because using [ConditionalOnClass] on [Bean] methods is not recommended. */ -@Configuration(proxyBeanMethods = false) +@AutoConfiguration(before = [ErrorMvcAutoConfiguration::class]) @ConditionalOnWebApplication(type = SERVLET) -@AutoConfigureBefore(ErrorMvcAutoConfiguration::class) @EnableConfigurationProperties(ErrorsProperties::class) class ErrorsAutoConfiguration( @param:Value("\${spring.application.name}") private val applicationName: String, diff --git a/src/main/resources/META-INF/spring.factories b/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 9f3486a..0000000 --- a/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,2 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ -com.ekino.oss.errors.ErrorsAutoConfiguration diff --git a/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000..0ef4088 --- /dev/null +++ b/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.ekino.oss.errors.ErrorsAutoConfiguration