浏览代码

升级oshi到最新版本v5.2.5

RuoYi 4 年之前
父节点
当前提交
0c93087b58

+ 12 - 1
pom.xml

@@ -26,7 +26,8 @@
         <swagger.version>2.9.2</swagger.version>
         <pagehelper.boot.version>1.2.5</pagehelper.boot.version>
         <fastjson.version>1.2.73</fastjson.version>
-        <oshi.version>3.9.1</oshi.version>
+        <oshi.version>5.2.5</oshi.version>
+        <jna.version>5.5.0</jna.version>
         <commons.io.version>2.5</commons.io.version>
         <commons.fileupload.version>1.3.3</commons.fileupload.version>
         <poi.version>3.17</poi.version>
@@ -109,6 +110,16 @@
                 <version>${oshi.version}</version>
             </dependency>
 
+            <dependency>
+                <groupId>net.java.dev.jna</groupId>
+                <artifactId>jna</artifactId>
+            </dependency>
+
+            <dependency>
+                <groupId>net.java.dev.jna</groupId>
+                <artifactId>jna-platform</artifactId>
+            </dependency>
+
             <!-- swagger2-->
             <dependency>
                 <groupId>io.springfox</groupId>

+ 0 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java

@@ -1,7 +1,6 @@
 package com.ruoyi.web.controller.system;
 
 import java.util.List;
-
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletResponse;
 import org.springframework.beans.factory.annotation.Autowired;

+ 0 - 10
ruoyi-framework/pom.xml

@@ -71,16 +71,6 @@
             <artifactId>oshi-core</artifactId>
         </dependency>
 
-        <dependency>
-            <groupId>net.java.dev.jna</groupId>
-            <artifactId>jna</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>net.java.dev.jna</groupId>
-            <artifactId>jna-platform</artifactId>
-        </dependency>
-
         <!-- 系统模块-->
         <dependency>
             <groupId>com.ruoyi</groupId>

+ 1 - 1
ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/Server.java

@@ -190,7 +190,7 @@ public class Server
     private void setSysFiles(OperatingSystem os)
     {
         FileSystem fileSystem = os.getFileSystem();
-        OSFileStore[] fsArray = fileSystem.getFileStores();
+        List<OSFileStore> fsArray = fileSystem.getFileStores();
         for (OSFileStore fs : fsArray)
         {
             long free = fs.getUsableSpace();