This Spring Boot application serves as a RESTful API backend for an Android note-taking application. It provides endpoints for managing notes stored in a MySQL database as well as datasave saving functionality (MYSQL datasave).
- Java Version: 21
- Spring Boot Version: 3.2.3
- Lombok Version: 1.18.30
Full specs: start-spring-config
- GET
/note/get-all
- Retrieves all notes from the database.
- GET
/note/{note_id}
- Retrieves a specific note by its ID.
- POST
/note
- Creates a new note. The note ID is generated automatically.
- PUT
/note/update
- Updates a note. The updated note information should be provided in the request body.
- DELETE
/note/{note_id}
- Deletes a specific note by its ID.
- DELETE
/note/delete-all
- Deletes all notes from the database.
- Spring Boot
- Spring Data JPA
- MySQL Database
- Lombok
- Make sure you have a MySQL database instance running locally.
- Configure the MySQL connection details in
application.properties
. - Build the project using Maven:
mvn clean install
. - Run the Spring Boot application:
mvn spring-boot:run
. - The application will start at port 9000.
- Spring Boot Starter Data JPA
- Spring Boot Starter Web
- Spring Boot Starter Test
- MySQL Connector/J
- Lombok
- Cross-origin requests are allowed from
http://127.0.0.1:9000
. - Lombok is used for reducing boilerplate code.
Feel free to explore and integrate this API with your Android note-taking application. If you encounter any issues or have suggestions for improvements, please feel free to raise them in the repository's issue tracker.