test: 补齐测试环境 cors 配置
This commit is contained in:
@@ -16,6 +16,13 @@ mybatis-plus:
|
|||||||
configuration:
|
configuration:
|
||||||
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||||
|
|
||||||
|
# 测试环境不激活 profile,而 src/test/resources/application.yml 会遮蔽 src/main/resources/application.yml,
|
||||||
|
# 因此这里必须显式声明 cors 配置,否则 WebMvcConfig 会因 allowedOrigins 为 null 抛 NPE
|
||||||
|
cors:
|
||||||
|
allowCredentials: true
|
||||||
|
allowed-origins:
|
||||||
|
- '*'
|
||||||
|
|
||||||
sa-token:
|
sa-token:
|
||||||
token-name: satoken
|
token-name: satoken
|
||||||
timeout: 2592000
|
timeout: 2592000
|
||||||
|
|||||||
Reference in New Issue
Block a user