I am getting this error with jhipster+webflux, Gateway application error(JWT) Application --> registry--gateway(angular)--multiple services(webflux) http://localhost:8080/admin/docs
"type" : "https://www.jhipster.tech/problem/problem-with-message", "title" : "Not Found", "status" : 404, "detail" : "404 NOT_FOUND", "path" : "/swagger-ui.html", "message" : "error.http.404"
.yo-rc.json
{
"generator-jhipster": {
"promptValues": {
"packageName": "org.abc.gateway",
"nativeLanguage": "en"
},
"jhipsterVersion": "6.10.3",
"applicationType": "gateway",
"baseName": "gateway",
"packageName": "org.abc.gateway",
"packageFolder": "org/abc/gateway",
"serverPort": "8080",
"authenticationType": "jwt",
"cacheProvider": "no",
"enableHibernateCache": false,
"websocket": false,
"databaseType": "mongodb",
"devDatabaseType": "mongodb",
"prodDatabaseType": "mongodb",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "maven",
"enableSwaggerCodegen": true,
"jwtSecretKey": "XXXXXXXXXXXXXXXX",
"embeddableLaunchScript": false,
"useSass": true,
"clientPackageManager": "npm",
"clientFramework": "angularX",
"clientTheme": "none",
"clientThemeVariant": "",
"creationTimestamp": 1602227915588,
"testFrameworks": ["gatling", "cucumber", "protractor"],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [],
"enableTranslation": true,
"nativeLanguage": "en",
"languages": ["en", "hi"],
"blueprints": [],
"reactive": true
}
}
Error in swagger initialization
java.lang.NoSuchMethodError: springfox.documentation.spi.service.contexts.ParameterContext.(Lspringfox/documentation/service/ResolvedMethodParameter;Lspringfox/documentation/builders/ParameterBuilder;Lspringfox/documentation/spi/service/contexts/DocumentationContext;Lspringfox/documentation/spi/schema/GenericTypeNamingStrategy;Lspringfox/documentation/spi/service/contexts/OperationContext;)V
What do i need to check, to get swagger enabled with spring-Webflux projects..
I found an issue in jhipster project : https://github.com/jhipster/generator-jhipster/issues/12072#issuecomment-683282300
To fix it :
1- update the dependencies (remove the old dependencies)
2 - update the path "/v2/api-docs" to "/v3/api-docs" in the whole project (front + back)
3 - in
docs.component.html
change the URI4 - I had a problem with the security. I allow the swagger resource to permit all in
SecurityConfiguration
Since I disable Swagger in production spring profile, it is not a problem for me.