0

I am writing a code which can be accessed using jsonp. I need to pass a callback method from java script to spring boot

3 Answers 3

1

use ControllerAdvice

 @ControllerAdvice
    static class JsonpAdvice extends AbstractJsonpResponseBodyAdvice {

        public JsonpAdvice() {
            super("callback");
        }
    }
Sign up to request clarification or add additional context in comments.

Comments

1

You can use @ControllerAdvice in spring boot

Comments

0

Use @ControllerAdvice

For more detail, visit documentation

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.