Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
5dbc7aa4
Commit
5dbc7aa4
authored
Jul 09, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加门户license验证
parent
df5ca878
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
portal-manager/src/main/java/com/mortals/xhx/common/utils/CipherUtil.java
...rc/main/java/com/mortals/xhx/common/utils/CipherUtil.java
+9
-5
portal-manager/src/main/resources/bootstrap.yml
portal-manager/src/main/resources/bootstrap.yml
+1
-1
No files found.
portal-manager/src/main/java/com/mortals/xhx/common/utils/CipherUtil.java
View file @
5dbc7aa4
...
@@ -7,6 +7,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -7,6 +7,7 @@ import lombok.extern.slf4j.Slf4j;
import
java.io.*
;
import
java.io.*
;
import
java.net.InetAddress
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
java.net.UnknownHostException
;
import
java.util.LinkedHashSet
;
/**
/**
* 操作加密授权信息
* 操作加密授权信息
...
@@ -66,9 +67,12 @@ public class CipherUtil {
...
@@ -66,9 +67,12 @@ public class CipherUtil {
StringBuilder
sb
=
new
StringBuilder
();
StringBuilder
sb
=
new
StringBuilder
();
try
{
try
{
String
macAddress
=
NetUtil
.
getLocalMacAddress
();
String
macAddress
=
NetUtil
.
getLocalMacAddress
();
InetAddress
localHost
=
InetAddress
.
getLocalHost
();
// NetUtil.getLocalhost().
sb
.
append
(
"mac="
).
append
(
macAddress
).
append
(
"&ip="
).
append
(
localHost
.
getHostAddress
());
log
.
info
(
"macAddress:{} IP:{},HostName:{}"
,
macAddress
,
localHost
.
getHostAddress
(),
localHost
.
getHostName
());
LinkedHashSet
<
String
>
ipv4
=
NetUtil
.
localIpv4s
();
// InetAddress localHost = InetAddress.getLocalHost();
sb
.
append
(
"mac="
).
append
(
macAddress
).
append
(
"&ip="
).
append
(
NetUtil
.
getLocalhost
().
getHostAddress
());
// log.info("macAddress:{} IP:{},HostName:{}", macAddress, localHost.getHostAddress(), localHost.getHostName());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"获取网卡信息失败"
,
e
);
log
.
error
(
"获取网卡信息失败"
,
e
);
...
@@ -195,12 +199,12 @@ public class CipherUtil {
...
@@ -195,12 +199,12 @@ public class CipherUtil {
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
{
String
macAddress
=
NetUtil
.
get
MacAddress
(
InetAddress
.
getLocalHost
()
);
String
macAddress
=
NetUtil
.
get
LocalMacAddress
(
);
System
.
out
.
println
(
macAddress
);
System
.
out
.
println
(
macAddress
);
InetAddress
localHost
=
InetAddress
.
getLocalHost
();
InetAddress
localHost
=
InetAddress
.
getLocalHost
();
System
.
out
.
println
(
"IP:"
+
localHost
.
getHostAddress
());
System
.
out
.
println
(
"IP:"
+
NetUtil
.
getLocalhost
()
.
getHostAddress
());
System
.
out
.
println
(
"HostName:"
+
localHost
.
getHostName
());
System
.
out
.
println
(
"HostName:"
+
localHost
.
getHostName
());
System
.
out
.
println
(
CipherUtil
.
getApplicationInfo
());
System
.
out
.
println
(
CipherUtil
.
getApplicationInfo
());
...
...
portal-manager/src/main/resources/bootstrap.yml
View file @
5dbc7aa4
...
@@ -48,5 +48,5 @@ sys:
...
@@ -48,5 +48,5 @@ sys:
pub
:
/home/license/license.pub
pub
:
/home/license/license.pub
log
:
/home/license
log
:
/home/license
license
:
license
:
enable
:
fals
e
enable
:
tru
e
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment