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
I am also face this issue and i have add this code issue fixed.
public static HttpServletResponse getResponse(HttpServletResponse response) {
response.setHeader("Access-Control-Allow-Origin", "*");
response.setCharacterEncoding("UTF-8");
response.setHeader("Access-Control-Allow-Methods", "POST, GET");
response.setHeader("Access-Control-Allow-Headers", "x-requested-with");
return response;
}