The Answer King REST API is the backend for a fast food business. It allows products and categories to be created and orders to be placed. A product can be included in multiple categories.
To run the project using docker, navigate to the project directory and execute the following commands:
./mvnw clean install
docker-compose build
docker-compose up
.\mvnw.cmd clean install
docker-compose build
docker-compose up
To run the project using the Spring Boot Maven Plugin update the datasource properties for the dev profile in src/main/resources/application.yaml.
Then, navigate to the project directory and enter the following command:
mvn clean compile
mvn spring-boot:run -D spring-boot.run.profiles=dev
If Maven isn't installed on your system, the Maven Wrapper can be used by using the following commands:
Linux / MacOS
./mvnw clean compile
./mvnw spring-boot:run -D spring-boot.run.profiles=dev
Windows
.\mvnw.cmd clean compile
.\mvnw.cmd spring-boot:run -D spring-boot.run.profiles=dev
To set up passwords for MySQL, navigate to the project directory and open the .env file. Then set passwords for:
MYSQLDB_ROOT_PASSWORD=
MYSQLDB_PASSWORD=
All requests require HTTP Basic authentication, the users are paul, john, george and ringo. The password is secret.