when i try to set eureka client port like below
server:
port: ${random.int[9090,9099]}
but eureka sever get error registered ports
I just created a Eureka client app and set server.port to ${random.int[9090,9099]} and the client started up fine. Can you provide more details on how to reproduce the problem or provide a sample application?
used version as below :
springBootVersion = '1.5.2.RELEASE'
mavenBom ':spring-cloud-dependencies:Dalston.RELEASE'
compile ':spring-cloud-starter-eureka'
From the console screenshot, we can find that it used different ports, but only the server ports is used actually, and also eureka server got an error registered port. but i tried use zero to set a random, everything works fine.

random.int issues a new value every time it is read (or every time a property with a placeholder is read. It is not something we plan to support. setting the port to 0 lets the container/os determine the port.
Most helpful comment
random.intissues a new value every time it is read (or every time a property with a placeholder is read. It is not something we plan to support. setting the port to 0 lets the container/os determine the port.