From 13411b45b275c69e981443bd34c094fecf9cb669 Mon Sep 17 00:00:00 2001
From: JEECG <445654970@qq.com>
Date: Tue, 21 Oct 2025 15:26:18 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=87=AA=E5=AE=9A=E4=B9=89CO?=
=?UTF-8?q?RS=E9=85=8D=E7=BD=AE=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=BA=94?=
=?UTF-8?q?=E7=94=A8=E7=AB=AF=E5=8F=A3=E4=B8=BA8082=EF=BC=8C=E5=8D=87?=
=?UTF-8?q?=E7=BA=A7jimureport=E4=BE=9D=E8=B5=96=E5=88=B02.1.5=E7=89=88?=
=?UTF-8?q?=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
jimureport-example/pom.xml | 2 +-
.../config/CustomCorsConfiguration.java | 18 ++++++++++++++++++
.../src/main/resources/application-dev.yml | 6 +++++-
3 files changed, 24 insertions(+), 2 deletions(-)
create mode 100644 jimureport-example/src/main/java/com/jeecg/modules/jmreport/config/CustomCorsConfiguration.java
diff --git a/jimureport-example/pom.xml b/jimureport-example/pom.xml
index cf32331..64f2d31 100644
--- a/jimureport-example/pom.xml
+++ b/jimureport-example/pom.xml
@@ -65,7 +65,7 @@
org.jeecgframework.jimureport
jimureport-spring-boot3-starter
- 2.1.3
+ 2.1.5
diff --git a/jimureport-example/src/main/java/com/jeecg/modules/jmreport/config/CustomCorsConfiguration.java b/jimureport-example/src/main/java/com/jeecg/modules/jmreport/config/CustomCorsConfiguration.java
new file mode 100644
index 0000000..cf94b16
--- /dev/null
+++ b/jimureport-example/src/main/java/com/jeecg/modules/jmreport/config/CustomCorsConfiguration.java
@@ -0,0 +1,18 @@
+package com.jeecg.modules.jmreport.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@Configuration("jmCorsConfiguration")
+public class CustomCorsConfiguration implements WebMvcConfigurer {
+ @Override
+ public void addCorsMappings(CorsRegistry registry) {
+ registry.addMapping("/**") // 所有接口
+ .allowCredentials(true) // 是否发送 Cookie
+ .allowedOriginPatterns("*") // 支持域
+ .allowedMethods(new String[]{"GET", "POST", "PUT", "DELETE"}) // 支持方法
+ .allowedHeaders("*")
+ .exposedHeaders("*");
+ }
+}
\ No newline at end of file
diff --git a/jimureport-example/src/main/resources/application-dev.yml b/jimureport-example/src/main/resources/application-dev.yml
index 714e82c..5539c90 100644
--- a/jimureport-example/src/main/resources/application-dev.yml
+++ b/jimureport-example/src/main/resources/application-dev.yml
@@ -1,5 +1,5 @@
server:
- port: 8085
+ port: 8082
spring:
#数据库
datasource:
@@ -69,6 +69,10 @@ jeecg:
sender: "???"
username: "??@??.com"
password: "???"
+ # 是否开启ssl
+ #ssl: true
+ # smtp端口
+ #port: 465
#多租户模式,默认值为空(created:按照创建人隔离、tenant:按照租户隔离)
saasMode:
# 平台上线安全配置