Inside this directory, you can find the code for the database and the REST API.
- Path:
backend\dbFillingSQL
- I contains the data of the db, the SQL code used for the insertions and some scripts written in powershell and shell for automating the proccess both in Windows and Linux OS.
- Path:
backend\Scripts
- It contains some scripts written in Python, used to generate some repeating Java code, the data of the db and the SQL code of the
dbFillingSQL
directory.
- Path:
backend\src\main\java\gr\ntua\ece\softeng35\backend\models
- It contains the Java code for the structure of the entities of the db.
- Path:
backend\src\main\java\gr\ntua\ece\softeng35\backend\controllers
- It contains the Java code for the REST API endpoints.
- Path:
backend\src\main\resources
- It contains the skeleton of the file for establishing the connection with your database.
- Path:
backend\src\test\java\gr\ntua\ece\softeng35\backend\controllersTests
- It contains the Java code for the unit-functional testing of the backend.
- We consider that Java, Gradle and Gradlew are already installed in your system.
- Create an empty database.
- Inside the directory
\backend\src\main\resources
, add theapplication.properties
file, using theapplication.properties.sample
skeleton (inside the same directory), to connect to your database. - In the
backend
directory, run .\gradlew bootrun. - If you want to use our data, you can use the sql insertions files inside the
dbFillingSQL
directory. - Test the API, following the base url http://localhost:8765/evcharge/api
For further reference, please consider the following sections:
- Official Gradle documentation
- Spring Boot Gradle Plugin Reference Guide
- Create an OCI image
- Spring Web
- Spring Data JDBC
The following guides illustrate how to use some features concretely:
- Building a RESTful Web Service
- Serving Web Content with Spring MVC
- Building REST services with Spring
- Using Spring Data JDBC
- Accessing data with MySQL
These additional references should also help you: