APPLICATION FAILED TO START
Description:
Parameter 0 of constructor in com.socket.socketIo.MessageEventHandler required a bean of type ‘com.corundumstudio.socketio.SocketIOServer’ that could not be found.
按照正常的依赖添加,程序引入后报上面错误,查看MessageEventHandler 中的代码:
@Component
public class MessageEventHandler {
// @Autowired
public static SocketIOServer socketIoServer;
// static ArrayList<UUID> listClient = new ArrayList<>();
private static Vector<UUID> vectorClient = new Vector<>();//客户端缓存,线程安全
//改为address集合
// private static Vector<String> strings = new Vector<>();//客户端缓存,线程安全
// static final int limitSeconds = 60;
@Autowired
public MessageEventHandler(SocketIOServer socketIOServer) {
this.socketIoServer = socketIOServer;
}
@OnConnect
public void onConnect(SocketIOClient client) {
// #########################
// 判空