Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 745 Bytes

commands.md

File metadata and controls

51 lines (34 loc) · 745 Bytes

Gerar o jar da aplicacao

mvn package

Executar o programa passando uma variavel de ambiente

java -jar .\target\algafood-0.0.1-SNAPSHOT.jar --server.port=3000

Definir uma variavel de ambiente no sistema

Unix based

export SERVER_PORT=4001

Windows based

SET SERVER_PORT=4001

Mostrar vaviavel no windows

echo %SERVER_PORT%

Alterar ambientes atraves de linha de comando

java -jar .\target\algafood-0.0.1-SNAPSHOT.jar --spring.profiles.active=development

Alterar ambiente atraves de variavel de ambiente

Linux

export SPRING_PROFILES_ACTIVE=production

Windows

SET SPRING_PROFILES_ACTIVE=production