在 Azure 应用服务上部署 Spring Boot jar

我无法让 Spring Boot API 在 Azure 应用服务上运行.我遵循了关于 https://docs.microsoft.com/en-us/java/azure/spring-framework/deploy-spring-boot-java-web-app-on-azure 但有到目前为止没有运气.

I'm having trouble getting a Spring Boot API to work on an Azure app service. I've followed the Microsoft guide on https://docs.microsoft.com/en-us/java/azure/spring-framework/deploy-spring-boot-java-web-app-on-azure but having no luck so far.

应用程序确实启动了(我可以在日志文件中看到应用程序启动)但是对应用程序服务 url 的 http 请求总是以超时结束.

The application does start (I can see the app boot up in the log file) but http requests to the app service url always end in a timeout.

我听说 Azure 应用服务只选择在端口 80 或 8080 上运行的嵌入式 tomcat 服务器,但也没有运气.

I've read that Azure app services only pick up embedded tomcat servers that run on port 80 or 8080, but had no luck with that as well.

应用程序部署在 www 根目录中,并且还部署了相应的 web.config.

The app is deployed in the www root and an appropriate web.config is deployed as well.

我尝试在有和没有应用程序服务器(Tomcat 和 Jetty,因为服务器嵌入在应用程序中,所以不需要)的情况下运行应用服务,但两种方法都失败了.

I've tried running the App Service with and without an application server (Tomcat and Jetty, that is not needed because the server is embedded in the application), but both approaches failed.

我是否缺少其他配置部分?或者这可能与我在 azure 上使用的计划类型有关?也许资源有问题?

Am I missing some other configuration part? Or could this be related to the type of plan I'm using on azure? Maybe some issue with the resource?

有什么建议吗?

谢谢,

伯特

推荐答案

事实证明,我认为这是 azure 资源问题的预感是正确的.升级资源内存和 CPU 解决了这个问题.

It turns out that my hunch about it being an issue with the azure resource was correct. Upscaling resource memory and CPU resolved the issue.

相关文章