The AutoCare REST API 🚗🧑🔧 offers a comprehensive solution for managing vehicle services . This developer-friendly project is designed to enhance proficiency with modern Spring applications, providing hands-on experience with real-world scenarios and best practices for backend development.
Goals :
- Enhance problem-solving skills by tackling real-world challenges.
- Gain hands-on experience in modern Web Applications.
- Improve proficiency in Java and related frameworks.
- Learn how to effectively use GitHub.
- Develop skills in documentation and testing.
- Expose Cars data: Retrieve detailed information about cars, including related entities like clients, maintainers, and tools.
- Custom JSON builder: Generate JSON responses with a customizable JSON builder component.
- Framework: Spring Boot v3.2 (Spring v6)
- Languages: Java v17
- Build Tool: Maven v3.9
- Code Formatting: Checkstyle and Spotless
- Version Control: Git
- Clone the repository
git clone <GITHUB_REPOSITORY_URL>
cd autocare-rest-api
- Build
./mvnw clean install
- Run
./mvnw spring-boot:run "-Dspring-boot.run.profiles=demo"
Note: Currently, the app doesn't have endpoints for CRUD operations yet (except one GET/api/cars
). The demo
profile refers to ../configs/LoadDatabase
, which helps to fill database with some data at runtime.
- Check Endpoint:
From Web-browser (or Postman) check the following URL http://localhost:8080/api/cars
with GET
HTTP method :
- Check Database:
We use H2 Database to demonstrate the app while in DEV mode. SpringBoot autoconfigures H2 database :
Check the app's log, make sure to have something like this :
INFO ... Added connection conn0: url=jdbc:h2:mem:a917d8a4-bb16-46a1-84a4-f59d60f01ca8 user=SA
INFO ... H2 console available at '/h2-console'. Database available at 'jdbc:h2:mem:a917d8a4-bb16-46a1-84a4-f59d60f01ca8'
Next, from web-browser, try the following URL : http://localhost:8080/h2-console
. This will take you to H2 console webpage:
Copy, paste your database URL and username from your app's log and press on Connect
button :
There you go 🎉!
If you want to dive in this project and help us to improve it, please read and follow our contributing guidelines.
You can join us on Together Java Discord server: brainstorm ideas, ask questions, and collaborate with others. Be respectful and follow the server guidelines. We have a dedicated channel for this project.