-
Create an executable jar file with Maven and copy the package snapshot name.
mvn clean package
-
Create a docker file
Dockerfile
in the root folder and add information that provides specific instructions to Docker such as letting docker COPY the executable jar file from step 1. -
Create an image from
Dockerfile
withemployee-demo
as the image name.docker build --tag=employee-demo:latest .
-
Run the container from the created image. Ensure that Docker Desktop is running locally.
docker run employee-demo
The sample app has been deployed to google cloud platform by following the following steps:
-
Login to the Google Cloud Platform with your Google account.
gcloud auth login
-
Project initialization to run App Engine apps within the central region of the US.
gcloud app create --region us-central
-
App deployment to App Engine with Maven - Skips tests and packages the project's executable jar file for deployment.
./mvn -DskipTests package appengine:deploy
-
Visit the deployed app through a generated URL and test it.
gcloud app browse
javax.validation.*
does not exist.
Javax API has been bumped to Jakarta API in Spring Boot 3.x. Therefore, javax.*
imports do not exist.
In the plugin set-up with maven, use:
<configOptions>
<useSpringBoot3>true</useSpringBoot3>
</configOptions>