From 04bed3ba3de8dea62d33c80c30d476cab0b78a3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E4=B9=85=E5=93=A5?= <787952492@qq.com> Date: Tue, 24 May 2022 11:40:33 +0800 Subject: [PATCH] =?UTF-8?q?wxcp=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cn/iocoder/yudao/config/WxCpConfigure.java | 4 +++- .../system/controller/admin/auth/AuthController.java | 2 +- yudao-server/src/main/resources/application.yaml | 7 ++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-biz-weixin/src/main/java/cn/iocoder/yudao/config/WxCpConfigure.java b/yudao-framework/yudao-spring-boot-starter-biz-weixin/src/main/java/cn/iocoder/yudao/config/WxCpConfigure.java index 5885862e..68859632 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-weixin/src/main/java/cn/iocoder/yudao/config/WxCpConfigure.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-weixin/src/main/java/cn/iocoder/yudao/config/WxCpConfigure.java @@ -13,9 +13,11 @@ import org.springframework.context.annotation.Scope; @Slf4j public class WxCpConfigure { - @Value("${corpId}") + @Value("${wxcp.corpId}") private String corpId; + @Value("${wxcp.farmAppid}") private String farmAppid; + @Value("${wxcp.farmSecret}") private String farmSecret; @Bean diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java index 5df142ba..41190212 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java @@ -67,7 +67,7 @@ public class AuthController { private WxCpService wxCpService; - @Value("${farm_secret}") + @Value("${wxcp.farmSecret}") private String farmSecret; @PostMapping("/login") diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index 59641853..64fe6faa 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -144,4 +144,9 @@ bxg: # sm.ms 图床的 token smms: - token: 1oOP3ykFDI0K6ifmtvU7c8Y1eTWZSlyl \ No newline at end of file + token: 1oOP3ykFDI0K6ifmtvU7c8Y1eTWZSlyl + +wxcp: + corpId: wwb9f9734e8e124761 + farmAppid: 1000033 + farmSecret: UDSKsn0_LAPYqSwjH9E-AfY_X40lq0sormfe1yV_6Gc \ No newline at end of file