Skip to content

Commit dcd9f6f

Browse files
authored
Merge pull request #203 from ekino/chore/spring-imports
chore: use new autoconfiguration import file
2 parents e6c5f13 + 0dabf6b commit dcd9f6f

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ It also requires a Spring Boot **MVC** web application.
1616

1717
| Spring Boot | starter-errors | Kotlin |
1818
|:-----------:|:--------------:|:------:|
19-
| 2.6 | 7.x | 1.6 |
20-
| 2.5 | 5.x | 1.5 |
21-
| 2.4 | 4.x | 1.4 |
22-
| 2.3 | 3.x | 1.3 |
23-
| 2.2 | 2.x | 1.3 |
24-
| 2.1 | 1.x | 1.3 |
19+
| 2.7 | 8.x | 1.6 |
20+
| 2.6 | 7.x | 1.6 |
21+
| 2.5 | 5.x | 1.5 |
22+
| 2.4 | 4.x | 1.4 |
23+
| 2.3 | 3.x | 1.3 |
24+
| 2.2 | 2.x | 1.3 |
25+
| 2.1 | 1.x | 1.3 |
2526

2627
Other combinations might work, but they're not supported.
2728

@@ -30,7 +31,7 @@ Other combinations might work, but they're not supported.
3031
For example with Gradle Kotlin DSL :
3132

3233
```kotlin
33-
implementation("com.ekino.oss.spring:ekino-spring-boot-starter-errors:6.0.0")
34+
implementation("com.ekino.oss.spring:ekino-spring-boot-starter-errors:8.0.0")
3435
```
3536

3637
NB : if you want to use snapshots you need to add the following configuration to your Gradle build script :

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
id("ekino.oss.test")
55
}
66

7-
version = "7.0.1-SNAPSHOT"
7+
version = "8.0.0-SNAPSHOT"
88

99
repositories {
1010
mavenCentral()

buildSrc/src/main/kotlin/ekino.oss.maven-central-publishing.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,6 @@ publishing {
6666
}
6767

6868
signing {
69+
setRequired { gradle.taskGraph.hasTask("publish") }
6970
sign(publishing.publications[publicationName])
7071
}

src/main/kotlin/com/ekino/oss/errors/ErrorsAutoConfiguration.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import com.ekino.oss.errors.handler.SecurityExceptionHandler
77
import com.ekino.oss.errors.handler.TxExceptionHandler
88
import com.ekino.oss.errors.property.ErrorsProperties
99
import org.springframework.beans.factory.annotation.Value
10-
import org.springframework.boot.autoconfigure.AutoConfigureBefore
10+
import org.springframework.boot.autoconfigure.AutoConfiguration
1111
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass
1212
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication
1313
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type.SERVLET
@@ -19,9 +19,8 @@ import org.springframework.context.annotation.Configuration
1919
/**
2020
* We have inner class for some config because using [ConditionalOnClass] on [Bean] methods is not recommended.
2121
*/
22-
@Configuration(proxyBeanMethods = false)
22+
@AutoConfiguration(before = [ErrorMvcAutoConfiguration::class])
2323
@ConditionalOnWebApplication(type = SERVLET)
24-
@AutoConfigureBefore(ErrorMvcAutoConfiguration::class)
2524
@EnableConfigurationProperties(ErrorsProperties::class)
2625
class ErrorsAutoConfiguration(
2726
@param:Value("\${spring.application.name}") private val applicationName: String,

src/main/resources/META-INF/spring.factories

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
com.ekino.oss.errors.ErrorsAutoConfiguration

0 commit comments

Comments
 (0)