Commit a82a3d94651646c52e10e2aad9651e3b7877f230
1 parent
28bceda6
升级oshi到最新版本v5.2.5
Showing
3 changed files
with
13 additions
and
12 deletions
pom.xml
| @@ -25,7 +25,8 @@ | @@ -25,7 +25,8 @@ | ||
| 25 | <kaptcha.version>2.3.2</kaptcha.version> | 25 | <kaptcha.version>2.3.2</kaptcha.version> |
| 26 | <pagehelper.boot.version>1.2.5</pagehelper.boot.version> | 26 | <pagehelper.boot.version>1.2.5</pagehelper.boot.version> |
| 27 | <fastjson.version>1.2.73</fastjson.version> | 27 | <fastjson.version>1.2.73</fastjson.version> |
| 28 | - <oshi.version>3.9.1</oshi.version> | 28 | + <oshi.version>5.2.5</oshi.version> |
| 29 | + <jna.version>5.5.0</jna.version> | ||
| 29 | <commons.io.version>2.5</commons.io.version> | 30 | <commons.io.version>2.5</commons.io.version> |
| 30 | <commons.fileupload.version>1.3.3</commons.fileupload.version> | 31 | <commons.fileupload.version>1.3.3</commons.fileupload.version> |
| 31 | <poi.version>3.17</poi.version> | 32 | <poi.version>3.17</poi.version> |
| @@ -73,6 +74,16 @@ | @@ -73,6 +74,16 @@ | ||
| 73 | <artifactId>oshi-core</artifactId> | 74 | <artifactId>oshi-core</artifactId> |
| 74 | <version>${oshi.version}</version> | 75 | <version>${oshi.version}</version> |
| 75 | </dependency> | 76 | </dependency> |
| 77 | + | ||
| 78 | + <dependency> | ||
| 79 | + <groupId>net.java.dev.jna</groupId> | ||
| 80 | + <artifactId>jna</artifactId> | ||
| 81 | + </dependency> | ||
| 82 | + | ||
| 83 | + <dependency> | ||
| 84 | + <groupId>net.java.dev.jna</groupId> | ||
| 85 | + <artifactId>jna-platform</artifactId> | ||
| 86 | + </dependency> | ||
| 76 | 87 | ||
| 77 | <!-- swagger2--> | 88 | <!-- swagger2--> |
| 78 | <dependency> | 89 | <dependency> |
ruoyi-framework/pom.xml
| @@ -53,16 +53,6 @@ | @@ -53,16 +53,6 @@ | ||
| 53 | <artifactId>oshi-core</artifactId> | 53 | <artifactId>oshi-core</artifactId> |
| 54 | </dependency> | 54 | </dependency> |
| 55 | 55 | ||
| 56 | - <dependency> | ||
| 57 | - <groupId>net.java.dev.jna</groupId> | ||
| 58 | - <artifactId>jna</artifactId> | ||
| 59 | - </dependency> | ||
| 60 | - | ||
| 61 | - <dependency> | ||
| 62 | - <groupId>net.java.dev.jna</groupId> | ||
| 63 | - <artifactId>jna-platform</artifactId> | ||
| 64 | - </dependency> | ||
| 65 | - | ||
| 66 | <!-- 系统模块--> | 56 | <!-- 系统模块--> |
| 67 | <dependency> | 57 | <dependency> |
| 68 | <groupId>com.ruoyi</groupId> | 58 | <groupId>com.ruoyi</groupId> |
ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/Server.java
| @@ -189,7 +189,7 @@ public class Server | @@ -189,7 +189,7 @@ public class Server | ||
| 189 | private void setSysFiles(OperatingSystem os) | 189 | private void setSysFiles(OperatingSystem os) |
| 190 | { | 190 | { |
| 191 | FileSystem fileSystem = os.getFileSystem(); | 191 | FileSystem fileSystem = os.getFileSystem(); |
| 192 | - OSFileStore[] fsArray = fileSystem.getFileStores(); | 192 | + List<OSFileStore> fsArray = fileSystem.getFileStores(); |
| 193 | for (OSFileStore fs : fsArray) | 193 | for (OSFileStore fs : fsArray) |
| 194 | { | 194 | { |
| 195 | long free = fs.getUsableSpace(); | 195 | long free = fs.getUsableSpace(); |