Issue
Even though I used @CrossOrigin annotation this error still appears. Spring boot app is running on 8080 port and react app is running on 3000 port.
src="https://i.stack.imgur.com/7urvA.png" alt="image of backend controller" />
Error:
If further information is needed, please let me know.
Solution
I assume you are using spring security. @CrossOrigin filter might have a lower precedence over spring security filters. Try to configure CORS using spring security.
Answered By - sanurah
Answer Checked By - Marilyn (JavaFixing Volunteer)