我可能缺少某些配置,但是我找不到那个配置。
我有一个正在运行的客户端应用程序,并且正在运行监视应用程序,所有这一切都在作为“独立”应用程序执行时有效,这意味着它们不在任何应用程序服务器中运行。
但是我试图也在weblogic下运行它们。两个应用程序均已部署,注册正常,应用程序状态的定期更新显示受监视的应用程序已启动。但是,在UI中未显示已注册的应用程序。在chrome开发控制台中检查network
时,我可以看到:
获取http://localhost:7001/cchAdmin/applications 500(内部服务器错误)
失败。查看监控应用日志,可以找到
查找路径/ cchAdmin / applications的处理程序方法
2019-01-07 16:59:18.022 DEBUG 13460 --- [ (self-tuning)'] .b.a.s.w.s.AdminControllerHandlerMapping : Did not find handler method for [/cchAdmin/applications]
2019-01-07 16:59:18.023 DEBUG 13460 --- [ (self-tuning)'] .b.a.s.w.s.AdminControllerHandlerMapping : Looking up handler method for path /cchAdmin/applications
2019-01-07 16:59:18.023 DEBUG 13460 --- [ (self-tuning)'] .b.a.s.w.s.AdminControllerHandlerMapping : Did not find handler method for [/cchAdmin/applications]
2019-01-07 16:59:19.178 DEBUG 13460 --- [ (self-tuning)'] .b.a.s.w.s.AdminControllerHandlerMapping : Looking up handler method for path /instances
2019-01-07 16:59:19.178 DEBUG 13460 --- [ (self-tuning)'] .b.a.s.w.s.AdminControllerHandlerMapping : Returning handler method [public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, de.codecentric.boot.admin.server.domain.values.InstanceId>>> de.codecentric.boot.admin.server.web.InstancesController.register(de.codecentric.boot.admin.server.domain.values.Registration,org.springframework.web.util.UriComponentsBuilder)]
2019-01-07 16:59:19.179 DEBUG 13460 --- [ (self-tuning)'] .b.a.s.w.s.AdminControllerHandlerMapping : Looking up handler method for path /instances
2019-01-07 16:59:19.180 DEBUG 13460 --- [ (self-tuning)'] .b.a.s.w.s.AdminControllerHandlerMapping : Returning handler method [public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, de.codecentric.boot.admin.server.domain.values.InstanceId>>> de.codecentric.boot.admin.server.web.InstancesController.register(de.codecentric.boot.admin.server.domain.values.Registration,org.springframework.web.util.UriComponentsBuilder)]
2019-01-07 16:59:19.181 DEBUG 13460 --- [ (self-tuning)'] d.c.b.a.server.web.InstancesController : Register instance Registration(name=XXX, managementUrl=http://localhost:7001/XXX/actuator, healthUrl=http://localhost:7001/XXX/actuator/health, serviceUrl=http://localhost:7001/XXX, source=http-api)
2019-01-07 16:59:19.183 ERROR 13460 --- [ (self-tuning)'] org.thymeleaf.TemplateEngine : [THYMELEAF][[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] Exception processing template "instances": Error resolving template "instances", template might not exist or might not be accessible by any of the configured Template Resolvers
org.thymeleaf.exceptions.TemplateInputException: Error resolving template "instances", template might not exist or might not be accessible by any of the configured Template Resolvers
at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:870)
at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:607)
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098)
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072)
at org.thymeleaf.spring5.view.ThymeleafView.renderFragment(ThymeleafView.java:354)
...
我以为,该应用程序上下文路径有些丢失,也许该应用程序应该查询cchAdmin/instances
而不是/instances
。
在这种情况下,“消失的”上下文路径是通过<context-root>/cchAdmin</context-root>
中的weblogic.xml
设置的,而spring-boot-admin没有任何配置。只有spring-boot-client进行了一些配置,但该配置似乎正在工作。
有什么主意在这里有什么问题吗?我看不到为管理项目指定上下文路径的任何方法,spring.boot.admin.context-path
做其他事情,spring.boot.admin.ui.public-url
没有帮助。春季启动管理员版本是:2.0.4