优化部分代码
This commit is contained in:
parent
9155cb27a6
commit
9a31a4593b
4
pom.xml
4
pom.xml
@ -32,7 +32,7 @@
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<version>3.0.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@ -58,7 +58,7 @@
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter-test</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<version>3.0.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@ -61,15 +61,11 @@ public class IoUtil {
|
||||
cpuInfo = OshiUtil.getCpuInfo();
|
||||
globalMemory = OshiUtil.getMemory();
|
||||
|
||||
for (NetworkIF nif : networkIFs) {
|
||||
if (SystemUtil.getOsInfo().isLinux()) {
|
||||
if (nif.getName().equals("eth0") || nif.getName().equals("ens33"))
|
||||
networkIF = nif;
|
||||
} else if (nif.getName().equals("eth4") || nif.getName().equals("ethernet_32769"))
|
||||
for (NetworkIF nif : networkIFs)
|
||||
if (nif.getName().startsWith("eth") || nif.getName().startsWith("ens")) {
|
||||
networkIF = nif;
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if(networkIF == null)
|
||||
log.error("网卡 eth0 不存在");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user