A simple project based on Java 11, Spring Boot, MySQL, JUnit 5, and Testcontainers.
These instructions will get you a copy of the project and run on it your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
What things you need to run the project:
Java Development Kit (JDK 11 or newer)
Maven
Docker (if you want to run the application using the Docker image)
Clone the repository:
git clone https://github.com/rezaep/cafe-management
Use Maven build tool to compile and build the project:
mvn clean compile
To run unit and integration tests use the following command:
mvn verify
To run the application using Java, run the following command:
java -jar target/cafe-manager-1.0.0.jar
To run the application using Spring boot maven-plugin, run the following command:
mvn spring-boot:run
To package the Jar file inside a Docker image, use the following commands:
mvn clean package
docker build -t image:tag . (e.g. rezaep/cafe-management:latest)
To run the application using Docker, run the following command:
docker run -p 8080:8080 image:tag (e.g. rezaep/cafe-management:latest)
To run the application using Docker Compose, run the following command:
docker-compose up -d
To change default database configurations based on deployment way, update docker-compose.yml or application.yaml file.
url: "jdbc:mysql://localhost:3306/cafe"
username: "user"
password: "password"
Swagger generates documentation of REST APIs, which is accessible using this link.
The Basic Auth
method is used for simplicity in the authentication process. When the application runs for the first
time, it creates a very first manager user with the following credentials:
username: admin
password: admin
- Reza Ebrahimpour - Github
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details