From dc4851acd5758c0b2481b30d78e03a4439a006ea Mon Sep 17 00:00:00 2001 From: "LAPTOP-0SF788NU\\admin" <3306174053@qq.com> Date: Thu, 9 Nov 2023 15:23:15 +0800 Subject: [PATCH] =?UTF-8?q?License(=E8=AF=81=E4=B9=A6=E8=AE=A4=E8=AF=81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/{zifangsky => }/ClientDemoApplication.java | 2 +- .../{zifangsky => }/common/SpringContextUtils.java | 2 +- .../src/main/java/cn}/config/RestTemplateConfig.java | 2 +- .../java/cn/{zifangsky => }/config/WebMvcConfig.java | 4 ++-- .../{zifangsky => }/controller/LoginController.java | 2 +- .../main/java/cn}/license/AbstractServerInfos.java | 2 +- .../{zifangsky => }/license/CustomKeyStoreParam.java | 2 +- .../license/CustomLicenseManager.java | 11 ++++++----- .../license/LicenseCheckInterceptor.java | 2 +- .../license/LicenseCheckListener.java | 2 +- .../src/main/java/cn}/license/LicenseCheckModel.java | 2 +- .../license/LicenseManagerHolder.java | 2 +- .../cn/{zifangsky => }/license/LicenseVerify.java | 2 +- .../{zifangsky => }/license/LicenseVerifyParam.java | 2 +- .../cn/{zifangsky => }/license/LinuxServerInfos.java | 2 +- .../{zifangsky => }/license/WindowsServerInfos.java | 2 +- .../src/main/resources/license-config.properties | 4 ++-- .../{zifangsky => }/ClientDemoApplicationTests.java | 2 +- ServerDemo/pom.xml | 2 +- .../yudao/server}/ServerDemoApplication.java | 2 +- .../yudao/server}/common/SpringContextUtils.java | 2 +- .../yudao/server}/config/RestTemplateConfig.java | 2 +- .../yudao/server}/config/WebMvcConfig.java | 2 +- .../server}/controller/LicenseCreatorController.java | 9 ++------- .../yudao/server}/license/AbstractServerInfos.java | 2 +- .../yudao/server}/license/CustomKeyStoreParam.java | 8 ++------ .../yudao/server}/license/CustomLicenseManager.java | 11 +++-------- .../yudao/server}/license/LicenseCheckModel.java | 2 +- .../yudao/server}/license/LicenseCreator.java | 12 +++--------- .../yudao/server}/license/LicenseCreatorParam.java | 2 +- .../yudao/server}/license/LinuxServerInfos.java | 2 +- .../yudao/server}/license/WindowsServerInfos.java | 2 +- .../src/main/resources/license-config.properties | 2 +- .../{zifangsky => }/ServerDemoApplicationTests.java | 2 +- 34 files changed, 47 insertions(+), 66 deletions(-) rename ClientDemo/src/main/java/cn/{zifangsky => }/ClientDemoApplication.java (96%) rename ClientDemo/src/main/java/cn/{zifangsky => }/common/SpringContextUtils.java (98%) rename {ServerDemo/src/main/java/cn/zifangsky => ClientDemo/src/main/java/cn}/config/RestTemplateConfig.java (99%) rename ClientDemo/src/main/java/cn/{zifangsky => }/config/WebMvcConfig.java (91%) rename ClientDemo/src/main/java/cn/{zifangsky => }/controller/LoginController.java (97%) rename {ServerDemo/src/main/java/cn/zifangsky => ClientDemo/src/main/java/cn}/license/AbstractServerInfos.java (99%) rename ClientDemo/src/main/java/cn/{zifangsky => }/license/CustomKeyStoreParam.java (98%) rename ClientDemo/src/main/java/cn/{zifangsky => }/license/CustomLicenseManager.java (96%) rename ClientDemo/src/main/java/cn/{zifangsky => }/license/LicenseCheckInterceptor.java (97%) rename ClientDemo/src/main/java/cn/{zifangsky => }/license/LicenseCheckListener.java (98%) rename {ServerDemo/src/main/java/cn/zifangsky => ClientDemo/src/main/java/cn}/license/LicenseCheckModel.java (98%) rename ClientDemo/src/main/java/cn/{zifangsky => }/license/LicenseManagerHolder.java (95%) rename ClientDemo/src/main/java/cn/{zifangsky => }/license/LicenseVerify.java (99%) rename ClientDemo/src/main/java/cn/{zifangsky => }/license/LicenseVerifyParam.java (98%) rename ClientDemo/src/main/java/cn/{zifangsky => }/license/LinuxServerInfos.java (98%) rename ClientDemo/src/main/java/cn/{zifangsky => }/license/WindowsServerInfos.java (98%) rename ClientDemo/src/test/java/cn/{zifangsky => }/ClientDemoApplicationTests.java (93%) rename ServerDemo/src/main/java/cn/{zifangsky => iocoder/yudao/server}/ServerDemoApplication.java (93%) rename ServerDemo/src/main/java/cn/{zifangsky => iocoder/yudao/server}/common/SpringContextUtils.java (97%) rename {ClientDemo/src/main/java/cn/zifangsky => ServerDemo/src/main/java/cn/iocoder/yudao/server}/config/RestTemplateConfig.java (98%) rename ServerDemo/src/main/java/cn/{zifangsky => iocoder/yudao/server}/config/WebMvcConfig.java (93%) rename ServerDemo/src/main/java/cn/{zifangsky => iocoder/yudao/server}/controller/LicenseCreatorController.java (91%) rename {ClientDemo/src/main/java/cn/zifangsky => ServerDemo/src/main/java/cn/iocoder/yudao/server}/license/AbstractServerInfos.java (99%) rename ServerDemo/src/main/java/cn/{zifangsky => iocoder/yudao/server}/license/CustomKeyStoreParam.java (89%) rename ServerDemo/src/main/java/cn/{zifangsky => iocoder/yudao/server}/license/CustomLicenseManager.java (96%) rename {ClientDemo/src/main/java/cn/zifangsky => ServerDemo/src/main/java/cn/iocoder/yudao/server}/license/LicenseCheckModel.java (97%) rename ServerDemo/src/main/java/cn/{zifangsky => iocoder/yudao/server}/license/LicenseCreator.java (89%) rename ServerDemo/src/main/java/cn/{zifangsky => iocoder/yudao/server}/license/LicenseCreatorParam.java (99%) rename ServerDemo/src/main/java/cn/{zifangsky => iocoder/yudao/server}/license/LinuxServerInfos.java (98%) rename ServerDemo/src/main/java/cn/{zifangsky => iocoder/yudao/server}/license/WindowsServerInfos.java (98%) rename ServerDemo/src/test/java/cn/{zifangsky => }/ServerDemoApplicationTests.java (93%) diff --git a/ClientDemo/src/main/java/cn/zifangsky/ClientDemoApplication.java b/ClientDemo/src/main/java/cn/ClientDemoApplication.java similarity index 96% rename from ClientDemo/src/main/java/cn/zifangsky/ClientDemoApplication.java rename to ClientDemo/src/main/java/cn/ClientDemoApplication.java index c1037a1..e9ed162 100644 --- a/ClientDemo/src/main/java/cn/zifangsky/ClientDemoApplication.java +++ b/ClientDemo/src/main/java/cn/ClientDemoApplication.java @@ -1,4 +1,4 @@ -package cn.zifangsky; +package cn; import org.springframework.boot.Banner; import org.springframework.boot.SpringApplication; diff --git a/ClientDemo/src/main/java/cn/zifangsky/common/SpringContextUtils.java b/ClientDemo/src/main/java/cn/common/SpringContextUtils.java similarity index 98% rename from ClientDemo/src/main/java/cn/zifangsky/common/SpringContextUtils.java rename to ClientDemo/src/main/java/cn/common/SpringContextUtils.java index f801168..8bff360 100644 --- a/ClientDemo/src/main/java/cn/zifangsky/common/SpringContextUtils.java +++ b/ClientDemo/src/main/java/cn/common/SpringContextUtils.java @@ -1,4 +1,4 @@ -package cn.zifangsky.common; +package cn.common; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; diff --git a/ServerDemo/src/main/java/cn/zifangsky/config/RestTemplateConfig.java b/ClientDemo/src/main/java/cn/config/RestTemplateConfig.java similarity index 99% rename from ServerDemo/src/main/java/cn/zifangsky/config/RestTemplateConfig.java rename to ClientDemo/src/main/java/cn/config/RestTemplateConfig.java index 623b57d..d278a0f 100644 --- a/ServerDemo/src/main/java/cn/zifangsky/config/RestTemplateConfig.java +++ b/ClientDemo/src/main/java/cn/config/RestTemplateConfig.java @@ -1,4 +1,4 @@ -package cn.zifangsky.config; +package cn.config; import org.apache.http.Header; import org.apache.http.client.HttpClient; diff --git a/ClientDemo/src/main/java/cn/zifangsky/config/WebMvcConfig.java b/ClientDemo/src/main/java/cn/config/WebMvcConfig.java similarity index 91% rename from ClientDemo/src/main/java/cn/zifangsky/config/WebMvcConfig.java rename to ClientDemo/src/main/java/cn/config/WebMvcConfig.java index 5942406..7b75b86 100644 --- a/ClientDemo/src/main/java/cn/zifangsky/config/WebMvcConfig.java +++ b/ClientDemo/src/main/java/cn/config/WebMvcConfig.java @@ -1,6 +1,6 @@ -package cn.zifangsky.config; +package cn.config; -import cn.zifangsky.license.LicenseCheckInterceptor; +import cn.license.LicenseCheckInterceptor; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; diff --git a/ClientDemo/src/main/java/cn/zifangsky/controller/LoginController.java b/ClientDemo/src/main/java/cn/controller/LoginController.java similarity index 97% rename from ClientDemo/src/main/java/cn/zifangsky/controller/LoginController.java rename to ClientDemo/src/main/java/cn/controller/LoginController.java index d816618..0d25647 100644 --- a/ClientDemo/src/main/java/cn/zifangsky/controller/LoginController.java +++ b/ClientDemo/src/main/java/cn/controller/LoginController.java @@ -1,4 +1,4 @@ -package cn.zifangsky.controller; +package cn.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PostMapping; diff --git a/ServerDemo/src/main/java/cn/zifangsky/license/AbstractServerInfos.java b/ClientDemo/src/main/java/cn/license/AbstractServerInfos.java similarity index 99% rename from ServerDemo/src/main/java/cn/zifangsky/license/AbstractServerInfos.java rename to ClientDemo/src/main/java/cn/license/AbstractServerInfos.java index 4424a1c..1487038 100644 --- a/ServerDemo/src/main/java/cn/zifangsky/license/AbstractServerInfos.java +++ b/ClientDemo/src/main/java/cn/license/AbstractServerInfos.java @@ -1,4 +1,4 @@ -package cn.zifangsky.license; +package cn.license; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/ClientDemo/src/main/java/cn/zifangsky/license/CustomKeyStoreParam.java b/ClientDemo/src/main/java/cn/license/CustomKeyStoreParam.java similarity index 98% rename from ClientDemo/src/main/java/cn/zifangsky/license/CustomKeyStoreParam.java rename to ClientDemo/src/main/java/cn/license/CustomKeyStoreParam.java index 5a3c2f9..67698b4 100644 --- a/ClientDemo/src/main/java/cn/zifangsky/license/CustomKeyStoreParam.java +++ b/ClientDemo/src/main/java/cn/license/CustomKeyStoreParam.java @@ -1,4 +1,4 @@ -package cn.zifangsky.license; +package cn.license; import de.schlichtherle.license.AbstractKeyStoreParam; diff --git a/ClientDemo/src/main/java/cn/zifangsky/license/CustomLicenseManager.java b/ClientDemo/src/main/java/cn/license/CustomLicenseManager.java similarity index 96% rename from ClientDemo/src/main/java/cn/zifangsky/license/CustomLicenseManager.java rename to ClientDemo/src/main/java/cn/license/CustomLicenseManager.java index ce90b97..94878e7 100644 --- a/ClientDemo/src/main/java/cn/zifangsky/license/CustomLicenseManager.java +++ b/ClientDemo/src/main/java/cn/license/CustomLicenseManager.java @@ -1,4 +1,4 @@ -package cn.zifangsky.license; +package cn.license; import de.schlichtherle.license.LicenseContent; import de.schlichtherle.license.LicenseContentException; @@ -159,10 +159,11 @@ public class CustomLicenseManager extends LicenseManager{ LicenseCheckModel serverCheckModel = getServerInfos(); if(expectedCheckModel != null && serverCheckModel != null){ - //校验IP地址 - if(!checkIpAddress(expectedCheckModel.getIpAddress(),serverCheckModel.getIpAddress())){ - throw new LicenseContentException("当前服务器的IP没在授权范围内"); - } + //项目中不需要校验ip所以注释掉 +// //校验IP地址 +// if(!checkIpAddress(expectedCheckModel.getIpAddress(),serverCheckModel.getIpAddress())){ +// throw new LicenseContentException("当前服务器的IP没在授权范围内"); +// } //校验Mac地址 if(!checkIpAddress(expectedCheckModel.getMacAddress(),serverCheckModel.getMacAddress())){ diff --git a/ClientDemo/src/main/java/cn/zifangsky/license/LicenseCheckInterceptor.java b/ClientDemo/src/main/java/cn/license/LicenseCheckInterceptor.java similarity index 97% rename from ClientDemo/src/main/java/cn/zifangsky/license/LicenseCheckInterceptor.java rename to ClientDemo/src/main/java/cn/license/LicenseCheckInterceptor.java index 1d8829d..5324870 100644 --- a/ClientDemo/src/main/java/cn/zifangsky/license/LicenseCheckInterceptor.java +++ b/ClientDemo/src/main/java/cn/license/LicenseCheckInterceptor.java @@ -1,4 +1,4 @@ -package cn.zifangsky.license; +package cn.license; import com.alibaba.fastjson.JSON; import org.apache.logging.log4j.LogManager; diff --git a/ClientDemo/src/main/java/cn/zifangsky/license/LicenseCheckListener.java b/ClientDemo/src/main/java/cn/license/LicenseCheckListener.java similarity index 98% rename from ClientDemo/src/main/java/cn/zifangsky/license/LicenseCheckListener.java rename to ClientDemo/src/main/java/cn/license/LicenseCheckListener.java index 4adfaa0..b30ebfb 100644 --- a/ClientDemo/src/main/java/cn/zifangsky/license/LicenseCheckListener.java +++ b/ClientDemo/src/main/java/cn/license/LicenseCheckListener.java @@ -1,4 +1,4 @@ -package cn.zifangsky.license; +package cn.license; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; diff --git a/ServerDemo/src/main/java/cn/zifangsky/license/LicenseCheckModel.java b/ClientDemo/src/main/java/cn/license/LicenseCheckModel.java similarity index 98% rename from ServerDemo/src/main/java/cn/zifangsky/license/LicenseCheckModel.java rename to ClientDemo/src/main/java/cn/license/LicenseCheckModel.java index 7ce412c..6974e97 100644 --- a/ServerDemo/src/main/java/cn/zifangsky/license/LicenseCheckModel.java +++ b/ClientDemo/src/main/java/cn/license/LicenseCheckModel.java @@ -1,4 +1,4 @@ -package cn.zifangsky.license; +package cn.license; import java.io.Serializable; import java.util.List; diff --git a/ClientDemo/src/main/java/cn/zifangsky/license/LicenseManagerHolder.java b/ClientDemo/src/main/java/cn/license/LicenseManagerHolder.java similarity index 95% rename from ClientDemo/src/main/java/cn/zifangsky/license/LicenseManagerHolder.java rename to ClientDemo/src/main/java/cn/license/LicenseManagerHolder.java index 2f8dd04..0c0a386 100644 --- a/ClientDemo/src/main/java/cn/zifangsky/license/LicenseManagerHolder.java +++ b/ClientDemo/src/main/java/cn/license/LicenseManagerHolder.java @@ -1,4 +1,4 @@ -package cn.zifangsky.license; +package cn.license; import de.schlichtherle.license.LicenseManager; import de.schlichtherle.license.LicenseParam; diff --git a/ClientDemo/src/main/java/cn/zifangsky/license/LicenseVerify.java b/ClientDemo/src/main/java/cn/license/LicenseVerify.java similarity index 99% rename from ClientDemo/src/main/java/cn/zifangsky/license/LicenseVerify.java rename to ClientDemo/src/main/java/cn/license/LicenseVerify.java index 90823b2..7082587 100644 --- a/ClientDemo/src/main/java/cn/zifangsky/license/LicenseVerify.java +++ b/ClientDemo/src/main/java/cn/license/LicenseVerify.java @@ -1,4 +1,4 @@ -package cn.zifangsky.license; +package cn.license; import de.schlichtherle.license.*; import org.apache.logging.log4j.LogManager; diff --git a/ClientDemo/src/main/java/cn/zifangsky/license/LicenseVerifyParam.java b/ClientDemo/src/main/java/cn/license/LicenseVerifyParam.java similarity index 98% rename from ClientDemo/src/main/java/cn/zifangsky/license/LicenseVerifyParam.java rename to ClientDemo/src/main/java/cn/license/LicenseVerifyParam.java index 7f45ba3..3bffa30 100644 --- a/ClientDemo/src/main/java/cn/zifangsky/license/LicenseVerifyParam.java +++ b/ClientDemo/src/main/java/cn/license/LicenseVerifyParam.java @@ -1,4 +1,4 @@ -package cn.zifangsky.license; +package cn.license; /** * License校验类需要的参数 diff --git a/ClientDemo/src/main/java/cn/zifangsky/license/LinuxServerInfos.java b/ClientDemo/src/main/java/cn/license/LinuxServerInfos.java similarity index 98% rename from ClientDemo/src/main/java/cn/zifangsky/license/LinuxServerInfos.java rename to ClientDemo/src/main/java/cn/license/LinuxServerInfos.java index 1735f6e..fc85b05 100644 --- a/ClientDemo/src/main/java/cn/zifangsky/license/LinuxServerInfos.java +++ b/ClientDemo/src/main/java/cn/license/LinuxServerInfos.java @@ -1,4 +1,4 @@ -package cn.zifangsky.license; +package cn.license; import org.apache.commons.lang3.StringUtils; diff --git a/ClientDemo/src/main/java/cn/zifangsky/license/WindowsServerInfos.java b/ClientDemo/src/main/java/cn/license/WindowsServerInfos.java similarity index 98% rename from ClientDemo/src/main/java/cn/zifangsky/license/WindowsServerInfos.java rename to ClientDemo/src/main/java/cn/license/WindowsServerInfos.java index c9d3cd5..f2d1ede 100644 --- a/ClientDemo/src/main/java/cn/zifangsky/license/WindowsServerInfos.java +++ b/ClientDemo/src/main/java/cn/license/WindowsServerInfos.java @@ -1,4 +1,4 @@ -package cn.zifangsky.license; +package cn.license; import java.net.InetAddress; import java.util.List; diff --git a/ClientDemo/src/main/resources/license-config.properties b/ClientDemo/src/main/resources/license-config.properties index 8de928f..93da944 100644 --- a/ClientDemo/src/main/resources/license-config.properties +++ b/ClientDemo/src/main/resources/license-config.properties @@ -2,5 +2,5 @@ license.subject=license_demo license.publicAlias=publicCert license.storePass=public_password1234 -license.licensePath=C:/Users/zifangsky/Desktop/license_demo/license.lic -license.publicKeysStorePath=C:/Users/zifangsky/Desktop/license_demo/publicCerts.keystore +license.licensePath=D:/license.lic +license.publicKeysStorePath=D:/publicCerts.keystore diff --git a/ClientDemo/src/test/java/cn/zifangsky/ClientDemoApplicationTests.java b/ClientDemo/src/test/java/cn/ClientDemoApplicationTests.java similarity index 93% rename from ClientDemo/src/test/java/cn/zifangsky/ClientDemoApplicationTests.java rename to ClientDemo/src/test/java/cn/ClientDemoApplicationTests.java index e471e40..0bb5af3 100644 --- a/ClientDemo/src/test/java/cn/zifangsky/ClientDemoApplicationTests.java +++ b/ClientDemo/src/test/java/cn/ClientDemoApplicationTests.java @@ -1,4 +1,4 @@ -package cn.zifangsky; +package cn; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/ServerDemo/pom.xml b/ServerDemo/pom.xml index 56f41f2..08dfc87 100644 --- a/ServerDemo/pom.xml +++ b/ServerDemo/pom.xml @@ -14,7 +14,7 @@ org.springframework.boot spring-boot-starter-parent - 2.0.3.RELEASE + 2.0.0.RELEASE diff --git a/ServerDemo/src/main/java/cn/zifangsky/ServerDemoApplication.java b/ServerDemo/src/main/java/cn/iocoder/yudao/server/ServerDemoApplication.java similarity index 93% rename from ServerDemo/src/main/java/cn/zifangsky/ServerDemoApplication.java rename to ServerDemo/src/main/java/cn/iocoder/yudao/server/ServerDemoApplication.java index 95dbd34..5acdabc 100644 --- a/ServerDemo/src/main/java/cn/zifangsky/ServerDemoApplication.java +++ b/ServerDemo/src/main/java/cn/iocoder/yudao/server/ServerDemoApplication.java @@ -1,4 +1,4 @@ -package cn.zifangsky; +package cn.iocoder.yudao.server; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/ServerDemo/src/main/java/cn/zifangsky/common/SpringContextUtils.java b/ServerDemo/src/main/java/cn/iocoder/yudao/server/common/SpringContextUtils.java similarity index 97% rename from ServerDemo/src/main/java/cn/zifangsky/common/SpringContextUtils.java rename to ServerDemo/src/main/java/cn/iocoder/yudao/server/common/SpringContextUtils.java index f801168..358f12d 100644 --- a/ServerDemo/src/main/java/cn/zifangsky/common/SpringContextUtils.java +++ b/ServerDemo/src/main/java/cn/iocoder/yudao/server/common/SpringContextUtils.java @@ -1,4 +1,4 @@ -package cn.zifangsky.common; +package cn.iocoder.yudao.server.common; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; diff --git a/ClientDemo/src/main/java/cn/zifangsky/config/RestTemplateConfig.java b/ServerDemo/src/main/java/cn/iocoder/yudao/server/config/RestTemplateConfig.java similarity index 98% rename from ClientDemo/src/main/java/cn/zifangsky/config/RestTemplateConfig.java rename to ServerDemo/src/main/java/cn/iocoder/yudao/server/config/RestTemplateConfig.java index 623b57d..0d90b5c 100644 --- a/ClientDemo/src/main/java/cn/zifangsky/config/RestTemplateConfig.java +++ b/ServerDemo/src/main/java/cn/iocoder/yudao/server/config/RestTemplateConfig.java @@ -1,4 +1,4 @@ -package cn.zifangsky.config; +package cn.iocoder.yudao.server.config; import org.apache.http.Header; import org.apache.http.client.HttpClient; diff --git a/ServerDemo/src/main/java/cn/zifangsky/config/WebMvcConfig.java b/ServerDemo/src/main/java/cn/iocoder/yudao/server/config/WebMvcConfig.java similarity index 93% rename from ServerDemo/src/main/java/cn/zifangsky/config/WebMvcConfig.java rename to ServerDemo/src/main/java/cn/iocoder/yudao/server/config/WebMvcConfig.java index 0235e3e..8c35ca8 100644 --- a/ServerDemo/src/main/java/cn/zifangsky/config/WebMvcConfig.java +++ b/ServerDemo/src/main/java/cn/iocoder/yudao/server/config/WebMvcConfig.java @@ -1,4 +1,4 @@ -package cn.zifangsky.config; +package cn.iocoder.yudao.server.config; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; diff --git a/ServerDemo/src/main/java/cn/zifangsky/controller/LicenseCreatorController.java b/ServerDemo/src/main/java/cn/iocoder/yudao/server/controller/LicenseCreatorController.java similarity index 91% rename from ServerDemo/src/main/java/cn/zifangsky/controller/LicenseCreatorController.java rename to ServerDemo/src/main/java/cn/iocoder/yudao/server/controller/LicenseCreatorController.java index 83b38ea..a26850e 100644 --- a/ServerDemo/src/main/java/cn/zifangsky/controller/LicenseCreatorController.java +++ b/ServerDemo/src/main/java/cn/iocoder/yudao/server/controller/LicenseCreatorController.java @@ -1,11 +1,6 @@ -package cn.zifangsky.controller; +package cn.iocoder.yudao.server.controller; -import cn.zifangsky.license.LicenseCreator; -import cn.zifangsky.license.LinuxServerInfos; -import cn.zifangsky.license.AbstractServerInfos; -import cn.zifangsky.license.LicenseCheckModel; -import cn.zifangsky.license.LicenseCreatorParam; -import cn.zifangsky.license.WindowsServerInfos; +import cn.iocoder.yudao.server.license.*; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.MediaType; diff --git a/ClientDemo/src/main/java/cn/zifangsky/license/AbstractServerInfos.java b/ServerDemo/src/main/java/cn/iocoder/yudao/server/license/AbstractServerInfos.java similarity index 99% rename from ClientDemo/src/main/java/cn/zifangsky/license/AbstractServerInfos.java rename to ServerDemo/src/main/java/cn/iocoder/yudao/server/license/AbstractServerInfos.java index 4424a1c..e86eca1 100644 --- a/ClientDemo/src/main/java/cn/zifangsky/license/AbstractServerInfos.java +++ b/ServerDemo/src/main/java/cn/iocoder/yudao/server/license/AbstractServerInfos.java @@ -1,4 +1,4 @@ -package cn.zifangsky.license; +package cn.iocoder.yudao.server.license; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/ServerDemo/src/main/java/cn/zifangsky/license/CustomKeyStoreParam.java b/ServerDemo/src/main/java/cn/iocoder/yudao/server/license/CustomKeyStoreParam.java similarity index 89% rename from ServerDemo/src/main/java/cn/zifangsky/license/CustomKeyStoreParam.java rename to ServerDemo/src/main/java/cn/iocoder/yudao/server/license/CustomKeyStoreParam.java index 5a3c2f9..6f8f139 100644 --- a/ServerDemo/src/main/java/cn/zifangsky/license/CustomKeyStoreParam.java +++ b/ServerDemo/src/main/java/cn/iocoder/yudao/server/license/CustomKeyStoreParam.java @@ -1,12 +1,8 @@ -package cn.zifangsky.license; +package cn.iocoder.yudao.server.license; import de.schlichtherle.license.AbstractKeyStoreParam; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; +import java.io.*; /** * 自定义KeyStoreParam,用于将公私钥存储文件存放到其他磁盘位置而不是项目中 diff --git a/ServerDemo/src/main/java/cn/zifangsky/license/CustomLicenseManager.java b/ServerDemo/src/main/java/cn/iocoder/yudao/server/license/CustomLicenseManager.java similarity index 96% rename from ServerDemo/src/main/java/cn/zifangsky/license/CustomLicenseManager.java rename to ServerDemo/src/main/java/cn/iocoder/yudao/server/license/CustomLicenseManager.java index af82889..f0a0337 100644 --- a/ServerDemo/src/main/java/cn/zifangsky/license/CustomLicenseManager.java +++ b/ServerDemo/src/main/java/cn/iocoder/yudao/server/license/CustomLicenseManager.java @@ -1,11 +1,6 @@ -package cn.zifangsky.license; - -import de.schlichtherle.license.LicenseContent; -import de.schlichtherle.license.LicenseContentException; -import de.schlichtherle.license.LicenseManager; -import de.schlichtherle.license.LicenseNotary; -import de.schlichtherle.license.LicenseParam; -import de.schlichtherle.license.NoLicenseInstalledException; +package cn.iocoder.yudao.server.license; + +import de.schlichtherle.license.*; import de.schlichtherle.xml.GenericCertificate; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; diff --git a/ClientDemo/src/main/java/cn/zifangsky/license/LicenseCheckModel.java b/ServerDemo/src/main/java/cn/iocoder/yudao/server/license/LicenseCheckModel.java similarity index 97% rename from ClientDemo/src/main/java/cn/zifangsky/license/LicenseCheckModel.java rename to ServerDemo/src/main/java/cn/iocoder/yudao/server/license/LicenseCheckModel.java index 7ce412c..b2429b5 100644 --- a/ClientDemo/src/main/java/cn/zifangsky/license/LicenseCheckModel.java +++ b/ServerDemo/src/main/java/cn/iocoder/yudao/server/license/LicenseCheckModel.java @@ -1,4 +1,4 @@ -package cn.zifangsky.license; +package cn.iocoder.yudao.server.license; import java.io.Serializable; import java.util.List; diff --git a/ServerDemo/src/main/java/cn/zifangsky/license/LicenseCreator.java b/ServerDemo/src/main/java/cn/iocoder/yudao/server/license/LicenseCreator.java similarity index 89% rename from ServerDemo/src/main/java/cn/zifangsky/license/LicenseCreator.java rename to ServerDemo/src/main/java/cn/iocoder/yudao/server/license/LicenseCreator.java index 91e8d9b..db4506d 100644 --- a/ServerDemo/src/main/java/cn/zifangsky/license/LicenseCreator.java +++ b/ServerDemo/src/main/java/cn/iocoder/yudao/server/license/LicenseCreator.java @@ -1,12 +1,6 @@ -package cn.zifangsky.license; - -import de.schlichtherle.license.CipherParam; -import de.schlichtherle.license.DefaultCipherParam; -import de.schlichtherle.license.DefaultLicenseParam; -import de.schlichtherle.license.KeyStoreParam; -import de.schlichtherle.license.LicenseContent; -import de.schlichtherle.license.LicenseManager; -import de.schlichtherle.license.LicenseParam; +package cn.iocoder.yudao.server.license; + +import de.schlichtherle.license.*; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/ServerDemo/src/main/java/cn/zifangsky/license/LicenseCreatorParam.java b/ServerDemo/src/main/java/cn/iocoder/yudao/server/license/LicenseCreatorParam.java similarity index 99% rename from ServerDemo/src/main/java/cn/zifangsky/license/LicenseCreatorParam.java rename to ServerDemo/src/main/java/cn/iocoder/yudao/server/license/LicenseCreatorParam.java index 6519091..94c12e2 100644 --- a/ServerDemo/src/main/java/cn/zifangsky/license/LicenseCreatorParam.java +++ b/ServerDemo/src/main/java/cn/iocoder/yudao/server/license/LicenseCreatorParam.java @@ -1,4 +1,4 @@ -package cn.zifangsky.license; +package cn.iocoder.yudao.server.license; import com.fasterxml.jackson.annotation.JsonFormat; diff --git a/ServerDemo/src/main/java/cn/zifangsky/license/LinuxServerInfos.java b/ServerDemo/src/main/java/cn/iocoder/yudao/server/license/LinuxServerInfos.java similarity index 98% rename from ServerDemo/src/main/java/cn/zifangsky/license/LinuxServerInfos.java rename to ServerDemo/src/main/java/cn/iocoder/yudao/server/license/LinuxServerInfos.java index 42ac30b..7d9b89c 100644 --- a/ServerDemo/src/main/java/cn/zifangsky/license/LinuxServerInfos.java +++ b/ServerDemo/src/main/java/cn/iocoder/yudao/server/license/LinuxServerInfos.java @@ -1,4 +1,4 @@ -package cn.zifangsky.license; +package cn.iocoder.yudao.server.license; import org.apache.commons.lang3.StringUtils; diff --git a/ServerDemo/src/main/java/cn/zifangsky/license/WindowsServerInfos.java b/ServerDemo/src/main/java/cn/iocoder/yudao/server/license/WindowsServerInfos.java similarity index 98% rename from ServerDemo/src/main/java/cn/zifangsky/license/WindowsServerInfos.java rename to ServerDemo/src/main/java/cn/iocoder/yudao/server/license/WindowsServerInfos.java index bec7359..c32165b 100644 --- a/ServerDemo/src/main/java/cn/zifangsky/license/WindowsServerInfos.java +++ b/ServerDemo/src/main/java/cn/iocoder/yudao/server/license/WindowsServerInfos.java @@ -1,4 +1,4 @@ -package cn.zifangsky.license; +package cn.iocoder.yudao.server.license; import java.net.InetAddress; import java.util.List; diff --git a/ServerDemo/src/main/resources/license-config.properties b/ServerDemo/src/main/resources/license-config.properties index 2ab483d..cd0635c 100644 --- a/ServerDemo/src/main/resources/license-config.properties +++ b/ServerDemo/src/main/resources/license-config.properties @@ -1,2 +1,2 @@ #License相关配置 -license.licensePath=C:/Users/zifangsky/Desktop/license_demo/license.lic +license.licensePath=D:/license.lic diff --git a/ServerDemo/src/test/java/cn/zifangsky/ServerDemoApplicationTests.java b/ServerDemo/src/test/java/cn/ServerDemoApplicationTests.java similarity index 93% rename from ServerDemo/src/test/java/cn/zifangsky/ServerDemoApplicationTests.java rename to ServerDemo/src/test/java/cn/ServerDemoApplicationTests.java index 104d429..4e4a01c 100644 --- a/ServerDemo/src/test/java/cn/zifangsky/ServerDemoApplicationTests.java +++ b/ServerDemo/src/test/java/cn/ServerDemoApplicationTests.java @@ -1,4 +1,4 @@ -package cn.zifangsky; +package cn; import org.junit.Test; import org.junit.runner.RunWith;