0

I am building a Spring boot project where in all my request mapping URLs will map to respective actions in my Controller classes.

For e.g., I have a feature to visit a page which shows the "Book" details given the "book_id". So the URL looks like this

http://my-site.com/viewBookDetailsById?12345

The above URL maps to the action in my Java code as shown below.

@RequestMapping(value = "/viewBookDetailsById", method = RequestMethod.GET)

My goal is to change the URL that comes in browser to something meaningful like below.

http://my-site.com/book_name

How can I convert that URL to some other alias URL even though it should hit the same controller method?

Ilya Ovesnov
  • 4,079
  • 1
  • 27
  • 31
Santhosh Raj
  • 153
  • 3
  • 13

0 Answers0