commands
# Java
java -jar "-Dloader.path=./lib" ./ROOT.jar --spring.profiles.active=test -Duser.timezone=GMT+8 -Djava.security.egd=file:/dev/./urandom
# Maven
mvn clean package -DskipTests
Docker
- docker-compose.yml
```
- Dockerfile
base image
FROM openjdk:8-alpine
FROM openjdk:17-jdk-alpine
font
RUN apk update && apk add --no-cache ttf-dejavu fontconfig
author
LABEL author="katzhen"
port
EXPOSE 9082
aa jar
ADD ROOT.jar ROOT.jar
add lib
ADD lib lib
add yml
ADD application-prod.yml application-prod.yml
set variables
-Xmx
ENV JAVA_OPTS="-Xmx512m -Dspring.profiles.active=prod"
exec Support graceful shutdown
-Duser.timezone
-Djava.security.egd Improving random number generation efficiency
ENTRYPOINT ["sh","-c","exec java $JAVA_OPTS -Duser.timezone=GMT+8 -Djava.security.egd=file:/dev/./urandom -jar '-Dloader.path=./lib' ROOT.jar" ]
### winsw.xml
```xml
user-service
User Service
User Service
java
-jar "-Dloader.path=./lib" ./ROOT.jar --spring.profiles.active=prod -Duser.timezone=GMT+8 -Djava.security.egd=file:/dev/./urandom
Automatic
reset