Search code examples
spring-boot-admin

Make Spring boot admin use a specific client URL


I'm trying to get Spring Boot Admin integrated with a Spring Boot Jax-RS/Swagger app, and I'm having the following issue:

When the client registers with the Admin server, the Admin UI shows a URL something like: http://my.domain:8001 as the link to access the application. Unfortunately, this application has no UI and its actual URL to access the Rest services is http://my.domain:8001/api/...

What I'd really like to do is have the URL on the Admin page reference my Swagger UI for this service. So the URL on the admin page would ideally be http://my.domain:8001/swagger-ui.html.

I've looked at the properties for the client that I can set on my application.properties and can't seem to find one that does what I want. Is this possible with Spring Boot Admin? Do I need to do some sort of custom configuration or can I do this by setting properties?


Solution

  • As listed here and here. You could try setting this in properties:

    # Considering /admin is the mapping you want
    
    # For Admin boot client
    spring.boot.admin.client.url=http://localhost:8001/admin
    
    # For Admin boot server
    spring.boot.admin.context-path=admin