-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Description
The Spring Boot migration guide links https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-developing-web-applications.html#boot-features-spring-mvc-pathmatch for migrating MVC endpoints with suffix matching. There the documentation says
Spring Boot chooses to disable suffix pattern matching by default, which means that requests like "GET /projects/spring-boot.json" won’t be matched to @GetMapping("/projects/spring-boot") mappings. ... If you understand the caveats and would still like your application to use suffix pattern matching, the following configuration is required:
spring.mvc.contentnegotiation.favor-path-extension=true
...
That is not accurate, the given example will still not work. I suggest you also mention to add the following property
spring.mvc.pathmatch.use-suffix-pattern=true
Only then it works as with Spring 4.