From 5f92b2034f84caeab9cb6efc61ecbe22407935b4 Mon Sep 17 00:00:00 2001 From: vince <757871790@qq.com> Date: 星期二, 16 一月 2024 12:14:03 +0800 Subject: [PATCH] 优化主库协议,支持路由 --- src/main/java/com/fzzy/gateway/hx2023/controller/GatewayController.java | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/fzzy/gateway/hx2023/controller/GatewayController.java b/src/main/java/com/fzzy/gateway/hx2023/controller/GatewayController.java index 9919675..fd4433d 100644 --- a/src/main/java/com/fzzy/gateway/hx2023/controller/GatewayController.java +++ b/src/main/java/com/fzzy/gateway/hx2023/controller/GatewayController.java @@ -7,6 +7,7 @@ import com.fzzy.gateway.entity.GatewayConf; import com.fzzy.gateway.hx2023.data.GatewayAuthData; import com.fzzy.gateway.service.GatewayConfService; +import com.ld.license.LicenseVerify; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -84,7 +85,21 @@ json.put("message", "鎴愬姛"); json.put("status", 0); json.put("code", 200); - return json; + try{ + LicenseVerify licenseVerify = new LicenseVerify(); + //鏍¢獙璇佷功鏄惁鏈夋晥 + boolean verifyResult = licenseVerify.verify(); + + if(verifyResult){ + return json; + }else{ + log.error("璇佷功楠岃瘉澶辫触!鎷掔粷璁块棶"); + return null; + } + }catch (Exception e){ + log.error("璇佷功楠岃瘉澶辫触:" + e.getMessage(),e); + return null; + } } public void updateGatewayToken(String token, String username) { -- Gitblit v1.9.3