Packaging as ERROR jar, method pageableParameterBuilderPlugin

200 Views Asked by At

enter image description here

2020-12-25 13:51:37.470 WARN 6770 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pageableParameterBuilderPlugin' defined in class path resource [io/github/jhipster/config/apidoc/SwaggerPluginsAutoConfiguration$SpringPagePluginConfiguration.class]: Unsatisfied dependency expressed through method 'pageableParameterBuilderPlugin' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'springfox.documentation.schema.TypeNameExtractor' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} 2020-12-25 13:51:38.213 ERROR 6770 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

Parameter 0 of method pageableParameterBuilderPlugin in io.github.jhipster.config.apidoc.SwaggerPluginsAutoConfiguration$SpringPagePluginConfiguration required a bean of type 'springfox.documentation.schema.TypeNameExtractor' that could not be found.

Action:

Consider defining a bean of type 'springfox.documentation.schema.TypeNameExtractor' in your configuration.


I do everything according to the instructions, but the jar is not going to. Tried inserting different dependencies https://springfox.github.io/springfox/docs/current/ , but nothing works for me.

1

There are 1 best solutions below

0
On

https://www.jhipster.tech/production/#build

webpack.prod.js or webpack.common.jsс

new HtmlWebpackPlugin({
    ...
    base: '/jhipster/'
})

update src/main/webapp/swagger-ui/index.html

var urls = [];
axios.get("/swagger-resources").then(function (response) {
    response.data.forEach(function (resource) {
        urls.push({
                "name": resource.name,
                "url": "/jhipster" + resource.location
        });
    });
});