application.properties
SERVER_PORT
从系统环境变量中获取,默认值为301
## Web Port
server.port=${SERVER_PORT:301}
...
## Dubbo Port
dubbo.protocol.port=30001
Docker
sudo docker run -d --name rx_tech_jmqtt_service \
--net=host \
-e SERVER_PORT=301 \
-v /home/xujian/packages/rx_tech_jmqtt_service:/app \
-v /etc/localtime:/etc/localtime \
java:8 java \
-Djava.security.egd=file:/dev/./urandom \
-Ddubbo.protocol.port=30001 \
-jar /app/rx_tech_jmqtt_service-0.0.1-SNAPSHOT.jar