I want to register my micro services in Eureka with the IP address instead of host name.
I have tried both prefer-ip-address and eureka.instance.preferIpAddress=true properties. None of those worked for me.
Here is my eureka service application .yml file.

This is my Authorization-server micro-service application.yml

But still eureka console showing my services registered with host name(localhost) instead of IP address

I am using Spring boot 2.2.2 version and Spring cloud Hoxton.RELEASE. I am guessing the properties aren't working properly.
Is anyone experiencing the same problem?
Finally i figured out where i can see preferIpAddress property changes. Hover your mouse to instance. Then in the bottom left corner you can see the IP.
Before applying property preferIpAddress = true

After applying property preferIpAddress = true

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With