Class RuntimeConfigController

java.lang.Object
com.google.adk.web.controller.RuntimeConfigController

@RestController public class RuntimeConfigController extends Object
Serves the dev UI's runtime configuration, shadowing the copy bundled in the static assets so adk.web.backend-url can point the UI at the address browsers reach this server on. The bundled document is merged rather than replaced, so keys the UI gains in a later bundle survive.
  • Constructor Details

    • RuntimeConfigController

      @Autowired public RuntimeConfigController(org.springframework.core.io.ResourceLoader resourceLoader, com.fasterxml.jackson.databind.ObjectMapper objectMapper, @Value("${adk.web.ui.dir:#{null}}") @Nullable String webUiDir, BackendUrl backendUrl)
      Reads the bundled config through resourceLoader, or from webUiDir if set.
  • Method Details

    • runtimeConfig

      @GetMapping(value="/dev-ui/assets/config/runtime-config.json", produces="application/json") public org.springframework.http.ResponseEntity<Map<String,Object>> runtimeConfig()
      Serves the bundled config with backendUrl taken from configuration when set.