fix kotlin spring boot configuration conflict (#19515)

This commit is contained in:
Evgeny Shichenko 2024-09-09 06:03:18 +03:00 committed by GitHub
parent 8511a533d6
commit 0026e15030
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 28 additions and 14 deletions

View File

@ -1,5 +1,6 @@
package {{apiPackage}}
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
@ -11,7 +12,7 @@ sealed class ApiException(msg: String, val code: Int) : Exception(msg)
class NotFoundException(msg: String, code: Int = HttpStatus.NOT_FOUND.value()) : ApiException(msg, code)
@Configuration("{{apiPackage}}.DefaultExceptionHandler")
@ControllerAdvice
class DefaultExceptionHandler {

View File

@ -1,5 +1,6 @@
package org.openapitools.api
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
@ -11,7 +12,7 @@ sealed class ApiException(msg: String, val code: Int) : Exception(msg)
class NotFoundException(msg: String, code: Int = HttpStatus.NOT_FOUND.value()) : ApiException(msg, code)
@Configuration("org.openapitools.api.DefaultExceptionHandler")
@ControllerAdvice
class DefaultExceptionHandler {

View File

@ -1,5 +1,6 @@
package org.openapitools.api
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
@ -11,7 +12,7 @@ sealed class ApiException(msg: String, val code: Int) : Exception(msg)
class NotFoundException(msg: String, code: Int = HttpStatus.NOT_FOUND.value()) : ApiException(msg, code)
@Configuration("org.openapitools.api.DefaultExceptionHandler")
@ControllerAdvice
class DefaultExceptionHandler {

View File

@ -1,5 +1,6 @@
package org.openapitools.api
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
@ -11,7 +12,7 @@ sealed class ApiException(msg: String, val code: Int) : Exception(msg)
class NotFoundException(msg: String, code: Int = HttpStatus.NOT_FOUND.value()) : ApiException(msg, code)
@Configuration("org.openapitools.api.DefaultExceptionHandler")
@ControllerAdvice
class DefaultExceptionHandler {

View File

@ -1,5 +1,6 @@
package org.openapitools.api
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
@ -11,7 +12,7 @@ sealed class ApiException(msg: String, val code: Int) : Exception(msg)
class NotFoundException(msg: String, code: Int = HttpStatus.NOT_FOUND.value()) : ApiException(msg, code)
@Configuration("org.openapitools.api.DefaultExceptionHandler")
@ControllerAdvice
class DefaultExceptionHandler {

View File

@ -1,5 +1,6 @@
package org.openapitools.api
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
@ -11,7 +12,7 @@ sealed class ApiException(msg: String, val code: Int) : Exception(msg)
class NotFoundException(msg: String, code: Int = HttpStatus.NOT_FOUND.value()) : ApiException(msg, code)
@Configuration("org.openapitools.api.DefaultExceptionHandler")
@ControllerAdvice
class DefaultExceptionHandler {

View File

@ -1,5 +1,6 @@
package org.openapitools.api
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
@ -11,7 +12,7 @@ sealed class ApiException(msg: String, val code: Int) : Exception(msg)
class NotFoundException(msg: String, code: Int = HttpStatus.NOT_FOUND.value()) : ApiException(msg, code)
@Configuration("org.openapitools.api.DefaultExceptionHandler")
@ControllerAdvice
class DefaultExceptionHandler {

View File

@ -1,5 +1,6 @@
package org.openapitools.api
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
@ -11,7 +12,7 @@ sealed class ApiException(msg: String, val code: Int) : Exception(msg)
class NotFoundException(msg: String, code: Int = HttpStatus.NOT_FOUND.value()) : ApiException(msg, code)
@Configuration("org.openapitools.api.DefaultExceptionHandler")
@ControllerAdvice
class DefaultExceptionHandler {

View File

@ -1,5 +1,6 @@
package org.openapitools.api
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
@ -11,7 +12,7 @@ sealed class ApiException(msg: String, val code: Int) : Exception(msg)
class NotFoundException(msg: String, code: Int = HttpStatus.NOT_FOUND.value()) : ApiException(msg, code)
@Configuration("org.openapitools.api.DefaultExceptionHandler")
@ControllerAdvice
class DefaultExceptionHandler {

View File

@ -1,5 +1,6 @@
package org.openapitools.api
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
@ -11,7 +12,7 @@ sealed class ApiException(msg: String, val code: Int) : Exception(msg)
class NotFoundException(msg: String, code: Int = HttpStatus.NOT_FOUND.value()) : ApiException(msg, code)
@Configuration("org.openapitools.api.DefaultExceptionHandler")
@ControllerAdvice
class DefaultExceptionHandler {

View File

@ -1,5 +1,6 @@
package org.openapitools.api
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
@ -11,7 +12,7 @@ sealed class ApiException(msg: String, val code: Int) : Exception(msg)
class NotFoundException(msg: String, code: Int = HttpStatus.NOT_FOUND.value()) : ApiException(msg, code)
@Configuration("org.openapitools.api.DefaultExceptionHandler")
@ControllerAdvice
class DefaultExceptionHandler {

View File

@ -1,5 +1,6 @@
package org.openapitools.api
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
@ -11,7 +12,7 @@ sealed class ApiException(msg: String, val code: Int) : Exception(msg)
class NotFoundException(msg: String, code: Int = HttpStatus.NOT_FOUND.value()) : ApiException(msg, code)
@Configuration("org.openapitools.api.DefaultExceptionHandler")
@ControllerAdvice
class DefaultExceptionHandler {

View File

@ -1,5 +1,6 @@
package org.openapitools.api
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
@ -11,7 +12,7 @@ sealed class ApiException(msg: String, val code: Int) : Exception(msg)
class NotFoundException(msg: String, code: Int = HttpStatus.NOT_FOUND.value()) : ApiException(msg, code)
@Configuration("org.openapitools.api.DefaultExceptionHandler")
@ControllerAdvice
class DefaultExceptionHandler {

View File

@ -1,5 +1,6 @@
package org.openapitools.api
import org.springframework.context.annotation.Configuration
import org.springframework.http.HttpStatus
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
@ -11,7 +12,7 @@ sealed class ApiException(msg: String, val code: Int) : Exception(msg)
class NotFoundException(msg: String, code: Int = HttpStatus.NOT_FOUND.value()) : ApiException(msg, code)
@Configuration("org.openapitools.api.DefaultExceptionHandler")
@ControllerAdvice
class DefaultExceptionHandler {