Relative Content

Tag Archive for reactjsspring-boot

CORS blocking data from going from front end to back end

I’m new in web developpement , I’m trying to make an app to adminitser medical records using spring boot in the backend and reactjs in the frontend.I created all the necesseray code in the backend and in the frontend but I really can’t make the link between them.Needless to say that as a beginner who is pressured by time , all the code in here ismade out of research .here is the code I wrote for the CORS configuration

id value not being correctly passed to Account List Page

Newbie here and I’ve been learning to use spring boot and react for web development by working on a banking application project. Right now, I’m trying to create a function on the app that allows the logged in user to create a new bank account. however, due to how my endpoints are setup, creating a new account for a user requires the user’s userId, which is just an integer value. I’ve verified that my GET endpoint for fetching a user’s information including the ID and the POST endpoint for creating a new account work on the backend through postman, but when I try to create a new account on my frontend interface, i get Error 404, and I’m not sure why. Here is my loginpage code:

Spring Boot + React application: list from GET request not appearing on webpage

I’m a beginner and have been trying to learn web development by creating a basic full stack banking web application with spring boot for backend and react for the frontend. Its been going decently, however im stuck at this part where upon logging in with an authenticated user, it is supposed to direct you to a page with the header “Accounts List” and a bulleted list of the user’s accounts. When I log in, it brings me to this page, except all it displays is the header, without the list of accounts. I don’t get any error messages upon logging in, and I’ve also tested the GET request endpoint for fetching the list of a user’s accounts in postman, and it works fine on there. Does anyone have any advice for what might be causing this? Here is my .js file for the Account List Page: