简体   繁体   中英

Packaging as ERROR jar, method pageableParameterBuilderPlugin

在此处输入图像描述

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] osbdLoggingFailureAnalysisReporter:


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.

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
        });
    });
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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