From fee63477b8a853cf457a3905e4b218adeecded26 Mon Sep 17 00:00:00 2001 From: ronger Date: Tue, 31 Jan 2023 19:13:09 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E9=A2=98=E5=BA=93=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=9C=B0=E5=9D=80=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rymcu/forest/answer/AnswerController.java | 4 +- src/main/resources/application-dev.yml | 41 ++++--------------- src/main/resources/application.yml | 9 +--- 3 files changed, 11 insertions(+), 43 deletions(-) diff --git a/src/main/java/com/rymcu/forest/answer/AnswerController.java b/src/main/java/com/rymcu/forest/answer/AnswerController.java index 0df99a0..910a21a 100644 --- a/src/main/java/com/rymcu/forest/answer/AnswerController.java +++ b/src/main/java/com/rymcu/forest/answer/AnswerController.java @@ -8,6 +8,7 @@ import com.rymcu.forest.entity.User; import com.rymcu.forest.enumerate.TransactionEnum; import com.rymcu.forest.util.HttpUtils; import com.rymcu.forest.util.UserUtils; +import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.*; import java.util.HashMap; @@ -20,7 +21,8 @@ import java.util.Map; @RequestMapping("/api/v1/answer") public class AnswerController { - private final static String ANSWER_API_URL = "https://test.rymcu.com/subject/question"; + @Value("${resource.answer-api-url}") + private String ANSWER_API_URL; @GetMapping("/today") public GlobalResult today() { diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 6ab975c..d2f1bea 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -34,7 +34,7 @@ spring: test-while-idle: true test-on-borrow: false test-on-return: false - connection-properties: config.decrypt=true;config.decrypt.key=${publickey} + connection-properties: config.decrypt=true;config.decrypt.key=${publicKey} filters: config,stat max-pool-prepared-statement-per-connection-size: 100 stat-view-servlet: @@ -50,29 +50,6 @@ spring: port: 465 username: service@rymcu.com password: 4W3tCXdyk0Gm -wx: - open: - componentAppId: wx9c4a7dfb3238d5f6 - componentSecret: e32a6f75ab6b746ec3ae38a39a79ba22 - componentToken: rymcu - componentAesKey: NWIwMDQyZjU0YWI2NGFlZThkOWZhZTg3NTg4NzQwN2E - mp: - configs: - - appId: wxf085386aa07c0857 - secret: aabd075d2851764714fd14a0d0b1b8b4 - token: rymcu - aesKey: lvn3mMSnFOvbnIJVNhHQqjWb9swe66L1xIcerJSs0fm - - appId: wxa49093339a5a822b - secret: 29e9390e6d58d57a2b2a2350dbee8754 - token: qwert - aesKey: - miniapp: - configs: - - appid: wxb4fff78a6b878cf7 - secret: c8735d0ccc8497b8509dc2762246cb37 - token: #微信小程序消息服务器配置的token - aesKey: #微信小程序消息服务器配置的EncodingAESKey - msgDataFormat: JSON env: dev logging: file: @@ -85,16 +62,12 @@ server: servlet: context-path: /forest max-http-header-size: 1048576 + shutdown: graceful + tomcat: + reject-illegal-header: false version: 1.0 resource: - domain: http://test.rymcu.com - file-path: http://test.rymcu.com + domain: https://test.rymcu.com + file-path: https://test.rymcu.com pic-path: /opt/nebula/static -baidu: - data: - site: https://rymcu.com - token: 9cdKR6bVCJzxDEJS - ai: - appId: 22891829 - appKey: HKxdO8ioaUmltZh0eaOVMsmW - secretKey: GXOtl3XtiIkVA3CPsc3c29Pqa4V290Yr \ No newline at end of file + answer-api-url: https://test.rymcu.com/subject/question diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 99c9014..6c1d560 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -71,12 +71,5 @@ resource: domain: http://yourdomain.com # 网站域名 file-path: http://yourdomain.com # 上传文件前缀域名 pic-path: /yoursrc/xx/nebula/static # 上传文件存储地址 -baidu: - data: - site: https://yourdomain.com # 百度搜索绑定网站域名 - token: xxxx - ai: - appId: xxx # 百度AI-文字识别 应用 appId - appKey: xxxx # 百度AI-文字识别 应用 appKey - secretKey: xxxx # 百度AI-文字识别 应用 secretKey + answer-api-url: https://test.rymcu.com/subject/question