knife4j只用此插件的最简洁开发方式
一、POM添加 在pom文件里添加包 1 <!-- 引入knife4j以来 --> 2 < dependency > 3 < groupId > com.github.xiaoymin </ groupId > 4 < artifactId > knife4j-spring-boot-starter </ artifactId > < version > 1.9.6 </ version > 5 </ dependency > View Code 二、配置添加,相当于<bean>添加 1 package com.mrliu.undertow.conf; 2 3 import com.github.xiaoymin.knife4j.spring.annotations.EnableSwaggerBootstrapUi; 4 import org.springframework.context.annotation.Bean; 5 import org.springframework.context.annotation.Configuration; 6 import springfox.documentation.builders.ApiInfoBuilder; 7 import springfox.documentation.builders.PathSelectors; 8