- JDK 17
- Apache Maven 3.6.3
This project uses Project Lombok https://projectlombok.org/ to reduce bloated class property accessors
To benefit in your IDE the Lombok project
https://projectlombok.org/setup/eclipse
IDEA https://projectlombok.org/setup/intellij
Prerequisites: Docker must be installed
docker run -it --rm -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven diside/spring-mvc-start-archetype-docker:5.1.11 mvn clean package
Prerequisites: Java and Apache Maven must be installed.
mvn clean package -Ph2
with default dev profile activated and H2 type DB
Prerequisites: Docker must be installed
docker run -it --rm -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven diside/spring-mvc-start-archetype-docker:5.1.11 mvn clean test
Prerequisites: Java and Apache Maven must be installed.
mvn clean test
Drop the war built in any Web application container
Example
copy war in webapps
directory and start
cd apache-tomcat-9.0.14
bin/startup.sh && tail -n80 -f logs/catalina.out
mvn clean install -Pdocker,dev,h2
docker run -it --rm -p 8080:8080 diside/webapp:latest
browse to http://localhost:8080/webapp/
Change environment profile "dev", database type profile "h2" as required and eventually "diside/webapp:1.0.0-dev" if default values were changed
It uses Google jib-maven-plugin which does not require to have docker installed on the build machine
mvn install -Pjib,dev,h2
or with a maven container
docker run -it --rm -v "$(pwd)":/usr/src/mymaven -v /var/run/docker.sock:/var/run/docker.sock -w /usr/src/mymaven diside/spring-mvc-start-archetype-docker:latest sh -c "mvn install -Pjib"