To reproduce the problem, unzip the attached file (created using Spring Initializer):
First, verify that the Spring Boot app starts as normal using:
./gradlew bootRun
Next, create an OCI image and try starting a container:
./gradlew bootBuildImage
docker run -it --rm demo:0.0.1-SNAPSHOT
The docker run
command fails with the error:
java.lang.ClassNotFoundException: org.springframework.boot.env.EnvironmentPostProcessor
Seems like the class org.springframework.boot.env.EnvironmentPostProcessor
has moved to the package org.springframework.boot
since Spring Boot 4.0.0-M3?