0

As part of SNS optimization we have to change our query parameters to path parameters, so:

/somesite?hl=ja

Has to become: /somesite/hl/ja

How do we do that without adding a separate path to every single @RequestMapping method? It doesn't look like I can do it with an Interceptor. We are using Spring 4

1 Answer 1

1

You can try adding filter instead of interceptor to rewrite the request URI. If you are free to use any third-party library, you can use this http://tuckey.org/urlrewrite/.

Or you can write your own impl in filter method.

Follow this question for implementation. servlet filter to rewrite URL

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.