首页 > 解决方案 > QA服务器中的SpringBoot应用程序不调用端点

问题描述

我正在开发一个 SpringBoot 应用程序,并为 GET 方法公开了一个休息端点。我可以通过点击“localhost:8080/endpoint”或使用 curl“ http://localhost:8080/endpoint ”在本地环境中调用端点,但我无法在 QA 环境中使用实例的 IP 地址而不是 localhost。甚至登录到虚拟机并尝试 curl “ http://localhost:8080 ”,得到 curl connection denied 错误。根据我的理解,嵌入式 tomcat 服务器应该从端口 8080 开始。我是否缺少与 tomcat 配置相关的内容?

标签: javaspring-bootspring-mvcspring-restcontroller

解决方案


推荐阅读