1

I want to integrate the springbootadmin monitoring detail page into our own management system, how can I get the instanceId of the detail page? for example localhost:8020/instances/5f3d1f8ee6a0/details,I want to know how can I get 5f3d1f8ee6a0

chongli_j
  • 13
  • 2

1 Answers1

0

With ApplicationRegistrator class, you can create a route on the client exposing the registered id:

@RestController
@RequestMapping("api/instance")
class InstanceController {

    @Autowired
    ApplicationRegistrator applicationRegistrator

    @GetMapping("/")
    String get() {
        return applicationRegistrator.getRegisteredId();
    }
}
Nimantha
  • 6,405
  • 6
  • 28
  • 69