I'm trying to deploy spring-boot .war
application on standalone servlet container (Pivotal tc Server) and have issue with spring-boot admin page.
When I run app using spring-boot:run
command, I have proper boot spring-boot admin UI page,
but when I deploy war on tcServer, on root path /
I see spring-boot admin page without any applications inside it:
How I enable admin page:
@EnableAdminServer
public class AppRunner extends SpringBootServletInitializer { ... }
In properties I set:
server.port=9000
When running tcServer I see in logs:
jvm 1 | [2017.08.18 12:42:04.180 AST] [WARN ] [d.c.b.a.s.ApplicationRegistrator] [pool-3-thread-1] [Failed to register application as null at spring-boot-admin http://localhost:9000/api/applications): serviceUrl must be set when deployed to servlet-container]
tcServer is ran on 8080 default port. Can anybody give advice how to see my app in spring-boot admin UI on external server?
Finally I solved this by adding property:
spring.boot.admin.client.service-url=http://localhost:9000
To the application.properties
config.