Restful CRUD API for a simple user management application using Spring Boot, Mysql, JPA and React.
-
Java - 11
-
Maven - 4.0
1. Clone the application
git clone https://github.com/hasancbngl/springboot-react-mysql-restful-Crud.git
2. Create Mysql database
create database db_user
3. Change mysql username and password as per your installation
-
open
src/main/resources/application.properties
-
change
spring.datasource.username
andspring.datasource.password
as per your mysql installation
4. Build and run the app using maven
mvn package
java -jar target/Spring-boot-User-demo.jar
Alternatively, you can run the app without packaging it using -
mvn spring-boot:run
The app will start running at http://localhost:8080.
The app defines following CRUD APIs.
GET /users
POST /users
GET /users/{userId}
PUT /users/{userId}
DELETE /users/{userId}
You can test them using postman or from the UI.
1. Navigate to Frontend folder
cd Frontend
2. Install the dependencies
Run
npm install
or yarn
3. Run the app Locally
Run
npm start
or yarn start
Open http://localhost:3000 to view it in the browser.