第一步:在ruoyi-framework模块的pom.xml里添加websocket的jar包org.springframework.bootspring-boot-starter-websocket第二步:在framework包下新建websocket包,添加一下4个文件1、WebSocketConfigpackagecom.ruoyi.framework.websocket;importorg.springframework.context.annotation.Bean;importorg.springframework.context.annotation.Configuration;