问题
I setup the following components using Jhipster (version of 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. Swagger UI lists the apis for Jhipster-Registry only. But it gives error when the uaa or gateway is selected in the drop down. Swagger UI From Gateway (Administration >> API) works fine. Only from registry it does not work.
Please let me know if I am missing some configuration.
回答1:
UAA support for the registry was just recently added and will be in the next release. 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.Then you can use the
develop
tag for thejhipster-registry
Docker image, and add theuaa
profile to that container'sSPRING_ACTIVE_PROFILES
- If you prefer to run the JHipster Registry from source, you can clone the jhipster-registry repository and check out the
develop
branch
- If you prefer to run the JHipster Registry from source, you can clone the jhipster-registry repository and check out the
来源:https://stackoverflow.com/questions/52311356/jhipster-registry-swagger-ui-for-microservice-says-invalid-token-with-uaa