mirror of
https://github.com/jeecgboot/JimuReport.git
synced 2025-11-28 01:07:14 +08:00
新增自定义CORS配置,修改应用端口为8082,升级jimureport依赖到2.1.5版本
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.jimureport</groupId>
|
||||
<artifactId>jimureport-spring-boot3-starter</artifactId>
|
||||
<version>2.1.3</version>
|
||||
<version>2.1.5</version>
|
||||
</dependency>
|
||||
<!-- mongo、redis和文件数据集支持包,按需引入 -->
|
||||
<dependency>
|
||||
|
||||
@@ -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("*");
|
||||
}
|
||||
}
|
||||
@@ -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:
|
||||
# 平台上线安全配置
|
||||
|
||||
Reference in New Issue
Block a user