Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
75d223f4
提交
75d223f4
authored
8月 11, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of github.com:dataease/dataease into dev
上级
4cef74e4
5235c725
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
8 行增加
和
1 行删除
+8
-1
LicStatusCondition.java
...ava/io/dataease/commons/condition/LicStatusCondition.java
+5
-1
DefaultLicenseService.java
...va/io/dataease/commons/license/DefaultLicenseService.java
+3
-0
没有找到文件。
backend/src/main/java/io/dataease/commons/condition/LicStatusCondition.java
浏览文件 @
75d223f4
...
@@ -2,6 +2,7 @@ package io.dataease.commons.condition;
...
@@ -2,6 +2,7 @@ package io.dataease.commons.condition;
import
io.dataease.commons.license.DefaultLicenseService
;
import
io.dataease.commons.license.DefaultLicenseService
;
import
io.dataease.commons.license.F2CLicenseResponse
;
import
io.dataease.commons.license.F2CLicenseResponse
;
import
io.dataease.commons.utils.CommonBeanFactory
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.context.annotation.Condition
;
import
org.springframework.context.annotation.Condition
;
import
org.springframework.context.annotation.ConditionContext
;
import
org.springframework.context.annotation.ConditionContext
;
...
@@ -15,7 +16,10 @@ public class LicStatusCondition implements Condition {
...
@@ -15,7 +16,10 @@ public class LicStatusCondition implements Condition {
public
boolean
matches
(
ConditionContext
conditionContext
,
AnnotatedTypeMetadata
annotatedTypeMetadata
)
{
public
boolean
matches
(
ConditionContext
conditionContext
,
AnnotatedTypeMetadata
annotatedTypeMetadata
)
{
// BeanDefinitionRegistry registry = conditionContext.getRegistry();
// BeanDefinitionRegistry registry = conditionContext.getRegistry();
DefaultLicenseService
defaultLicenseService
=
conditionContext
.
getBeanFactory
().
getBean
(
DefaultLicenseService
.
class
);
// DefaultLicenseService defaultLicenseService = conditionContext.getBeanFactory().getBean(DefaultLicenseService.class);
DefaultLicenseService
defaultLicenseService
=
CommonBeanFactory
.
getBean
(
DefaultLicenseService
.
class
);
/*if (null == defaultLicenseService) {
/*if (null == defaultLicenseService) {
registry.registerBeanDefinition();
registry.registerBeanDefinition();
}*/
}*/
...
...
backend/src/main/java/io/dataease/commons/license/DefaultLicenseService.java
浏览文件 @
75d223f4
...
@@ -3,6 +3,7 @@ package io.dataease.commons.license;
...
@@ -3,6 +3,7 @@ package io.dataease.commons.license;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
io.dataease.base.domain.License
;
import
io.dataease.base.domain.License
;
import
io.dataease.commons.exception.DEException
;
import
io.dataease.commons.exception.DEException
;
import
io.dataease.commons.utils.LogUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -31,6 +32,7 @@ public class DefaultLicenseService {
...
@@ -31,6 +32,7 @@ public class DefaultLicenseService {
command
.
add
(
licenseKey
);
command
.
add
(
licenseKey
);
try
{
try
{
execCommand
(
result
,
command
);
execCommand
(
result
,
command
);
LogUtil
.
info
(
"read lic content is : "
+
result
.
toString
());
F2CLicenseResponse
f2CLicenseResponse
=
new
Gson
().
fromJson
(
result
.
toString
(),
F2CLicenseResponse
.
class
);
F2CLicenseResponse
f2CLicenseResponse
=
new
Gson
().
fromJson
(
result
.
toString
(),
F2CLicenseResponse
.
class
);
if
(
f2CLicenseResponse
.
getStatus
()
!=
F2CLicenseResponse
.
Status
.
valid
){
if
(
f2CLicenseResponse
.
getStatus
()
!=
F2CLicenseResponse
.
Status
.
valid
){
return
f2CLicenseResponse
;
return
f2CLicenseResponse
;
...
@@ -43,6 +45,7 @@ public class DefaultLicenseService {
...
@@ -43,6 +45,7 @@ public class DefaultLicenseService {
}
}
return
f2CLicenseResponse
;
return
f2CLicenseResponse
;
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
e
.
printStackTrace
();
return
F2CLicenseResponse
.
invalid
(
e
.
getMessage
());
return
F2CLicenseResponse
.
invalid
(
e
.
getMessage
());
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论