Skip to content
Advertisement

spring boot and reactjs for frontend was working fine till i add security to the backend

spring boot and reactjs for frontend was working fine till i add security to the backend then, it stopped showing me this below info in the webbrowser.

JavaScript

the error i get is this:

xhr.js:177 GET http://localhost:8080/users/user1/todos 401

here is the frontend:

JavaScript

lastly here is my security class:

JavaScript

update:

It did work, thank you very much!

can you please tell me how to make these below codes to work with your code? when i put them together it does work:

JavaScript

Advertisement

Answer

You need to add config about authentication type:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement