Spring Boot Disable /error mapping

前端 未结 3 1335
南笙
南笙 2020-12-28 14:41

I am creating an API with Spring Boot so wish to disable the /error mapping.

I have set the following props in application.properties:

s         


        
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-28 15:31

    Attributes should be specified via @SpringBootApplication. Example in Kotlin:

    @SpringBootApplication(exclude = [ErrorMvcAutoConfiguration::class])
    class SpringBootLauncher {
    

提交回复
热议问题