menu 李昊天的个人博客
SpringBoot Swager放行问题
786 浏览 | 2021-04-05 | 分类:SpringBoot | 标签:


    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
       
// swagger 第三方ui的访问路径
/**    <dependency>
            <groupId>com.github.xiaoymin</groupId>
            <artifactId>swagger-bootstrap-ui</artifactId>
            <version>1.9.6</version>
        </dependency>
*/
 registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");

        registry.addResourceHandler("swagger-ui.html")
                .addResourceLocations("classpath:/META-INF/resources/");

       
// swagger ui的访问路径 registry.addResourceHandler("/webjars/**")
                .addResourceLocations("classpath:/META-INF/resources/webjars/");
    }
知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议

发表评论

email
web

全部评论 (暂无评论)

info 还没有任何评论,你来说两句呐!