I configured Spring Security to work with JWT . My service is stateless and gives json 's. The problem is that when I try to get a token through the browser, I get the following error:
XMLHttpRequest cannot load http://localhost:7345/login. No 'Access-Control-Allow-Origin' header is present on the requested resource. With a regular controller, I could simply CrossOrigin annotation, but if I create such a controller, it will override my settings in Spring Security .
What to do ?