簡體   English   中英

azure 上的 springboot 應用程序服務在啟動后立即停止

[英]springboot app on azure app service stops right after start

我在 azure 應用服務上有一個 spring 啟動 rest 應用程序。 每當我使用azure DevOps 管道或直接使用azure-webapp-maven-plugin部署應用程序時,部署都會成功,因為我可以從Kudu Debug Console看到所有上傳的文件在site/wwwroot/webapps/ROOT中。 當我嘗試訪問任何端點甚至應用程序 URL 時,它會返回 404(未找到錯誤)。 我拉起日志,這就是我發現的。

[DEBUG] 2020-05-24 10:45:31,644 org.springframework.core.env.PropertySourcesPropertyResolver logKeyFound - - Found key 'spring.liveBeansView.mbeanDomain' in PropertySource 'servletContextInitParams' with value of type String
[INFO] 2020-05-24 10:45:31,660 com.company.product.core.MainApplication logStarted - - Started MainApplication in 37.424 seconds (JVM running for 65.143)
[DEBUG] 2020-05-24 10:45:32,347 org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext doClose - - Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@60d5a711, started on Sun May 24 10:44:58 GMT 2020
[DEBUG] 2020-05-24 10:45:32,378 org.springframework.core.env.PropertySourcesPropertyResolver logKeyFound - - Found key 'spring.liveBeansView.mbeanDomain' in PropertySource 'servletContextInitParams' with value of type String
[DEBUG] 2020-05-24 10:45:32,456 org.springframework.context.support.DefaultLifecycleProcessor stop - - Stopping beans in phase 2147483647
[DEBUG] 2020-05-24 10:45:32,456 org.springframework.context.support.DefaultLifecycleProcessor lambda$doStop$2 - - Bean 'documentationPluginsBootstrapper' completed its stop procedure
[DEBUG] 2020-05-24 10:45:32,456 org.springframework.jmx.export.annotation.AnnotationMBeanExporter destroy - - Unregistering JMX-exposed beans on shutdown
[DEBUG] 2020-05-24 10:45:32,456 org.springframework.jmx.export.annotation.AnnotationMBeanExporter unregisterBeans - - Unregistering JMX-exposed beans
[INFO] 2020-05-24 10:45:32,456 org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor shutdown - - Shutting down ExecutorService 'applicationTaskExecutor'

應用程序在初始化后立即關閉。 在我看來,好像應用服務正在向 spring 啟動應用程序發送關閉命令。 有人可以幫忙嗎? 我時間緊迫。 提前致謝。

通常我們使用 Z68995FCBF432492D150484DZ 應用程序部署 spring 引導應用程序到 azure web 應用程序文件以下是步驟:

1.Go到你的webapp在門戶->配置->檢查Java容器。 我們將使用 Java SE 而不是 Tomcat。

在此處輸入圖像描述

2.Go 在門戶網站->高級工具->調試控制台->Cmd中到您的webapp。 將您的 jar 文件放在 wwwroot 文件夾下。 需要命名為app.jar。

3.結果

在此處輸入圖像描述

在此處輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM