From 474d192be847cd141881a5f90898e56236eb255c Mon Sep 17 00:00:00 2001 From: darren <492062702@qq.com> Date: Thu, 16 Mar 2023 22:33:33 +0800 Subject: [PATCH] change problem-spring-web readme --- problem-spring-web/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/problem-spring-web/README.md b/problem-spring-web/README.md index 66444dad..1d83ce67 100644 --- a/problem-spring-web/README.md +++ b/problem-spring-web/README.md @@ -94,6 +94,16 @@ spring: throw-exception-if-no-handler-found: true ``` +Please note this will work in spring boot version less 2.4 if version >=2.4 use below configuration +```yaml +spring: + web: + resources: + add-mappings: false + mvc: + throw-exception-if-no-handler-found: true +``` + If you're using Spring Boot, make sure you disable the `ErrorMvcAutoConfiguration`: ```java