Languages
[Edit]
EN

Spring Boot 2 - request mapping with not decoded PathVariable (/path/{pathVariable})

4 points
Created by:
maxsior322
347

In this short article, we would like to show how to get not decoded @PathVariable value from URL in Spring Boot 2 MVC request.

Note: as not decoded @PathVariable value we understand: all characters that were escaped/encoded in URI component/segment will be not decoded, e.g. %20 will be not decoded as space (' '), etc.

Simple steps:

1. Create ExampleController.java file:

2. Create PathSegment.java file: 

3. MVCConfig.java file:

See also

Edit
  1. Spring Boot 2 - request mapping with wildcard parameter (/path/**) 
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join