Sample CRUD project based on Spring Boot, Spring Data, Mysql
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Java JDK 8
- Get the project from GIT "git clone https://github.com/popovski/iw-library-spring-boot"
- Set datasource url of your MYSQL DB application.properties -> spring.datasource.url
- Set mysql user value into application.properties -> spring.datasource.username
- Set mysql user password value into application.properties -> spring.datasource.password
- go to root directory of the project
- mvnw clean package
- java -jar .\target\iw-labs-crud-library-0.0.1-SNAPSHOT.jar
docker compose up -d
.\mvnw test - command for running the junit tests
- Spring Boot
- Maven - Dependency Management
- MySql
After you start the application the server will listen on port 8090
Swagger documentation http://localhost:8090/swagger-ui.html
Helpfull links
-
Get all books
HTTP GET localhost:8090/api/books/ -
Create new book
HTTP POST localhost:8090/api/books/
Payload Json Body
{ "title": "NEW TITLE", "description": "NEW DESCRIPTION" } -
Update existing book
HTTP PUT localhost:8090/api/books/ - comment replace UUID with existing book UUID
Payload Json Body
{ "title": "UPDATE TITLE", "description": "UPDATE DESCRIPTION" } -
Delete Resource
localhost:8090/api/books/ - comment replace UUID with existing book UUID
- Nikola Popovski - Initial work - Repository
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details