<!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>Title</title><scriptsrc="http://code.jquery.com/jquery-2.1.1.min.js"></script></head><body><h2>Home Page</h2><divid="content"></div><script>$(function(){let ws ;if('WebSocket'in window){console.log("this broswer is support websocket.")let clientID = Math.ceil(Math.random()*100);<!-- build webscoket to server -->ws =newWebSocket("ws://localhost:8080/app/testWebSocket/"+clientID);ws.onopen=function(){$("#content").append("client id= "+clientID +"has connect to server")}// receive message from serverws.onmessage=function(event){var message = event.data;$("#content").append("<br>");$("#content").append("client id= "+clientID +"receive message from server, content is :"+ message)}ws.onclose=function(){console.log("client id= "+clientID +"has closed, disconnect to server")}}else{console.log("this browser is not support websocket.")}})</script></body></html>
application.yaml
server:servlet:context-path: /app
pom.xml
<?xml version="1.0" encoding="UTF-8"?><projectxmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.7.6</version><relativePath/><!-- lookup parent from repository --></parent><groupId>com.example</groupId><artifactId>websocket</artifactId><version>0.0.1-SNAPSHOT</version><packaging>war</packaging><name>websocket</name><description>websocket</description><properties><java.version>1.8</java.version></properties><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-websocket</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-tomcat</artifactId><scope>provided</scope></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency></dependencies><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins></build></project>
一.环境搭建
1.靶场描述
Lets separate the script-kids from script-teenies.Hint: The first impression is not always the right one!If you need hints, call me on twitter: 0815R2d2 Have fun...This works better with VirtualBox rather than VMwareThis works bett…
在 Vue 中,nextTick允许我们延迟执行一段代码,直到 Vue完成其当前的 DOM 更新周期。这使得我们可以在 DOM 更新后安全地访问和修改 DOM 元素。 一、Vue 的异步更新策略
Vue 采用了一种称为异步更新策略的机制。这意味着当数据发生变化时,Vue…
Flutter get-cli中运行get init初始化项目会提示如下错误:
get init
s E:\flutter\flutter study\tempstudy\misapp01> get init
1)Getx Pattern (by Kau)
2)CLEAN (by Arktekko)
which architecture do you want to use? [1] unhandled exception:
Synchromu…