Demo and Playground to explore Spring Boot 2 latest features
- Display all auto configuration classes
- IntelliJ IDEA option
- log
- Inject properties
- default path: application.yaml, application.properties
- default path with profile sections
- specific path on classpath
- @Configuration override
- Security
- Logging Pattern
- Metrics
- Health
- Getting Started
- Checklist
- Extras
- Spring Boot App
DemoForSpring2Application.java
- Spring Boot Test
DemoForSpring2ApplicationTests.java
- Maven Docker build
mvn spring-boot:build-image -Dspring-boot.build-image.imageName=enable-spring-boot-2 -f pom.xml
# Failing: [INFO] I/O exception (java.io.IOException) caught when processing request to {}->docker://localhost:2376: com.sun.jna.LastErrorException: [13] Permission denied
# Apparently due to running docker command as non-root user
# https://stackoverflow.com/questions/48957195/how-to-fix-docker-got-permission-denied-issue
- upgrade to latest Boot and Cloud versions:
- eureka client: pom.xml, application.yaml, @EnableEurekaClient
- auto-configure H2
- logging levels: application.yaml
- git-plugin-for-actuator: pom.xml -> build.plugins
- Docker image: Dockerfile
- Lombok
- status of docker daemon
systemctl status docker
- build
docker build /home/znevzz/Desktop/Projects/Spring/enable-spring-boot-2/ -t enable-spring-boot-2
- view
docker image ls
docker container ls
- run
docker run <IMAGE-ID>/<REPOSITORY> -p <INTERNAL-PORT:EXTERNAL-PORT>
docker run -p 8999:8999 enable-spring-boot-2
- delete
docker image rm <IMAGE-ID>
docker image rm <IMAGE-ID> -f
- enter container
docker exec -it <IMAGE-ID> bash