依赖如下:
<knife4j.version>2.0.7</knife4j.version>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<!--在引用时请在maven中央仓库搜索最新版本号-->
<version>${knife4j.version}</version>
</dependency>
报错:
Could not transfer artifact com.github.xiaoymin:knife4j-spring-boot-starter:pom:2.0.7 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/com/github/xiaoymin/knife4j-spring-boot-starter/2.0.7/knife4j-spring-boot-starter-2.0.7.pom
解决方法:
从中央仓库中重新下载一下,步骤如下:
然后reload 一下,再重启一下idea就好了。