soul-admin
--> plugin management --> divide
, set to enable.<!--if you use http proxy start this--> <dependency> <groupId>org.dromara</groupId> <artifactId>soul-spring-boot-starter-plugin-divide</artifactId> <version>${last.version}</version> </dependency> <dependency> <groupId>org.dromara</groupId> <artifactId>soul-spring-boot-starter-plugin-httpclient</artifactId> <version>${last.version}</version> </dependency>
ws://localhost:9195/?module=ws&method=/websocket&rpcType=websocket
.Detail: 1.localhost:8080 Is the IP and port started by soul. 2.module(Required):Value is the key that matching selector. 3.method (Parameter): Your websocket path is also used as a matching rule. 4.rpcType :websocket must be filled in,and must be websocket
divide
plugin, as followsIn summary, pay attention to your path at this time ws://localhost:9195/?module=ws&method=/websocket&rpcType=websocket
.
It will be matched by your new selector rule, and then the real websocket address of the proxy is:127.0.0.1:8080/websocket
,so that soul can proxy websocket.
You can communicate with websocket service, it is actually very simple.
I would like to add just one last word that you can decide the name and value of module and method by yourself as long as the selector and the rule can match, this is just an example,