From 81a02c759663cc65a295e01c989df5316504bdc2 Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Fri, 13 Feb 2026 14:55:40 +0800 Subject: [PATCH] =?UTF-8?q?redis=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hxgk/zxxy/service/impl/UserServiceImpl.java | 2 ++ src/main/resources/application-prodout.yml | 5 +++-- src/main/resources/application.yml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/hxgk/zxxy/service/impl/UserServiceImpl.java b/src/main/java/com/hxgk/zxxy/service/impl/UserServiceImpl.java index e4489f9..39f653d 100644 --- a/src/main/java/com/hxgk/zxxy/service/impl/UserServiceImpl.java +++ b/src/main/java/com/hxgk/zxxy/service/impl/UserServiceImpl.java @@ -39,6 +39,7 @@ public class UserServiceImpl implements UserService { for (Map.Entry entry : userInfo.entrySet()) { if (StringUtils.isNotEmpty(entry.getKey()) && entry.getKey().equals("userkey")) { + System.out.println(entry.getValue()); userkey = entry.getValue(); } if (StringUtils.isNotEmpty(entry.getKey()) && entry.getKey().equals("usertoken")) { @@ -46,6 +47,7 @@ public class UserServiceImpl implements UserService { } } //从redis中根据userkey和usertoken获取userDetail + System.out.println(userkey); String userRedisHashKey = "HXGK_GO_ZhixingCollege:ScanCode:Authentication:LoginApi_dev_" + userkey; Object value1 = redisTemplate.boundHashOps(userRedisHashKey).get("key"); diff --git a/src/main/resources/application-prodout.yml b/src/main/resources/application-prodout.yml index cd5b58e..dcd10e2 100644 --- a/src/main/resources/application-prodout.yml +++ b/src/main/resources/application-prodout.yml @@ -109,14 +109,15 @@ spring: strict: false redis: database: 5 - host: 127.0.0.1 + password: Redis+brngJ3U19@8_Z2^7a + host: 120.224.6.6 lettuce: pool: max-active: 10 max-idle: 10 max-wait: -1ms min-idle: 0 - port: 6379 + port: 16471 timeout: 10000 # Go 后端的 SM4 配置(Java 应该使用这些) sm4: diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 0f28338..63bc755 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,5 +1,5 @@ spring: profiles: - active: dev + active: prodout server: port: 8111 \ No newline at end of file