简体   繁体   English

微服务的JHipster-Registry Swagger UI对UAA表示invalid_token

[英]JHipster-Registry Swagger UI for microservice says invalid_token with UAA

I setup the following components using Jhipster (version of generator-jhipster: @ 5.3.1) 我使用Jhipster设置了以下组件(generator-jhipster的版本:@ 5.3.1)

Gateway
Jhipster Registry
UAA Server

Everything works fine so far. 到目前为止一切正常。

In Jhipster Registry, when I go to Administration >> API It opens up Swagger UI. 在Jhipster注册表中,当我转到“管理” >>“ API”时,它将打开Swagger UI。 Swagger UI lists the apis for Jhipster-Registry only. Swagger UI仅列出Jhipster-Registry的api。 But it gives error when the uaa or gateway is selected in the drop down. 但是,当在下拉列表中选择uaa或网关时,就会出错。 Swagger UI From Gateway (Administration >> API) works fine. 来自网关的Swagger UI(管理>> API)工作正常。 Only from registry it does not work. 仅从注册表中不起作用。

Please let me know if I am missing some configuration. 如果缺少某些配置,请告诉我。

UAA support for the registry was just recently added and will be in the next release. UAA对注册表的支持是最近才添加的,并将在下一版本中提供。 If you want to have it early, you can make the following changes: 如果您想尽早使用它,可以进行以下更改:

  • In your UAA app's UaaConfiguration.java, add .authorities("ROLE_ADMIN") here . 在您的UAA应用程序的UaaConfiguration.java中, 在此处添加.authorities("ROLE_ADMIN")

  • Then you can use the develop tag for the jhipster-registry Docker image, and add the uaa profile to that container's SPRING_ACTIVE_PROFILES 然后,你可以使用develop的标签jhipster-registry泊坞窗图像,并添加uaa的配置文件到容器的SPRING_ACTIVE_PROFILES

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM