I have Eureka server, Eureka zuul and config server. So I write a simple microservice. Then, running on 8686 port.
So I want to run that microservice on another port. I trying that command. But don't work.
java -Dserver.port=8687 -jar -Dlogging.file="bla.log" testMicro.jar --debug > "bla.log"&
I am confusing. Help me!
You have two ways to running your instances on different ports.
server:
port: ${random.int(8080,8090)}
spring:
cloud:
config:
override-system-properties: false
allow-override: true
override-none: true
and then run again your jar with -Dserver.port=8687
property