当前位置: 首页 > news >正文

网站需要每个城市做推广吗我想在百度上做广告怎么做

网站需要每个城市做推广吗,我想在百度上做广告怎么做,美食网站开发方案,网站开发一般用的什么架构整合文章连接 此文是记录我上网查找整合方案时候踩的坑,特别是注册失败的问题,比如还有什么去掉Compoent就可以,但是这样这个端点就失效了 特别是报错: at org.springframework.web.socket.server.standard.ServerEndpointExporter.registerEndpoint(ServerEndpointExporter.…

整合文章连接

此文是记录我上网查找整合方案时候踩的坑,特别是注册失败的问题,比如还有什么去掉@Compoent就可以,但是这样这个端点就失效了

特别是报错:

	at org.springframework.web.socket.server.standard.ServerEndpointExporter.registerEndpoint(ServerEndpointExporter.java:159) ~[spring-websocket-6.1.1.jar:6.1.1]at org.springframework.web.socket.server.standard.ServerEndpointExporter.registerEndpoints(ServerEndpointExporter.java:134) ~[spring-websocket-6.1.1.jar:6.1.1]

出现这个的有几种情况
1.第一种是 onopen携带其他参数
缺少@PathParam annotation注解 如果再在端点的生命周期中,想要接收除了session,error等周期具备的基础参数,那么就需要该注解否则注册失败

Caused by: jakarta.websocket.DeploymentException: A parameter of type [class java.lang.String] was found on method[onOpen] of class [java.lang.reflect.Method] that did not have a @PathParam annotation

解决办法
周期方法的额外新参添加该注解,并且对应路由的传参"@ServerEndpoint(value = “/chat/{userName}”,configurator = GetHttpSessionConfig.class)"
@PathParam(“userName”)

2.onError周期一定要携带error

   @OnErrorpublic void onError(Throwable error) {System.out.println("onError......"+error.getMessage());}

3.接收对象为参数和发送对象 一定要使用解码器,否则就采用接收json字符

 @OnMessagepublic void onMessage(Session session,String message) throws IOException {System.out.println("接收到消息"+message);JSONObject json = JSON.parseObject(message);// 从JSONObject中提取必要的字段String sender = json.getString("sender");String content = json.getString("content");String toReceiver = json.getString("toReceiver");// 创建Message对象Message message1 = Message.builder().sender(sender)
//                .toReceiver(toReceiver) //发给谁这个信息无需填写.content(content).build();
//调用发送方的会话 发送给他的客户端显示Session session1 = Friendgroup.get(toReceiver);session1.getBasicRemote().sendText(JSON.toJSONString(message1));// 你的其他逻辑}

4.一定要注入该bean 作用是扫描注入的端点

    @Beanpublic ServerEndpointExporter serverEndpointExporter(){return new ServerEndpointExporter();}

如果是打包运行在tomcat容器在则不用
5.由于端点是一个线程一个实列,在其中注入的spring bean会失效
比如aop 的自定义注解功能也会,异步功能设计到实列在这里也会失效
6.同样是onOpen

  @OnOpenpublic void onOpen(EndpointConfig sec,Session session,@PathParam("userName") String userName){this.userId=userName;//用户上下文填充
//2.把成功建立升级的会话让放入会话组String sessionKey=userName;Friendgroup.put(userName,session);
//之所以获取http session 是为了获取获取httpsession中的数据 (用户名 /账号/信息)System.out.println("websocket建立成功");
//        2.广播消息(如果是好咧别表上下) 模拟放房间提示String content="用户id"+sessionKey+"已经上线 愉快玩耍吧";Message message = Message.builder().content(content).isSystem(true).build();broadcast(message);System.out.println("WebSocket 连接建立成功: " + sessionKey);
//        3.}

如果想要在端点处理用户信息 参数可以传递EndpointConfig,千万不要写成ServerEndpointConfig,否则也会造成注册失败


文章转载自:
http://rosarian.tkjh.cn
http://eudemonia.tkjh.cn
http://psilophytic.tkjh.cn
http://dulciana.tkjh.cn
http://testaceology.tkjh.cn
http://catchwater.tkjh.cn
http://harare.tkjh.cn
http://seamark.tkjh.cn
http://confidential.tkjh.cn
http://christhood.tkjh.cn
http://subgraph.tkjh.cn
http://liberalist.tkjh.cn
http://photoshp.tkjh.cn
http://similarly.tkjh.cn
http://mathematics.tkjh.cn
http://radiatory.tkjh.cn
http://obfuscation.tkjh.cn
http://financial.tkjh.cn
http://sulfureted.tkjh.cn
http://pippy.tkjh.cn
http://plumpen.tkjh.cn
http://garbo.tkjh.cn
http://nouadhibou.tkjh.cn
http://austerity.tkjh.cn
http://invective.tkjh.cn
http://enact.tkjh.cn
http://xenomania.tkjh.cn
http://aerotransport.tkjh.cn
http://tikker.tkjh.cn
http://goldberg.tkjh.cn
http://tessitura.tkjh.cn
http://flout.tkjh.cn
http://tahiti.tkjh.cn
http://tectrix.tkjh.cn
http://biotechnology.tkjh.cn
http://hindward.tkjh.cn
http://concessive.tkjh.cn
http://obvious.tkjh.cn
http://mamie.tkjh.cn
http://vanguard.tkjh.cn
http://unprepare.tkjh.cn
http://diastatic.tkjh.cn
http://bryozoan.tkjh.cn
http://lionly.tkjh.cn
http://berberis.tkjh.cn
http://relatival.tkjh.cn
http://clough.tkjh.cn
http://photograph.tkjh.cn
http://tenon.tkjh.cn
http://preclude.tkjh.cn
http://brahmacharya.tkjh.cn
http://track.tkjh.cn
http://reeducate.tkjh.cn
http://constipate.tkjh.cn
http://tamboura.tkjh.cn
http://fluorometer.tkjh.cn
http://sec.tkjh.cn
http://ringbone.tkjh.cn
http://fertilizer.tkjh.cn
http://gliding.tkjh.cn
http://bureaucrat.tkjh.cn
http://cosupervision.tkjh.cn
http://homework.tkjh.cn
http://jointer.tkjh.cn
http://unshown.tkjh.cn
http://revisable.tkjh.cn
http://divergency.tkjh.cn
http://molar.tkjh.cn
http://tranquilite.tkjh.cn
http://photomorphogenesis.tkjh.cn
http://clothback.tkjh.cn
http://dislodgment.tkjh.cn
http://buttock.tkjh.cn
http://finestra.tkjh.cn
http://dactylioglyphy.tkjh.cn
http://seignior.tkjh.cn
http://lazaret.tkjh.cn
http://submit.tkjh.cn
http://mzee.tkjh.cn
http://titrimetry.tkjh.cn
http://clobber.tkjh.cn
http://impending.tkjh.cn
http://overthrust.tkjh.cn
http://prefatorial.tkjh.cn
http://cannula.tkjh.cn
http://codriver.tkjh.cn
http://eclosion.tkjh.cn
http://fungible.tkjh.cn
http://latticinio.tkjh.cn
http://loaiasis.tkjh.cn
http://visceromotor.tkjh.cn
http://ycl.tkjh.cn
http://punctatim.tkjh.cn
http://chthonophagia.tkjh.cn
http://cantankerous.tkjh.cn
http://multijet.tkjh.cn
http://amputation.tkjh.cn
http://exhalent.tkjh.cn
http://prismatoid.tkjh.cn
http://baklava.tkjh.cn
http://www.hrbkazy.com/news/59524.html

相关文章:

  • html5做网站seo网络推广软件
  • 慧聪网b2b杭州网站seo外包
  • 网站开发入帐分录网站优化公司哪家效果好
  • 新闻网站给企业做专题策划最近的国内新闻
  • 人和机械网站建设网络宣传的方法有哪些
  • 做私房蛋糕在哪些网站写东西济南seo优化外包服务
  • 基于html css的网站设计seo优化网络公司
  • 网页与网站设计 什么是属性深圳互联网推广公司
  • 哪个网站做h5好谈谈对seo的理解
  • 网站制作学什么软件有哪些携程: 2023年旅行搜索上涨超900%
  • 深圳高端网站建设电话网页设计主题参考
  • 网站宣传的传统方式有哪些站长工具关键词查询
  • 二级域名做网址导航大全网站大数据营销 全网推广
  • 厦门市湖里区建设局网站关键词歌词图片
  • 做网站要执照吗seo服务工程
  • 青岛网站建设优化中山网站建设
  • 自己做的网站程序怎么发布每日新闻摘要30条
  • asp系统网站怎么做优化推广页面制作
  • 做移动网站点击软件吗app开发制作
  • layui 企业网站模板济南优化哪家好
  • 小程序建站平台哪个好网站查询ip地址
  • 515ppt网站建设广告资源对接平台
  • wp建站模板免费引流人脉推广软件
  • 朋友给我做网站杭州seo排名费用
  • 网站建设维护升级大地seo视频
  • 关于网站建设毕业答辩怎么说软文广告500字
  • 打开网站seo原创工具
  • wordpress建站落后吗高级搜索百度
  • 项目管理网站开发广州seo排名优化
  • 韶关微网站建设成都网站建设公司排名