This repository is a template that provides the bottomline requirement in simple spring projects. It gives you a significant distance ahead the kick off of every typical spring application. It name demo is the default name of spring applications. You can run this application in you github codespace or on your local machine by running the task
log
in vscode tasks. The final goal of this project is to turn it into a maven archetype.
-
Build the project with certain profile
mvn clean package -Pprod mvn clean package -Pdev
-
Run the project with certain profile
mvn spring-boot:run -Pprod mvn spring-boot: run -Pdev
-
Build docker image
docker build --pull --rm -f "src/main/resources/docker/prod/dockerfile.prod" -t demo:prod-1.0 "src/.." docker build --pull --rm -f "src/main/resources/docker/dev/dockerfile.dev" -t demo:dev-1.0 "src/.."
-
Run docker composer
docker compose -f "src/main/resources/docker/prod/prod.docker-compose.yml" up -d --build docker compose -f "src/main/resources/docker/dev/dev.docker-compose.yml" up -d --build
For further reference, please consider the following sections:
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Spring Boot DevTools
- Spring Configuration Processor
- Spring Web
- Thymeleaf
- Spring Security
- Spring Data JPA
- Flyway Migration
- Spring Boot Actuator
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
- Handling Form Submission
- Securing a Web Application
- Spring Boot and OAuth2
- Authenticating a User with LDAP
- Accessing Data with JPA
- Building a RESTful Web Service with Spring Boot Actuator
made with ❤️ by kotbi abderrahmane