Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
e1196a00
Commit
e1196a00
authored
Jul 13, 2019
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加系统监控的页面
parent
c09a7648
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
900 additions
and
80 deletions
+900
-80
_sqls/guns_mysql.sql
+78
-76
guns-base/pom.xml
+8
-0
guns-base/src/main/java/cn/stylefeng/guns/base/oshi/SystemHardwareInfo.java
+175
-0
guns-base/src/main/java/cn/stylefeng/guns/base/oshi/model/CpuInfo.java
+69
-0
guns-base/src/main/java/cn/stylefeng/guns/base/oshi/model/JvmInfo.java
+109
-0
guns-base/src/main/java/cn/stylefeng/guns/base/oshi/model/MemInfo.java
+45
-0
guns-base/src/main/java/cn/stylefeng/guns/base/oshi/model/SysFileInfo.java
+49
-0
guns-base/src/main/java/cn/stylefeng/guns/base/oshi/model/SysInfo.java
+39
-0
guns-base/src/main/java/cn/stylefeng/guns/base/oshi/util/IpInfoUtils.java
+63
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/controller/SystemController.java
+18
-4
guns-sys/src/main/webapp/pages/modular/frame/systemInfo.html
+239
-0
pom.xml
+8
-0
No files found.
_sqls/guns_mysql.sql
View file @
e1196a00
...
...
@@ -16,7 +16,7 @@ USE guns;
Target Server Version : 50724
File Encoding : 65001
Date: 1
2/07/2019 21:01:27
Date: 1
3/07/2019 16:16:11
*/
SET
NAMES
utf8mb4
;
...
...
@@ -43,7 +43,7 @@ CREATE TABLE `database_info` (
-- Records of database_info
-- ----------------------------
BEGIN
;
INSERT
INTO
`database_info`
VALUES
(
114
5889750092210178
,
'master'
,
'com.mysql.cj.jdbc.Driver'
,
'root'
,
'root'
,
'jdbc:mysql://127.0.0.1:3306/guns?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT'
,
'主数据源,项目启动数据源!'
,
'2019-07-02 10:59:40
'
);
INSERT
INTO
`database_info`
VALUES
(
114
9954992195629058
,
'master'
,
'com.mysql.cj.jdbc.Driver'
,
'root'
,
'root'
,
'jdbc:mysql://127.0.0.1:3306/guns?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT'
,
'主数据源,项目启动数据源!'
,
'2019-07-13 16:13:29
'
);
COMMIT
;
-- ----------------------------
...
...
@@ -343,6 +343,7 @@ INSERT INTO `sys_menu` VALUES (1144441072852684801, 'SYS_POSITION', 'system', '[
INSERT
INTO
`sys_menu`
VALUES
(
1144441072852684802
,
'SYS_POSITION_ADD'
,
'SYS_POSITION'
,
'[0],[system],[SYS_POSITION],'
,
'职位表添加'
,
'fa-star'
,
''
,
999
,
3
,
'N'
,
''
,
'ENABLE'
,
''
,
''
,
'BASE_SYSTEM'
,
'2019-06-28 11:03:09'
,
'2019-06-28 11:06:42'
,
1
,
1
);
INSERT
INTO
`sys_menu`
VALUES
(
1144441072852684803
,
'SYS_POSITION_EDIT'
,
'SYS_POSITION'
,
'[0],[system],[SYS_POSITION],'
,
'职位表修改'
,
'fa-star'
,
''
,
999
,
3
,
'N'
,
''
,
'ENABLE'
,
''
,
''
,
'BASE_SYSTEM'
,
'2019-06-28 11:03:09'
,
'2019-06-28 11:06:42'
,
1
,
1
);
INSERT
INTO
`sys_menu`
VALUES
(
1144441072852684804
,
'SYS_POSITION_DELETE'
,
'SYS_POSITION'
,
'[0],[system],[SYS_POSITION],'
,
'职位表删除'
,
'fa-star'
,
''
,
999
,
3
,
'N'
,
''
,
'ENABLE'
,
''
,
''
,
'BASE_SYSTEM'
,
'2019-06-28 11:03:09'
,
'2019-06-28 11:06:42'
,
1
,
1
);
INSERT
INTO
`sys_menu`
VALUES
(
1149955324929765378
,
'system_info'
,
'dashboard'
,
'[0],[dashboard],'
,
'系统监控'
,
'layui-icon-star-fill'
,
'/system/systemInfo'
,
40
,
2
,
'Y'
,
NULL
,
'ENABLE'
,
NULL
,
NULL
,
'BASE_SYSTEM'
,
'2019-07-13 16:14:49'
,
NULL
,
1
,
NULL
);
COMMIT
;
-- ----------------------------
...
...
@@ -446,80 +447,81 @@ INSERT INTO `sys_relation` VALUES (1138325281216442370, 172, 5);
INSERT
INTO
`sys_relation`
VALUES
(
1138325281229025281
,
145
,
5
);
INSERT
INTO
`sys_relation`
VALUES
(
1138325281245802498
,
1111545968697860098
,
5
);
INSERT
INTO
`sys_relation`
VALUES
(
1138325281258385410
,
1111546189892870145
,
5
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297607614466
,
105
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297620197378
,
106
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297632780289
,
107
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297641168897
,
108
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297657946113
,
109
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297666334721
,
110
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297678917634
,
111
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297691500546
,
112
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297699889153
,
113
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297712472066
,
165
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297720860673
,
166
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297733443585
,
167
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297741832194
,
114
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297750220802
,
115
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297762803714
,
116
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297771192322
,
117
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297779580930
,
118
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297792163842
,
162
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297800552449
,
163
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297813135362
,
164
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297821523969
,
119
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297829912578
,
120
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297842495490
,
121
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297850884098
,
122
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297867661313
,
150
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297884438529
,
151
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297905410050
,
128
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297926381570
,
134
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297943158785
,
158
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297968324610
,
159
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495297989296129
,
130
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298006073346
,
131
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298027044866
,
135
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298048016386
,
136
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298068987905
,
137
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298085765122
,
152
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298106736641
,
153
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298131902465
,
154
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298148679681
,
132
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298169651202
,
138
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298186428418
,
139
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298203205633
,
140
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298219982850
,
155
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298232565761
,
156
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298245148673
,
157
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298257731585
,
133
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298270314497
,
160
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298282897409
,
161
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298295480321
,
141
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298312257537
,
142
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298324840450
,
143
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298337423362
,
144
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298345811970
,
1144441072852684801
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298358394882
,
1144441072852684802
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298370977794
,
1144441072852684803
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298379366402
,
1144441072852684804
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298391949313
,
171
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298400337922
,
149
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298412920834
,
1110777136265838594
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298421309441
,
1110777366856089602
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298433892354
,
1110777491464667137
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298446475265
,
1110787391943098370
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298459058178
,
1110839216310329346
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298467446786
,
1127085735660421122
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298475835394
,
1139826657964593154
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298488418306
,
1139827152854716418
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298501001217
,
1142957882422112257
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298513584130
,
1142957882422112258
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298526167042
,
1142957882422112259
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298538749953
,
1142957882426306562
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298551332865
,
172
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298559721473
,
145
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298572304385
,
1111545968697860098
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1144495298580692994
,
1111546189892870145
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955346819837954
,
105
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955346836615169
,
106
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955346849198081
,
107
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955346861780994
,
108
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955346878558210
,
109
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955346895335426
,
110
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955346907918338
,
111
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955346920501250
,
112
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955346928889858
,
113
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955346941472769
,
165
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955346954055681
,
166
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955346966638593
,
167
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955346979221505
,
114
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955346995998722
,
115
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347004387329
,
116
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347016970241
,
117
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347029553154
,
118
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347042136065
,
162
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347054718978
,
163
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347067301889
,
164
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347084079106
,
119
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347096662018
,
120
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347113439234
,
121
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347138605057
,
122
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347167965185
,
150
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347197325314
,
151
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347222491138
,
128
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347243462658
,
134
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347277017089
,
158
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347302182913
,
159
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347331543042
,
130
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347360903170
,
131
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347390263298
,
135
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347419623425
,
136
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347444789249
,
137
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347469955074
,
152
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347495120897
,
153
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347520286721
,
154
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347549646850
,
132
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347570618370
,
138
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347599978498
,
139
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347633532930
,
140
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347658698753
,
155
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347688058881
,
156
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347713224705
,
157
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347738390529
,
133
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347763556354
,
160
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347788722178
,
161
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347813888001
,
141
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347843248129
,
142
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347872608258
,
143
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347897774082
,
144
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347922939906
,
1144441072852684801
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347948105730
,
1144441072852684802
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347973271553
,
1144441072852684803
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955347998437378
,
1144441072852684804
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348027797506
,
171
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348052963330
,
149
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348073934850
,
1110777136265838594
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348090712065
,
1110777366856089602
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348107489281
,
1110777491464667137
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348124266498
,
1110787391943098370
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348141043714
,
1110839216310329346
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348157820930
,
1127085735660421122
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348174598146
,
1139826657964593154
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348191375362
,
1139827152854716418
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348208152578
,
1142957882422112257
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348229124098
,
1142957882422112258
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348245901314
,
1142957882422112259
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348262678530
,
1142957882426306562
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348283650049
,
172
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348308815874
,
145
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348329787394
,
1111545968697860098
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348346564610
,
1111546189892870145
,
1
);
INSERT
INTO
`sys_relation`
VALUES
(
1149955348363341825
,
1149955324929765378
,
1
);
COMMIT
;
-- ----------------------------
...
...
guns-base/pom.xml
View file @
e1196a00
...
...
@@ -144,11 +144,19 @@
<artifactId>
kaptcha
</artifactId>
</dependency>
<!--多数据源控制-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-jta-atomikos
</artifactId>
</dependency>
<!-- 获取系统信息 -->
<dependency>
<groupId>
com.github.oshi
</groupId>
<artifactId>
oshi-core
</artifactId>
</dependency>
<!--需要分布式session的话需要放开注释-->
<!--<dependency>-->
<!--<groupId>org.springframework.session</groupId>-->
...
...
guns-base/src/main/java/cn/stylefeng/guns/base/oshi/SystemHardwareInfo.java
0 → 100755
View file @
e1196a00
package
cn
.
stylefeng
.
guns
.
base
.
oshi
;
import
cn.hutool.core.util.NetUtil
;
import
cn.hutool.core.util.NumberUtil
;
import
cn.stylefeng.guns.base.oshi.model.*
;
import
cn.stylefeng.guns.base.oshi.util.IpInfoUtils
;
import
lombok.Data
;
import
oshi.SystemInfo
;
import
oshi.hardware.CentralProcessor
;
import
oshi.hardware.CentralProcessor.TickType
;
import
oshi.hardware.GlobalMemory
;
import
oshi.hardware.HardwareAbstractionLayer
;
import
oshi.software.os.FileSystem
;
import
oshi.software.os.OSFileStore
;
import
oshi.software.os.OperatingSystem
;
import
oshi.util.Util
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Properties
;
/**
* 服务器相关信息
*
* @author fengshuonan
* @Date 2019-07-13 13:42
*/
@Data
public
class
SystemHardwareInfo
{
private
static
final
int
OSHI_WAIT_SECOND
=
1000
;
/**
* CPU相关信息
*/
private
CpuInfo
cpu
=
new
CpuInfo
();
/**
* 內存相关信息
*/
private
MemInfo
mem
=
new
MemInfo
();
/**
* JVM相关信息
*/
private
JvmInfo
jvm
=
new
JvmInfo
();
/**
* 服务器相关信息
*/
private
SysInfo
sys
=
new
SysInfo
();
/**
* 磁盘相关信息
*/
private
List
<
SysFileInfo
>
sysFiles
=
new
LinkedList
<>();
public
void
copyTo
()
{
SystemInfo
si
=
new
SystemInfo
();
HardwareAbstractionLayer
hal
=
si
.
getHardware
();
setCpuInfo
(
hal
.
getProcessor
());
setMemInfo
(
hal
.
getMemory
());
setSysInfo
();
setJvmInfo
();
setSysFiles
(
si
.
getOperatingSystem
());
}
/**
* 设置CPU信息
*/
private
void
setCpuInfo
(
CentralProcessor
processor
)
{
// CPU信息
long
[]
prevTicks
=
processor
.
getSystemCpuLoadTicks
();
Util
.
sleep
(
OSHI_WAIT_SECOND
);
long
[]
ticks
=
processor
.
getSystemCpuLoadTicks
();
long
nice
=
ticks
[
TickType
.
NICE
.
getIndex
()]
-
prevTicks
[
TickType
.
NICE
.
getIndex
()];
long
irq
=
ticks
[
TickType
.
IRQ
.
getIndex
()]
-
prevTicks
[
TickType
.
IRQ
.
getIndex
()];
long
softirq
=
ticks
[
TickType
.
SOFTIRQ
.
getIndex
()]
-
prevTicks
[
TickType
.
SOFTIRQ
.
getIndex
()];
long
steal
=
ticks
[
TickType
.
STEAL
.
getIndex
()]
-
prevTicks
[
TickType
.
STEAL
.
getIndex
()];
long
cSys
=
ticks
[
TickType
.
SYSTEM
.
getIndex
()]
-
prevTicks
[
TickType
.
SYSTEM
.
getIndex
()];
long
user
=
ticks
[
TickType
.
USER
.
getIndex
()]
-
prevTicks
[
TickType
.
USER
.
getIndex
()];
long
iowait
=
ticks
[
TickType
.
IOWAIT
.
getIndex
()]
-
prevTicks
[
TickType
.
IOWAIT
.
getIndex
()];
long
idle
=
ticks
[
TickType
.
IDLE
.
getIndex
()]
-
prevTicks
[
TickType
.
IDLE
.
getIndex
()];
long
totalCpu
=
user
+
nice
+
cSys
+
idle
+
iowait
+
irq
+
softirq
+
steal
;
cpu
.
setCpuNum
(
processor
.
getLogicalProcessorCount
());
cpu
.
setTotal
(
totalCpu
);
cpu
.
setSys
(
cSys
);
cpu
.
setUsed
(
user
);
cpu
.
setWait
(
iowait
);
cpu
.
setFree
(
idle
);
}
/**
* 设置内存信息
*/
private
void
setMemInfo
(
GlobalMemory
memory
)
{
mem
.
setTotal
(
memory
.
getTotal
());
mem
.
setUsed
(
memory
.
getTotal
()
-
memory
.
getAvailable
());
mem
.
setFree
(
memory
.
getAvailable
());
}
/**
* 设置服务器信息
*/
private
void
setSysInfo
()
{
Properties
props
=
System
.
getProperties
();
sys
.
setComputerName
(
IpInfoUtils
.
getHostName
());
sys
.
setComputerIp
(
NetUtil
.
getLocalhostStr
());
sys
.
setOsName
(
props
.
getProperty
(
"os.name"
));
sys
.
setOsArch
(
props
.
getProperty
(
"os.arch"
));
sys
.
setUserDir
(
props
.
getProperty
(
"user.dir"
));
}
/**
* 设置Java虚拟机
*/
private
void
setJvmInfo
()
{
Properties
props
=
System
.
getProperties
();
jvm
.
setTotal
(
Runtime
.
getRuntime
().
totalMemory
());
jvm
.
setMax
(
Runtime
.
getRuntime
().
maxMemory
());
jvm
.
setFree
(
Runtime
.
getRuntime
().
freeMemory
());
jvm
.
setVersion
(
props
.
getProperty
(
"java.version"
));
jvm
.
setHome
(
props
.
getProperty
(
"java.home"
));
}
/**
* 设置磁盘信息
*/
private
void
setSysFiles
(
OperatingSystem
os
)
{
FileSystem
fileSystem
=
os
.
getFileSystem
();
OSFileStore
[]
fsArray
=
fileSystem
.
getFileStores
();
for
(
OSFileStore
fs
:
fsArray
)
{
long
free
=
fs
.
getUsableSpace
();
long
total
=
fs
.
getTotalSpace
();
long
used
=
total
-
free
;
SysFileInfo
sysFile
=
new
SysFileInfo
();
sysFile
.
setDirName
(
fs
.
getMount
());
sysFile
.
setSysTypeName
(
fs
.
getType
());
sysFile
.
setTypeName
(
fs
.
getName
());
sysFile
.
setTotal
(
convertFileSize
(
total
));
sysFile
.
setFree
(
convertFileSize
(
free
));
sysFile
.
setUsed
(
convertFileSize
(
used
));
sysFile
.
setUsage
(
NumberUtil
.
mul
(
NumberUtil
.
div
(
used
,
total
,
4
),
100
));
sysFiles
.
add
(
sysFile
);
}
}
/**
* 字节转换
*
* @param size 字节大小
* @return 转换后值
*/
public
String
convertFileSize
(
long
size
)
{
long
kb
=
1024
;
long
mb
=
kb
*
1024
;
long
gb
=
mb
*
1024
;
if
(
size
>=
gb
)
{
return
String
.
format
(
"%.1f GB"
,
(
float
)
size
/
gb
);
}
else
if
(
size
>=
mb
)
{
float
f
=
(
float
)
size
/
mb
;
return
String
.
format
(
f
>
100
?
"%.0f MB"
:
"%.1f MB"
,
f
);
}
else
if
(
size
>=
kb
)
{
float
f
=
(
float
)
size
/
kb
;
return
String
.
format
(
f
>
100
?
"%.0f KB"
:
"%.1f KB"
,
f
);
}
else
{
return
String
.
format
(
"%d B"
,
size
);
}
}
}
guns-base/src/main/java/cn/stylefeng/guns/base/oshi/model/CpuInfo.java
0 → 100755
View file @
e1196a00
package
cn
.
stylefeng
.
guns
.
base
.
oshi
.
model
;
import
cn.hutool.core.util.NumberUtil
;
import
lombok.Setter
;
/**
* CPU相关信息
*
* @author fengshuonan
* @Date 2019-07-13 13:42
*/
@Setter
public
class
CpuInfo
{
/**
* 核心数
*/
private
int
cpuNum
;
/**
* CPU总的使用率
*/
private
double
total
;
/**
* CPU系统使用率
*/
private
double
sys
;
/**
* CPU用户使用率
*/
private
double
used
;
/**
* CPU当前等待率
*/
private
double
wait
;
/**
* CPU当前空闲率
*/
private
double
free
;
public
int
getCpuNum
()
{
return
cpuNum
;
}
public
double
getTotal
()
{
return
NumberUtil
.
round
(
NumberUtil
.
mul
(
total
,
100
),
2
).
doubleValue
();
}
public
double
getSys
()
{
return
NumberUtil
.
round
(
NumberUtil
.
mul
(
sys
/
total
,
100
),
2
).
doubleValue
();
}
public
double
getUsed
()
{
return
NumberUtil
.
round
(
NumberUtil
.
mul
(
used
/
total
,
100
),
2
).
doubleValue
();
}
public
double
getWait
()
{
return
NumberUtil
.
round
(
NumberUtil
.
mul
(
wait
/
total
,
100
),
2
).
doubleValue
();
}
public
double
getFree
()
{
return
NumberUtil
.
round
(
NumberUtil
.
mul
(
free
/
total
,
100
),
2
).
doubleValue
();
}
}
guns-base/src/main/java/cn/stylefeng/guns/base/oshi/model/JvmInfo.java
0 → 100755
View file @
e1196a00
package
cn
.
stylefeng
.
guns
.
base
.
oshi
.
model
;
import
cn.hutool.core.date.DateUnit
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.NumberUtil
;
import
lombok.Setter
;
import
java.lang.management.ManagementFactory
;
import
java.util.Date
;
/**
* JVM相关信息
*
* @author fengshuonan
* @Date 2019-07-13 13:42
*/
@Setter
public
class
JvmInfo
{
/**
* 当前JVM占用的内存总数(M)
*/
private
double
total
;
/**
* JVM最大可用内存总数(M)
*/
private
double
max
;
/**
* JVM空闲内存(M)
*/
private
double
free
;
/**
* JDK版本
*/
private
String
version
;
/**
* JDK路径
*/
private
String
home
;
public
double
getTotal
()
{
return
NumberUtil
.
div
(
total
,
(
1024
*
1024
),
2
);
}
public
double
getMax
()
{
return
NumberUtil
.
div
(
max
,
(
1024
*
1024
),
2
);
}
public
double
getFree
()
{
return
NumberUtil
.
div
(
free
,
(
1024
*
1024
),
2
);
}
public
double
getUsed
()
{
return
NumberUtil
.
div
(
total
-
free
,
(
1024
*
1024
),
2
);
}
public
String
getVersion
()
{
return
version
;
}
public
String
getHome
()
{
return
home
;
}
public
double
getUsage
()
{
return
NumberUtil
.
mul
(
NumberUtil
.
div
(
total
-
free
,
total
,
4
),
100
);
}
/**
* 获取JDK名称
*/
public
String
getName
()
{
return
ManagementFactory
.
getRuntimeMXBean
().
getVmName
();
}
/**
* JDK启动时间
*/
public
String
getStartTime
()
{
long
time
=
ManagementFactory
.
getRuntimeMXBean
().
getStartTime
();
Date
date
=
new
Date
(
time
);
return
DateUtil
.
formatDateTime
(
date
);
}
/**
* JDK运行时间
*/
public
String
getRunTime
()
{
long
time
=
ManagementFactory
.
getRuntimeMXBean
().
getStartTime
();
Date
date
=
new
Date
(
time
);
//运行多少分钟
long
runMS
=
DateUtil
.
between
(
date
,
new
Date
(),
DateUnit
.
MS
);
long
nd
=
1000
*
24
*
60
*
60
;
long
nh
=
1000
*
60
*
60
;
long
nm
=
1000
*
60
;
long
day
=
runMS
/
nd
;
long
hour
=
runMS
%
nd
/
nh
;
long
min
=
runMS
%
nd
%
nh
/
nm
;
return
day
+
"天"
+
hour
+
"小时"
+
min
+
"分钟"
;
}
}
guns-base/src/main/java/cn/stylefeng/guns/base/oshi/model/MemInfo.java
0 → 100755
View file @
e1196a00
package
cn
.
stylefeng
.
guns
.
base
.
oshi
.
model
;
import
cn.hutool.core.util.NumberUtil
;
import
lombok.Setter
;
/**
* 內存相关信息
*
* @author fengshuonan
* @Date 2019-07-13 13:42
*/
@Setter
public
class
MemInfo
{
/**
* 内存总量
*/
private
double
total
;
/**
* 已用内存
*/
private
double
used
;
/**
* 剩余内存
*/
private
double
free
;
public
double
getTotal
()
{
return
NumberUtil
.
div
(
total
,
(
1024
*
1024
*
1024
),
2
);
}
public
double
getUsed
()
{
return
NumberUtil
.
div
(
used
,
(
1024
*
1024
*
1024
),
2
);
}
public
double
getFree
()
{
return
NumberUtil
.
div
(
free
,
(
1024
*
1024
*
1024
),
2
);
}
public
double
getUsage
()
{
return
NumberUtil
.
mul
(
NumberUtil
.
div
(
used
,
total
,
4
),
100
);
}
}
guns-base/src/main/java/cn/stylefeng/guns/base/oshi/model/SysFileInfo.java
0 → 100755
View file @
e1196a00
package
cn
.
stylefeng
.
guns
.
base
.
oshi
.
model
;
import
lombok.Data
;
/**
* 系统文件相关信息
*
* @author fengshuonan
* @Date 2019-07-13 13:42
*/
@Data
public
class
SysFileInfo
{
/**
* 盘符路径
*/
private
String
dirName
;
/**
* 盘符类型
*/
private
String
sysTypeName
;
/**
* 文件类型
*/
private
String
typeName
;
/**
* 总大小
*/
private
String
total
;
/**
* 剩余大小
*/
private
String
free
;
/**
* 已经使用量
*/
private
String
used
;
/**
* 资源的使用率
*/
private
double
usage
;
}
guns-base/src/main/java/cn/stylefeng/guns/base/oshi/model/SysInfo.java
0 → 100755
View file @
e1196a00
package
cn
.
stylefeng
.
guns
.
base
.
oshi
.
model
;
import
lombok.Data
;
/**
* 系统相关信息
*
* @author fengshuonan
* @Date 2019-07-13 13:42
*/
@Data
public
class
SysInfo
{
/**
* 服务器名称
*/
private
String
computerName
;
/**
* 服务器Ip
*/
private
String
computerIp
;
/**
* 项目路径
*/
private
String
userDir
;
/**
* 操作系统
*/
private
String
osName
;
/**
* 系统架构
*/
private
String
osArch
;
}
guns-base/src/main/java/cn/stylefeng/guns/base/oshi/util/IpInfoUtils.java
0 → 100644
View file @
e1196a00
package
cn
.
stylefeng
.
guns
.
base
.
oshi
.
util
;
import
javax.servlet.http.HttpServletRequest
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
/**
* ip工具类
*
* @author fengshuonan
* @Date 2018/9/27 上午10:47
*/
public
class
IpInfoUtils
{
/**
* 获取客户端IP地址
*/
public
static
String
getIpAddr
(
HttpServletRequest
request
)
{
String
ip
=
request
.
getHeader
(
"x-forwarded-for"
);
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"Proxy-Client-IP"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getHeader
(
"WL-Proxy-Client-IP"
);
}
if
(
ip
==
null
||
ip
.
length
()
==
0
||
"unknown"
.
equalsIgnoreCase
(
ip
))
{
ip
=
request
.
getRemoteAddr
();
if
(
ip
.
equals
(
"127.0.0.1"
))
{
//根据网卡取本机配置的IP
InetAddress
inet
=
null
;
try
{
inet
=
InetAddress
.
getLocalHost
();
}
catch
(
UnknownHostException
e
)
{
e
.
printStackTrace
();
}
ip
=
inet
.
getHostAddress
();
}
}
// 对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割
if
(
ip
!=
null
&&
ip
.
length
()
>
15
)
{
if
(
ip
.
indexOf
(
","
)
>
0
)
{
ip
=
ip
.
substring
(
0
,
ip
.
indexOf
(
","
));
}
}
if
(
"0:0:0:0:0:0:0:1"
.
equals
(
ip
))
{
ip
=
"127.0.0.1"
;
}
return
ip
;
}
/**
* 获取客户端主机名称
*/
public
static
String
getHostName
()
{
try
{
return
InetAddress
.
getLocalHost
().
getHostName
();
}
catch
(
UnknownHostException
e
)
{
}
return
"未知"
;
}
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/system/controller/SystemController.java
View file @
e1196a00
...
...
@@ -16,10 +16,10 @@
package
cn
.
stylefeng
.
guns
.
sys
.
modular
.
system
.
controller
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.stylefeng.guns.base.oshi.SystemHardwareInfo
;
import
cn.stylefeng.guns.base.shiro.ShiroUser
;
import
cn.stylefeng.guns.sys.core.constant.factory.ConstantFactory
;
import
cn.stylefeng.guns.sys.core.log.LogObjectHolder
;
import
cn.stylefeng.guns.sys.core.properties.GunsProperties
;
import
cn.stylefeng.guns.sys.core.shiro.ShiroKit
;
import
cn.stylefeng.guns.sys.modular.system.entity.Notice
;
import
cn.stylefeng.guns.sys.modular.system.entity.User
;
...
...
@@ -67,9 +67,6 @@ public class SystemController extends BaseController {
@Autowired
private
NoticeService
noticeService
;
@Autowired
private
GunsProperties
gunsProperties
;
/**
* 控制台页面
*
...
...
@@ -93,6 +90,23 @@ public class SystemController extends BaseController {
}
/**
* 系统硬件信息页面
*
* @author fengshuonan
* @Date 2018/12/24 22:43
*/
@RequestMapping
(
"/systemInfo"
)
public
String
systemInfo
(
Model
model
)
{
SystemHardwareInfo
systemHardwareInfo
=
new
SystemHardwareInfo
();
systemHardwareInfo
.
copyTo
();
model
.
addAttribute
(
"server"
,
systemHardwareInfo
);
return
"/modular/frame/systemInfo.html"
;
}
/**
* 跳转到首页通知
*
* @author fengshuonan
...
...
guns-sys/src/main/webapp/pages/modular/frame/systemInfo.html
0 → 100644
View file @
e1196a00
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, maximum-scale=1"
>
<title>
${constants.getSystemName()}
</title>
<link
rel=
"stylesheet"
href=
"${ctxPath}/assets/common/libs/layui/css/layui.css?v=${constants.getReleaseVersion()}"
/>
<link
rel=
"stylesheet"
href=
"${ctxPath}/assets/common/module/admin.css?v=${constants.getReleaseVersion()}"
/>
<link
rel=
"stylesheet"
href=
"${ctxPath}/assets/expand/css/style.css?v=${constants.getReleaseVersion()}"
media=
"all"
/>
</head>
<body>
<!-- 加载动画,移除位置在common.js中 -->
<div
class=
"page-loading"
>
<div
class=
"ball-loader"
>
<span></span><span></span><span></span><span></span>
</div>
</div>
<!-- 正文开始 -->
<div
class=
"layui-fluid"
>
<div
class=
"layui-row layui-col-space15"
>
<div
class=
"layui-col-lg6"
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-header"
>
CPU信息
</div>
<div
class=
"layui-card-body"
>
<table
class=
"layui-table layui-text"
>
<thead>
<tr>
<th>
属性
</th>
<td>
值
</td>
</tr>
</thead>
<tbody>
<tr>
<td>
核心数
</td>
<td>
${server.cpu.cpuNum!'0'}
</td>
</tr>
<tr>
<td>
用户使用率
</td>
<td>
${server.cpu.used!'0'}%
</td>
</tr>
<tr>
<td>
系统使用率
</td>
<td
id=
"sysUsage"
>
${server.cpu.sys!'0'}%
</td>
</tr>
<tr>
<td>
当前空闲率
</td>
<td>
${server.cpu.free!'0'}%
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div
class=
"layui-col-lg6"
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-header"
>
内存信息
</div>
<div
class=
"layui-card-body"
>
<table
class=
"layui-table layui-text"
>
<thead>
<tr>
<th>
属性
</th>
<th>
内存
</th>
<th>
JVM
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
总内存
</td>
<td>
${server.mem.total!'0'}GB
</td>
<td>
${server.jvm.total!'0'}MB
</td>
</tr>
<tr>
<td>
已用内存
</td>
<td>
${server.mem.used!'0'}GB
</td>
<td>
${server.jvm.used!'0'}MB
</td>
</tr>
<tr>
<td>
剩余内存
</td>
<td>
${server.mem.free!'0'}GB
</td>
<td>
${server.jvm.free!'0'}MB
</td>
</tr>
<tr>
<td>
使用率
</td>
<td
id=
"memUsage"
>
${server.mem.usage!'0'}%
</td>
<td
id=
"jvmUsage"
>
${server.jvm.usage!'0'}%
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div
class=
"layui-col-lg12"
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-header"
>
JAVA虚拟机信息
</div>
<div
class=
"layui-card-body"
>
<table
class=
"layui-table layui-text"
>
<tbody>
<tr>
<td
class=
"layui-table-header"
>
Jvm名称
</td>
<td>
${server.jvm.name!}
</td>
<td
class=
"layui-table-header"
>
Java版本
</td>
<td>
${server.jvm.version!}
</td>
</tr>
<tr>
<td
class=
"layui-table-header"
>
启动时间
</td>
<td>
${server.jvm.startTime}
</td>
<td
class=
"layui-table-header"
>
运行时长
</td>
<td>
${server.jvm.runTime}
</td>
</tr>
<tr>
<td
colspan=
"1"
class=
"layui-table-header"
>
安装路径
</td>
<td
colspan=
"3"
>
${server.jvm.home}
</td>
</tr>
<tr>
<td
colspan=
"1"
class=
"layui-table-header"
>
项目路径
</td>
<td
colspan=
"3"
>
${server.sys.userDir}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div
class=
"layui-col-lg12"
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-header"
>
服务器信息
</div>
<div
class=
"layui-card-body"
>
<table
class=
"layui-table layui-text"
>
<tbody>
<tr>
<td
class=
"layui-table-header"
>
服务器名称
</td>
<td>
${server.sys.computerName}
</td>
<td
class=
"layui-table-header"
>
操作系统
</td>
<td>
${server.sys.osName}
</td>
</tr>
<tr>
<td
class=
"layui-table-header"
>
服务器IP
</td>
<td>
${server.sys.computerIp}
</td>
<td
class=
"layui-table-header"
>
系统架构
</td>
<td>
${server.sys.osArch}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div
class=
"layui-col-lg12"
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-header"
>
磁盘信息
</div>
<div
class=
"layui-card-body"
>
<table
class=
"layui-table layui-text"
>
<thead>
<tr>
<th>
盘符路径
</th>
<th>
文件系统
</th>
<th>
盘符类型
</th>
<th>
总大小
</th>
<th>
可用大小
</th>
<th>
已用大小
</th>
<th>
已用百分比
</th>
</tr>
</thead>
<tbody>
@for(sysFile in server.sysFiles){
<tr>
<td>
${sysFile.dirName!}
</td>
<td>
${sysFile.sysTypeName!}
</td>
<td>
${sysFile.typeName!}
</td>
<td>
${sysFile.total!'0'}GB
</td>
<td>
${sysFile.free!'0'}GB
</td>
<td>
${sysFile.used!'0'}GB
</td>
<td>
${sysFile.usage}%
</td>
</tr>
@}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- js部分 -->
@/* 加入contextPath属性和session超时的配置 */
<script
type=
"text/javascript"
>
var
Feng
=
{
ctxPath
:
"${ctxPath}"
,
version
:
'${constants.getReleaseVersion()}'
};
</script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/libs/layui/layui.js?v=${constants.getReleaseVersion()}"
></script>
<script
type=
"text/javascript"
src=
"${ctxPath}/assets/common/js/common.js?v=${constants.getReleaseVersion()}"
></script>
<script>
layui
.
use
([
'layer'
],
function
()
{
var
$
=
layui
.
jquery
;
var
layer
=
layui
.
layer
;
var
cpuUsage
=
$
{
server
.
cpu
.
sys
!
'0'
};
var
memUsage
=
$
{
server
.
mem
.
usage
!
'0'
};
var
jvmUsage
=
$
{
server
.
jvm
.
usage
!
'0'
};
var
msg
=
""
;
if
(
cpuUsage
>=
80
)
{
$
(
"#sysUsage"
).
addClass
(
"text-danger"
);
msg
+=
"提示:CPU使用率过高!</br>"
;
}
if
(
memUsage
>=
80
)
{
$
(
"#memUsage"
).
addClass
(
"text-danger"
);
msg
+=
"提示:内存使用率过高!</br>"
;
}
if
(
jvmUsage
>=
80
)
{
$
(
"#jvmUsage"
).
addClass
(
"text-danger"
);
msg
+=
"提示:jvm使用率过高!"
;
}
if
(
msg
!==
""
)
{
layer
.
msg
(
msg
)
}
});
</script>
</body>
</html>
\ No newline at end of file
pom.xml
View file @
e1196a00
...
...
@@ -46,6 +46,7 @@
<swagger.version>
2.9.2
</swagger.version>
<ehcache.core.version>
2.6.11
</ehcache.core.version>
<jwt.version>
0.9.0
</jwt.version>
<oshi.version>
3.9.1
</oshi.version>
</properties>
<dependencyManagement>
...
...
@@ -150,6 +151,13 @@
<version>
${kaptcha.version}
</version>
</dependency>
<!--硬件信息获取-->
<dependency>
<groupId>
com.github.oshi
</groupId>
<artifactId>
oshi-core
</artifactId>
<version>
${oshi.version}
</version>
</dependency>
</dependencies>
</dependencyManagement>
...
...
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