Configuring route matching patterns

When we build web applications, it is not always the case that a default, out-of-the-box, mapping configuration is applicable. At times, we want to create our RESTful URLs that contain characters such as . (dot), which Spring treats as a delimiter defining format, for example the dot in path.xml, or we might not want to recognize a trailing slash, as in /home/, and so on. Conveniently, Spring provides us with a way to get this accomplished with ease.

In Chapter 2, Configuring Web Applications, we introduced a WebConfiguration class, which extends from WebMvcConfigurerAdapter. This extension allows us to override methods that are geared toward adding filters, formatters, and many more. It also has methods that ...

Get Spring Boot Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.