【问题标题】:Configure which port Spring exposes Websockets over?配置 Spring 在哪个端口上公开 Websockets?
【发布时间】:2016-03-10 10:06:57
【问题描述】:

也许我遗漏了一些明显的东西,但我找不到任何有关配置 spring 从默认 8080 公开 Websockets 的端口的信息(在查看 http://docs.spring.io/spring-framework/docs/current/spring-framework-reference/html/websocket.html 之后)。

有人知道怎么做吗?或者如果春天允许你这样做?

【问题讨论】:

  • 你找到解决办法了吗?

标签: spring websocket port spring-websocket


【解决方案1】:

您只需要更改运行tomcat 的端口即可。最简单的方法是在你的 prop 文件中设置端口值

/src/main/resources/application.properties

server.port=8888

这篇博文应该通过其他方式来实现 - https://www.mkyong.com/spring-boot/spring-boot-how-to-change-tomcat-port/

【讨论】:

    猜你喜欢
    • 2023-01-08
    • 1970-01-01
    • 2021-10-07
    • 1970-01-01
    • 2016-11-06
    • 2022-01-13
    • 2021-11-16
    • 2019-08-14
    • 1970-01-01
    相关资源
    最近更新 更多