codecentric / spring-boot-admin

Admin UI for administration of spring boot applications
Apache License 2.0
12.4k stars 3.08k forks source link

springcloud-config and admin not start in same project #3445

Closed Susuper2019 closed 5 months ago

Susuper2019 commented 5 months ago

Spring Boot Admin Server information

Client information

Description

I'm working on a demo that simulates a config server and config client that uses location native. At this point I introduced admin, at this point I found that the UI of admin could not load correctly, and the admin client could not properly register to the server side. When I don't use config, everything works fine image

Susuper2019 commented 5 months ago

this is demo https://github.com/Susuper2019/config-demo.git
image image

erikpetzold commented 5 months ago

Hi @Susuper2019

first: thanks for providing a demo, really helpful 👍

As you can see in the first line in your first screenshot, the handler of the config server is answering all requests. Therefore it will handle the requests to the static resources and also the registration requests. This will fail.

A stated in https://docs.spring.io/spring-cloud-config/docs/current/reference/html/#_embedding_the_config_server it would be best to run both tools in separate applications. Otherwise you need to set spring.cloud.config.server.prefix to make the config server only handle requests under this path.

Susuper2019 commented 5 months ago

@erikpetzold Thank you very much for your help, the service has started normally. Thank you so much