I have eureka server that posted in tomcat server (localhost:80/eureka-server)
spring.application.name=eureka
server.port=80
server.servlet.context-path=/eureka-server
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
eureka.client.service-url.default-zone=http://localhost:80/eureka-server/eureka/
@SpringBootApplication
@EnableEurekaServer
public class EurekaServer extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(EurekaServer.class, args);
}
}
In my microservice i try to register it in eureka
spring.application.name=randomService
eureka.client.service-url.default-zone=http://localhost:80/eureka-server/eureka/
@SpringBootApplication
@EnableEurekaClient
public class RandomServiceApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(RandomServiceApplication.class, args);
}
}
but everytime microservice tries to connect with default eureka url (http://localhost:8761). What should i do?
So, i solved it in unusual way, in my microservice i changed application.properties
eureka.client.service-url.default-zone=...
to camelCase
eureka.client.serviceUrl.defaultZone=