xkcoding / spring-boot-demo

🚀一个用来深入学习并实战 Spring Boot 的项目。
https://parg.co/UZM
MIT License
33.18k stars 10.9k forks source link

macOS11运行demo-websocket兼容性问题 #184

Open forestyoung23 opened 3 years ago

forestyoung23 commented 3 years ago

描述问题

macOS Big Sur 11.1版本运行demo-websocket模块报java.lang.UnsatisfiedLinkError: Unable to load library 'DiskArbitration'错误

java.lang.UnsatisfiedLinkError: Unable to load library 'DiskArbitration': Native library (darwin/libDiskArbitration.dylib) not found in resource path
        at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:303) ~[jna-4.5.2.jar:4.5.2 (b0)]
        at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:427) ~[jna-4.5.2.jar:4.5.2 (b0)]
        at com.sun.jna.Library$Handler.<init>(Library.java:179) ~[jna-4.5.2.jar:4.5.2 (b0)]
        at com.sun.jna.Native.loadLibrary(Native.java:569) ~[jna-4.5.2.jar:4.5.2 (b0)]
        at com.sun.jna.Native.loadLibrary(Native.java:544) ~[jna-4.5.2.jar:4.5.2 (b0)]
        at oshi.jna.platform.mac.DiskArbitration.<clinit>(DiskArbitration.java:36) ~[oshi-core-3.9.1.jar:3.9.1]
        at oshi.software.os.mac.MacFileSystem.getFileStores(MacFileSystem.java:75) ~[oshi-core-3.9.1.jar:3.9.1]
        at com.xkcoding.websocket.model.Server.setSysFiles(Server.java:176) ~[classes/:na]
        at com.xkcoding.websocket.model.Server.copyTo(Server.java:110) ~[classes/:na]

截屏或录像

image

SuMiaoALi commented 3 years ago

用netty自带的websocket,很简单实现,且并发也高