We will configure our application to not use the suffix pattern match of .* and to not strip the values after the dot when parsing the parameters. Let's perform the following steps:
- Let's add the necessary configuration to our WebConfiguration class with the following content:
@Override public void configurePathMatch(PathMatchConfigurer configurer) { configurer.setUseSuffixPatternMatch(false). setUseTrailingSlashMatch(true); }
- Start the application by running ./gradlew clean bootRun.
- Let's open http://localhost:8080/books/978-1-78528-415-1.1 in the browser to see the following results:
- If we enter the correct ISBN, we will see a different result, as follows: