This is a Spring Boot-based web API that provides a set of RESTful endpoints to interact with a database. It follows standard MVC architecture, providing services for performing CRUD operations on resources.
- RESTful API with full CRUD functionality
- Pagination and sorting for list endpoints
- Validation for request data
- Error handling with standardized responses
- Integration with a database using Spring Data JPA
- Support for Swagger API documentation
- Unit and integration tests
- Java 1.8
- Spring Boot 2.x
- Spring Data JPA - Database integration
- MySQLL - Database (depending on the environment)
- Swagger - API documentation
- Maven - Build tool
- Lombok - Build tool
To run this project, you need the following installed:
- Java 1.5 or higher
- A relational database (MySQL, PostgreSQL)
-
Clone the repository:
git clone https://github.com/GPAPD/springboot-pos-rest-api.git cd springboot-pos-rest-api
-
Build the project:
mvn clean install
-
Set up the database connection in
application.properties
orapplication.yml
:spring.datasource.url=jdbc:mysql://localhost:3306/your-database spring.datasource.username=your-username spring.datasource.password=your-password spring.jpa.hibernate.ddl-auto=update
-
Run the application:
mvn spring-boot:run
-
The API will be available at
http://localhost:8080
.
After running the application, you can access the Swagger UI at: