I want to add this header \"Access-Control-Allow-Origin\", \"*\" to every response made to the client whenever a request has made for rest controllers in my application to a
If you want to set headers for controller you can use @ModelAttribute annotation.
@ModelAttribute
@ModelAttribute public void setVaryResponseHeader(HttpServletResponse response) { response.setHeader("Vary", "Accept"); }