升级spring boot版本呢
This commit is contained in:
2
pom.xml
2
pom.xml
@ -43,7 +43,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-dependencies</artifactId>
|
<artifactId>spring-boot-dependencies</artifactId>
|
||||||
<version>2.2.13.RELEASE</version>
|
<version>2.4.6</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -13,6 +13,9 @@ import com.ruoyi.common.config.RuoYiConfig;
|
|||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.framework.interceptor.RepeatSubmitInterceptor;
|
import com.ruoyi.framework.interceptor.RepeatSubmitInterceptor;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用配置
|
* 通用配置
|
||||||
*
|
*
|
||||||
@ -53,7 +56,9 @@ public class ResourcesConfig implements WebMvcConfigurer
|
|||||||
CorsConfiguration config = new CorsConfiguration();
|
CorsConfiguration config = new CorsConfiguration();
|
||||||
config.setAllowCredentials(true);
|
config.setAllowCredentials(true);
|
||||||
// 设置访问源地址
|
// 设置访问源地址
|
||||||
config.addAllowedOrigin("*");
|
List<String> patterns = new ArrayList<>();
|
||||||
|
patterns.add("*");
|
||||||
|
config.setAllowedOriginPatterns(patterns);
|
||||||
// 设置访问源请求头
|
// 设置访问源请求头
|
||||||
config.addAllowedHeader("*");
|
config.addAllowedHeader("*");
|
||||||
// 设置访问源请求方法
|
// 设置访问源请求方法
|
||||||
|
Reference in New Issue
Block a user