From 546a46fa6b781460abe2b0dbc92a80b6251f6390 Mon Sep 17 00:00:00 2001 From: ronger Date: Thu, 25 Aug 2022 10:11:49 +0800 Subject: [PATCH] =?UTF-8?q?:arrow=5Fup:=20=E5=8D=87=E7=BA=A7=20springboot?= =?UTF-8?q?=20=E7=89=88=E6=9C=AC=E8=87=B3=202.7.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 93 +++++++------------ .../rymcu/forest/config/WebMvcConfigurer.java | 3 +- 2 files changed, 34 insertions(+), 62 deletions(-) diff --git a/pom.xml b/pom.xml index 336080b..3ff8226 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.springframework.boot spring-boot-starter-parent - 2.3.5.RELEASE + 2.7.2 com.rymcu @@ -17,7 +17,7 @@ 1.8 - 8.11.1 + 8.11.2 @@ -40,6 +40,7 @@ org.springframework.boot spring-boot-starter-web + org.mybatis.spring.boot mybatis-spring-boot-starter @@ -49,6 +50,7 @@ mysql mysql-connector-java + 8.0.30 runtime @@ -74,8 +76,19 @@ com.vaadin.external.google android-json + + net.minidev + json-smart + + + + net.minidev + json-smart + 2.4.8 + + org.springframework.boot spring-boot-starter-aop @@ -84,7 +97,7 @@ tk.mybatis mapper - 4.1.5 + 4.2.1 net.sourceforge.jtds @@ -95,32 +108,31 @@ com.github.pagehelper pagehelper - 5.3.0 + 5.3.1 com.alibaba fastjson - 1.2.83 + 2.0.12 org.apache.shiro shiro-spring - 1.7.1 - - - - org.crazycake - shiro-redis - 3.2.3 + 1.9.1 - org.apache.shiro - shiro-core + commons-collections + commons-collections + + org.apache.commons + commons-collections4 + 4.4 + commons-lang @@ -151,7 +163,7 @@ com.alibaba druid-spring-boot-starter - 1.2.8 + 1.2.11 org.apache.logging.log4j @@ -163,7 +175,7 @@ org.apache.logging.log4j log4j-to-slf4j - 2.17.1 + 2.18.0 org.apache.logging.log4j @@ -174,7 +186,7 @@ org.apache.logging.log4j log4j-api - 2.17.1 + 2.18.0 org.springframework.boot @@ -185,11 +197,6 @@ org.springframework.boot spring-boot-starter-thymeleaf - - net.sourceforge.nekohtml - nekohtml - 1.9.22 - org.springframework.boot spring-boot-starter-websocket @@ -197,26 +204,7 @@ org.jodd jodd-http - 6.2.1 - - - com.github.binarywang - weixin-java-open - 4.2.5.B - - - commons-codec - commons-codec - - - commons-io - commons-io - - - com.thoughtworks.xstream - xstream - - + 6.3.0 com.thoughtworks.xstream @@ -228,21 +216,6 @@ jedis-lock 1.0.0 - - com.baidu.aip - java-sdk - 4.16.5 - - - org.slf4j - slf4j-simple - - - com.google.guava - guava - - - @@ -273,12 +246,12 @@ cn.hutool hutool-core - 5.7.20 + 5.8.5 cn.hutool hutool-http - 5.7.20 + 5.8.5 @@ -292,8 +265,6 @@ - - diff --git a/src/main/java/com/rymcu/forest/config/WebMvcConfigurer.java b/src/main/java/com/rymcu/forest/config/WebMvcConfigurer.java index 7ce6c50..b14d7d2 100644 --- a/src/main/java/com/rymcu/forest/config/WebMvcConfigurer.java +++ b/src/main/java/com/rymcu/forest/config/WebMvcConfigurer.java @@ -12,6 +12,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.util.ResourceUtils; +import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; @@ -54,7 +55,7 @@ public class WebMvcConfigurer extends WebMvcConfigurationSupport { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") - .allowedOrigins("*") + .allowedOriginPatterns(CorsConfiguration.ALL) .allowCredentials(true) .allowedMethods("GET", "POST", "DELETE", "PUT", "PATCH"); }