对于一个学习项目,我们构建了前端和后端应用程序。前端“应用程序”只是一堆链接的HTML/CSS/JavaScript文件。后端应用程序是带有某些端点的Spring Boot / Maven / Java项目。
当我在本地运行后端应用程序时,我可以使用Postman成功地发送邀请。现在,我们已经通过Azure托管了后端应用程序,我不知道如何发送邀请,我不知道要使用哪个URL。
完成此工作后,我想使用这些URL连接前端应用程序和后端应用程序。
For a learning project we've built a frontend and backend application. The frontend "application" is just a bunch of linked html/css/javascript files. The backend application is a spring boot / maven / java project with some endpoints.
When I run the backend application locally I am able to send a GET-request successfully using Postman. Now we've hosted the backend application via Azure and I have no idea how I can send a GET-request, I don't know which url to use.
After I get this to work I'd like to connect front- and backend application using these url's.
发布评论
评论(1)
由于您可以成功地在本地环境中运行后端应用程序,因此您必须按照以下步骤进行配置和部署Spring Web应用程序到Azure App Service:
./ mvnw com.microsoft.azure:azure-webapp-maven-plugin:1.14.0:14.0:config
然后,在命令提示符下,运行此maven命令并设置默认配置通过键入输入和确认(y/n) => 'y',配置将完成。
完成上述步骤后,运行
MVN Azure-Webapp:部署
将Web应用发布到Azure。您的WebApp URL 将显示在输出中。
您可以使用Maven控制台输出中的URL并访问Web应用程序。
另请参阅此知道如何部署前端并后端到同一应用服务计划。
As you can run the backend application in your local environment successfully, you have to follow the below steps to configure and deploy the spring boot web app to azure app service:
./mvnw com.microsoft.azure:azure-webapp-maven-plugin:1.14.0:config
Then, at the Command Prompt, run this maven command and set the default configurations by typing ENTER and Confirm (Y/N) => 'y' and the configuration will gets completed.
Once you've done with the above steps, run
mvn azure-webapp:deploy
to publish the web app to Azure.Your webapp URL will be displayed in the output.
You can use that URL from maven console output and access the web-app.
Also Refer this SO thread to know how to deploy frontend and backend to the same app service plan.