About • Features • Todo • How it works • Tech Stack • How to contribute • Author
Parking management Spring Boot REST API with PostgreSQL database and Object-Relational Mapping made with Spring Data JPA (Hibernate). The application features unit tests for DTOs, services and controllers. The development followed TDD principles.
- REST API
- Relational database (PostgreSQL)
- Object-Relational Mapping
- JPA with Hibernate
- CORS
- Layered structure divided into Entities, Repositories, Services and Controllers
- Unit Tests with JUnit and Mockito
- Set date and time format to UTC globally
- Add pagination to GET requests
- Complete endpoints section on README
- Add integration tests
Before getting started, you will need to have the following tools installed on your machine:
In addition, you might also want an IDE to work with the code, like IntelliJ IDEA.
git clone https://github.com/alexbraga/parking-control.git
- Create
parking-control/server/src/main/resources/application.properties
and set the environment variables:
spring.datasource.url= jdbc:postgresql://localhost:5432/parking-control-db
spring.datasource.username=postgres
spring.datasource.password=
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
Navigate to the root directory of the project
cd parking-control
Build the project
mvn compile
Run the application
mvn spring-boot:run
-
Alternatively, open the project folder with your preferred IDE and run
/src/main/java/com/example/parkingcontrol/ParkingControlApplication.java
-
The server will start at
localhost:8080
Soon
The following tools were used in the construction of the project:
- Spring Web
- Spring Data JPA
- SpringBoot Validation
- PostgreSQL
- Hamcrest
See the file pom.xml
- Dependency Manager: Maven
- IDE: IntelliJ IDEA
- API Testing: Postman
- Fork the project
- Create a new branch with your changes:
git checkout -b my-amazing-feature
- Save your changes and create a commit message (in present tense) telling what you did:
git commit -m "Add my amazing feature"
- Submit your changes:
git push origin my-amazing-feature
- Create a pull request