How to do it...

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:

  1. 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); 
} 
  1. Start the application by running ./gradlew clean bootRun.
  1. Let's open http://localhost:8080/books/978-1-78528-415-1.1 in the browser to see the following results:
  1. If we enter the correct ISBN, we will see a different result, as follows:
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.66.206