An example to demonstrate API development by using Spring Boot, JPA, H2 in memory db with multithreading
Before running this project, make sure you have the following prerequisites:
- Java 11 or higher installed
-
Clone the repository:
git clone git@github.com:niteshsinghrajput/spring-boot-multithreading.git
-
Navigate to the project directory:
cd spring-boot-multithreading -
Build the project
./gradlew clean build
-
Run the application
java -jar .\build\libs\spring-boot-multithreading-0.0.1-SNAPSHOT.jar
Once the application is running, you can access the API endpoints using a tool like Postman or cURL.
- GET
/users: Get all users- Sample URL:
http://localhost:8080/users
- Sample URL:
- POST
/users: Create a new employee- Sample URL:
http://localhost:8080/users - It will take a csv file with name, email, gender columns
- Sample URL:
The application configuration can be found in the application.properties file. You can modify the H2 DB connection details, such as the host, port, and database name, in this file.