In this challenge you are going to design the backend of a system that centralizes the services and orders of a restaurant chain that has different branches in the city.
To get a local copy up and running follow these steps.
- JDK 17 https://jdk.java.net/java-se-ri/17
- Gradle https://gradle.org/install/
- MySQL https://dev.mysql.com/downloads/installer/
- MongoDB https://docs.mongodb.com/manual/installation/
- IntelliJ Community https://www.jetbrains.com/idea/download/
- Postman https://www.postman.com/downloads/
- Clone the repository
- Change directory
cd plazamicroservice-pragma-powerup
- In the application-dev.yml file, there is included a database connection to a remote database, if you want to use it, you can skip to the 7th step, otherwise, you can follow the next steps to use a local database
- If you want to use a local database, you can follow the next steps, create a new database in MySQL called powerup
- Update the database connection settings
# src/main/resources/application-dev.yml spring: datasource: url: jdbc:mysql://localhost/powerup username: <your-username> password: <your-password>
- After the tables are created by running the application, execute src/main/resources/data.sql content to populate the database
- Set the user microservice API url in the application-dev.yml file
# src/main/resources/application-dev.yml auth: api: url: <user-microservice-api-url>
- Set the MongoDB connection settings in the application-dev.yml file
# src/main/resources/application-dev.yml spring: data: mongodb: auto-index-creation: true database: <your-database-name> authentication-database: <your-authentication-database> host: <your-host> port: <your-port> username: <your-username> password: <your-password>
- Open Swagger UI and search the /auth/login endpoint and login with mail: [email protected] , password: 1234
- Right-click the class PlazaMicroserviceApplication.java and choose Run
- Open http://localhost:8091/swagger-ui/index.html in your web browser
- Right-click the test folder and choose Run tests with coverage