【依赖】knife4j from 4.3.0 to 4.5.0

This commit is contained in:
YunaiV 2024-07-16 09:41:04 +08:00
parent 503a6eecc5
commit 8da3a97122
14 changed files with 54 additions and 28 deletions

View File

@ -22,8 +22,8 @@
<spring.cloud.alibaba.version>2021.0.6.1</spring.cloud.alibaba.version> <spring.cloud.alibaba.version>2021.0.6.1</spring.cloud.alibaba.version>
<!-- Web 相关 --> <!-- Web 相关 -->
<servlet.versoin>2.5</servlet.versoin> <servlet.versoin>2.5</servlet.versoin>
<springdoc.version>1.6.15</springdoc.version> <springdoc.version>1.7.0</springdoc.version>
<knife4j.version>4.3.0</knife4j.version> <knife4j.version>4.5.0</knife4j.version>
<!-- DB 相关 --> <!-- DB 相关 -->
<druid.version>1.2.23</druid.version> <druid.version>1.2.23</druid.version>
<mybatis.version>3.5.16</mybatis.version> <mybatis.version>3.5.16</mybatis.version>

View File

@ -20,8 +20,10 @@ public class SecurityConfiguration {
public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) { public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) {
// TODO 芋艿这个每个项目都需要重复配置得捉摸有没通用的方案 // TODO 芋艿这个每个项目都需要重复配置得捉摸有没通用的方案
// Swagger 接口文档 // Swagger 接口文档
registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 registry.antMatchers("/v3/api-docs/**").permitAll()
.antMatchers("/swagger-ui.html").permitAll(); // Swagger UI .antMatchers("/webjars/**").permitAll()
.antMatchers("/swagger-ui").permitAll()
.antMatchers("/swagger-ui/**").permitAll();
// Druid 监控 // Druid 监控
registry.antMatchers("/druid/**").anonymous(); registry.antMatchers("/druid/**").anonymous();
// Spring Boot Actuator 的安全配置 // Spring Boot Actuator 的安全配置

View File

@ -20,8 +20,10 @@ public class SecurityConfiguration {
@Override @Override
public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) { public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) {
// Swagger 接口文档 // Swagger 接口文档
registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 registry.antMatchers("/v3/api-docs/**").permitAll()
.antMatchers("/swagger-ui.html").permitAll(); // Swagger UI .antMatchers("/webjars/**").permitAll()
.antMatchers("/swagger-ui").permitAll()
.antMatchers("/swagger-ui/**").permitAll();
// Spring Boot Actuator 的安全配置 // Spring Boot Actuator 的安全配置
registry.antMatchers("/actuator").permitAll() registry.antMatchers("/actuator").permitAll()
.antMatchers("/actuator/**").permitAll(); .antMatchers("/actuator/**").permitAll();

View File

@ -21,8 +21,10 @@ public class SecurityConfiguration {
@Override @Override
public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) { public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) {
// Swagger 接口文档 // Swagger 接口文档
registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 registry.antMatchers("/v3/api-docs/**").permitAll()
.antMatchers("/swagger-ui.html").permitAll(); // Swagger UI .antMatchers("/webjars/**").permitAll()
.antMatchers("/swagger-ui").permitAll()
.antMatchers("/swagger-ui/**").permitAll();
// Spring Boot Actuator 的安全配置 // Spring Boot Actuator 的安全配置
registry.antMatchers("/actuator").permitAll() registry.antMatchers("/actuator").permitAll()
.antMatchers("/actuator/**").permitAll(); .antMatchers("/actuator/**").permitAll();

View File

@ -24,8 +24,10 @@ public class SecurityConfiguration {
@Override @Override
public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) { public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) {
// Swagger 接口文档 // Swagger 接口文档
registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 registry.antMatchers("/v3/api-docs/**").permitAll()
.antMatchers("/swagger-ui.html").permitAll(); // Swagger UI .antMatchers("/webjars/**").permitAll()
.antMatchers("/swagger-ui").permitAll()
.antMatchers("/swagger-ui/**").permitAll();
// Spring Boot Actuator 的安全配置 // Spring Boot Actuator 的安全配置
registry.antMatchers("/actuator").anonymous() registry.antMatchers("/actuator").anonymous()
.antMatchers("/actuator/**").anonymous(); .antMatchers("/actuator/**").anonymous();

View File

@ -20,8 +20,10 @@ public class SecurityConfiguration {
@Override @Override
public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) { public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) {
// Swagger 接口文档 // Swagger 接口文档
registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 registry.antMatchers("/v3/api-docs/**").permitAll()
.antMatchers("/swagger-ui.html").permitAll(); // Swagger UI .antMatchers("/webjars/**").permitAll()
.antMatchers("/swagger-ui").permitAll()
.antMatchers("/swagger-ui/**").permitAll();
// Spring Boot Actuator 的安全配置 // Spring Boot Actuator 的安全配置
registry.antMatchers("/actuator").anonymous() registry.antMatchers("/actuator").anonymous()
.antMatchers("/actuator/**").anonymous(); .antMatchers("/actuator/**").anonymous();

View File

@ -20,8 +20,10 @@ public class SecurityConfiguration {
@Override @Override
public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) { public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) {
// Swagger 接口文档 // Swagger 接口文档
registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 registry.antMatchers("/v3/api-docs/**").permitAll()
.antMatchers("/swagger-ui.html").permitAll(); // Swagger UI .antMatchers("/webjars/**").permitAll()
.antMatchers("/swagger-ui").permitAll()
.antMatchers("/swagger-ui/**").permitAll();
// Spring Boot Actuator 的安全配置 // Spring Boot Actuator 的安全配置
registry.antMatchers("/actuator").anonymous() registry.antMatchers("/actuator").anonymous()
.antMatchers("/actuator/**").anonymous(); .antMatchers("/actuator/**").anonymous();

View File

@ -19,8 +19,10 @@ public class SecurityConfiguration {
@Override @Override
public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) { public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) {
// Swagger 接口文档 // Swagger 接口文档
registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 registry.antMatchers("/v3/api-docs/**").permitAll()
.antMatchers("/swagger-ui.html").permitAll(); // Swagger UI .antMatchers("/webjars/**").permitAll()
.antMatchers("/swagger-ui").permitAll()
.antMatchers("/swagger-ui/**").permitAll();
// Spring Boot Actuator 的安全配置 // Spring Boot Actuator 的安全配置
registry.antMatchers("/actuator").anonymous() registry.antMatchers("/actuator").anonymous()
.antMatchers("/actuator/**").anonymous(); .antMatchers("/actuator/**").anonymous();

View File

@ -20,8 +20,10 @@ public class SecurityConfiguration {
@Override @Override
public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) { public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) {
// Swagger 接口文档 // Swagger 接口文档
registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 registry.antMatchers("/v3/api-docs/**").permitAll()
.antMatchers("/swagger-ui.html").permitAll(); // Swagger UI .antMatchers("/webjars/**").permitAll()
.antMatchers("/swagger-ui").permitAll()
.antMatchers("/swagger-ui/**").permitAll();
// Spring Boot Actuator 的安全配置 // Spring Boot Actuator 的安全配置
registry.antMatchers("/actuator").anonymous() registry.antMatchers("/actuator").anonymous()
.antMatchers("/actuator/**").anonymous(); .antMatchers("/actuator/**").anonymous();

View File

@ -20,8 +20,10 @@ public class SecurityConfiguration {
@Override @Override
public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) { public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) {
// Swagger 接口文档 // Swagger 接口文档
registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 registry.antMatchers("/v3/api-docs/**").permitAll()
.antMatchers("/swagger-ui.html").permitAll(); // Swagger UI .antMatchers("/webjars/**").permitAll()
.antMatchers("/swagger-ui").permitAll()
.antMatchers("/swagger-ui/**").permitAll();
// Spring Boot Actuator 的安全配置 // Spring Boot Actuator 的安全配置
registry.antMatchers("/actuator").anonymous() registry.antMatchers("/actuator").anonymous()
.antMatchers("/actuator/**").anonymous(); .antMatchers("/actuator/**").anonymous();

View File

@ -21,8 +21,10 @@ public class SecurityConfiguration {
public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) { public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) {
// TODO 芋艿这个每个项目都需要重复配置得捉摸有没通用的方案 // TODO 芋艿这个每个项目都需要重复配置得捉摸有没通用的方案
// Swagger 接口文档 // Swagger 接口文档
registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 registry.antMatchers("/v3/api-docs/**").permitAll()
.antMatchers("/swagger-ui.html").permitAll(); // Swagger UI .antMatchers("/webjars/**").permitAll()
.antMatchers("/swagger-ui").permitAll()
.antMatchers("/swagger-ui/**").permitAll();
// Druid 监控 // Druid 监控
registry.antMatchers("/druid/**").anonymous(); registry.antMatchers("/druid/**").anonymous();
// Spring Boot Actuator 的安全配置 // Spring Boot Actuator 的安全配置

View File

@ -20,8 +20,10 @@ public class SecurityConfiguration {
@Override @Override
public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) { public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) {
// Swagger 接口文档 // Swagger 接口文档
registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 registry.antMatchers("/v3/api-docs/**").permitAll()
.antMatchers("/swagger-ui.html").permitAll(); // Swagger UI .antMatchers("/webjars/**").permitAll()
.antMatchers("/swagger-ui").permitAll()
.antMatchers("/swagger-ui/**").permitAll();
// Spring Boot Actuator 的安全配置 // Spring Boot Actuator 的安全配置
registry.antMatchers("/actuator").anonymous() registry.antMatchers("/actuator").anonymous()
.antMatchers("/actuator/**").anonymous(); .antMatchers("/actuator/**").anonymous();

View File

@ -19,8 +19,10 @@ public class SecurityConfiguration {
@Override @Override
public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) { public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) {
// Swagger 接口文档 // Swagger 接口文档
registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 registry.antMatchers("/v3/api-docs/**").permitAll()
.antMatchers("/swagger-ui.html").permitAll(); // Swagger UI .antMatchers("/webjars/**").permitAll()
.antMatchers("/swagger-ui").permitAll()
.antMatchers("/swagger-ui/**").permitAll();
// Spring Boot Actuator 的安全配置 // Spring Boot Actuator 的安全配置
registry.antMatchers("/actuator").anonymous() registry.antMatchers("/actuator").anonymous()
.antMatchers("/actuator/**").anonymous(); .antMatchers("/actuator/**").anonymous();

View File

@ -21,8 +21,10 @@ public class SecurityConfiguration {
public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) { public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) {
// TODO 芋艿这个每个项目都需要重复配置得捉摸有没通用的方案 // TODO 芋艿这个每个项目都需要重复配置得捉摸有没通用的方案
// Swagger 接口文档 // Swagger 接口文档
registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据 registry.antMatchers("/v3/api-docs/**").permitAll()
.antMatchers("/swagger-ui.html").permitAll(); // Swagger UI .antMatchers("/webjars/**").permitAll()
.antMatchers("/swagger-ui").permitAll()
.antMatchers("/swagger-ui/**").permitAll();
// Druid 监控 // Druid 监控
registry.antMatchers("/druid/**").anonymous(); registry.antMatchers("/druid/**").anonymous();
// Spring Boot Actuator 的安全配置 // Spring Boot Actuator 的安全配置