12 2021 档案
摘要:第一条指令 set-executionpolicy remotesigned -scope currentuser 第二条指令 iex (new-object net.webclient).downloadstring('https://get.scoop.sh') 安装完成如下 验证 scoop
阅读全文
摘要:解决方案:把vue项目中的src/asssets里边的资源文件放到public文件下引用 assets文件夹和static文件夹的区别 assets文件:是在src目录下的,所有最后运行时需要进行打包,而static文件夹不需要打包就直接放在最终的文件中 assets中的文件在vue中的templa
阅读全文
摘要:请求体:Request Handshake Details Request URL: http://localhost:9100/imserver/10 Request Method: GET Status Code: 101 //请求头信息 Request Headers Sec-WebSocke
阅读全文
摘要:问题记录:本地socket测试无误后部署发现 WebSocket connection to "xxx/xxx" failed 解决方案: 在nginx.conf的http模块添加如下内容 map $http_upgrade $connection_upgrade { default upgrade
阅读全文
摘要:多端点服务 可通过ServerEndpointExporter.getInetSocketAddressSet()获取所有端点的地址 当地址不同时(即host不同或port不同),使用不同的ServerBootstrap实例 当地址相同,路径(path)不同时,使用同一个ServerBootstra
阅读全文
摘要:注解说明 @ServerEndpoint 当ServerEndpointExporter类通过Spring配置进行声明并被使用,它将会去扫描带有@ServerEndpoint注解的类 被注解的类将被注册成为一个WebSocket端点 所有的配置项都在这个注解的属性中 ( 如:@ServerEndpo
阅读全文
摘要:SpringBoot+WebSocket对每个客户端连接都会创建一个WebSocketServer(@ServerEndpoint注解对应的)对象,Bean的注入操作会被直接略过,因而手动注入一个全局变量 @ServerEndpoint("/im/{userId}/{toUserId}") @Res
阅读全文
摘要:常用注解 @Null 被注释的元素必须为null @NotNull 被注释的元素不能为null @AssertTrue 被注释的元素必须为true @AssertFalse 被注释的元素必须为false @Min(value) 被注释的元素必须是一个数字,其值必须大于等于指定的最小值 @Max(va
阅读全文