【问题标题】:Connection has timed out when trying to access spring boot app from another machine尝试从另一台机器访问 Spring Boot 应用程序时连接超时
【发布时间】:2020-02-28 16:20:40
【问题描述】:

我正在尝试部署一个可在 LAN 中使用的 Spring Boot 应用程序。我正在运行命令mvn spring-boot:run,应用程序完美启动,我可以通过本地主机访问它,但不能通过其他机器访问:页面加载直到出现错误:The connection has timed out。 有什么建议吗?

【问题讨论】:

  • 局域网负责人说可能是什么问题?

标签: spring spring-boot maven


【解决方案1】:

它是不可访问的,因为你的应用程序运行的端口没有暴露给其他机器。您可以打开防火墙端口以通过网络访问它。

最好的方法是将Apache httpdnginx 设置为前端服务器,以便在常规端口(80 和 443)上为您的应用程序提供服务。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-04-05
    • 2021-01-03
    • 2018-04-21
    • 1970-01-01
    • 1970-01-01
    • 2014-12-21
    • 1970-01-01
    • 2021-03-17
    相关资源
    最近更新 更多