Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vesalukkarila/songs-api
A RESTful API for managing songs, Spring MVC.
https://github.com/vesalukkarila/songs-api
personal plain-spring spring-mvc
Last synced: about 2 months ago
JSON representation
A RESTful API for managing songs, Spring MVC.
- Host: GitHub
- URL: https://github.com/vesalukkarila/songs-api
- Owner: vesalukkarila
- Created: 2024-06-11T12:33:41.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-11-15T16:35:40.000Z (3 months ago)
- Last Synced: 2024-12-07T13:42:16.577Z (about 2 months ago)
- Topics: personal, plain-spring, spring-mvc
- Language: Java
- Homepage: https://vesalukkarila.github.io/songs-api/
- Size: 134 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# songs-api
My very first RESTful API for managing songs, implemented using **plain Spring features without Spring Boot**.
This project provides CRUD functionality for song records, utilizing Spring MVC, Spring Validation, and a custom in-memory database (H2).## Technologies Used
- Java 19
- Spring MVC
- H2 Database
- Hibernate Validator
- JUnit 5 and Mockito for testing
- Docker
- GitHub Actions (for CI/CD to automatically deploy documentation to GitHub Pages)## Getting Started
To run the application, you have two choices:
1. Run locally
2. Run in Docker### Locally
1. Ensure all the dependencies are installed
2. Clone the repository
3. Build the project using Maven:
```sh
mvn clean install
```
4. Run the application with:
```sh
java -jar target/songsapi-1.0-SNAPSHOT.jar
```### Run in Docker
1. Build the image:
```shell
docker build . -t songs-api:latest
```
2. Run the image:
```shell
docker run -it -p 8080:8080 songs-api:latest
```
3. Open the api in http://localhost:8080## Documentation
Since this project is developed in plain Spring (which doesn't seem to natively support Swagger),
the OpenAPI specification has been **manually** written to describe the API endpoints, request bodies, responses, and error handling.
Documentation is hosted at github pages:
https://vesalukkarila.github.io/songs-api/