将SpringBoot Api部署到IIS Web服务器 [英] Deploy SpringBoot Api into IIS Web Server
问题描述
我用gradle build创建了spring boot api.一切在我的本地工作正常.
I created spring boot api with gradle build. everything working fine in my local.
我在IIS Web服务器的Sites/DefaultsTest中部署了角度应用程序.它在 https://example.app.com/app
I deployed angular app in Sites/DefaultsTest in IIS web server. it run in https://example.app.com/app
SpringBoot API的基本路径是'/api'
SpringBoot API base path is '/api'
我想在同一台Windows服务器计算机上部署spring boot api,并且应该能够通过Angular App全局访问.
I want to deploy spring boot api in same windows server machine and should able to access through Angular App globally.
请引导我.
推荐答案
据我所知,spring boot API是Java Web应用程序,我们建议您不要直接在IIS中托管Java Web应用程序.
As far as I know, the spring boot API is a java web application, we don't suggest you directly hosted the java web application in the IIS.
我建议您可以尝试安装docker或使用tomcat托管应用程序,然后可以使用IIS反向代理将请求重定向到该API以获得结果.
I suggest you could try to install a docker or using tomcat to host the application, then you could use IIS reverse proxy to redirect the request to that API to get the result.
有关如何在docker上托管Spring Boot应用程序的更多详细信息,您可以参考以下文章. https://blog.codecentric.de/en/2017/04/ansible-docker-windows-containers-spring-boot/
More details about how host the spring boot application on the docker, you could refer to below article. https://blog.codecentric.de/en/2017/04/ansible-docker-windows-containers-spring-boot/
有关如何使用IIS反向代理的更多详细信息,您可以参考以下文章.
More details about how to use IIS reverse proxy, you could refer to below article.
这篇关于将SpringBoot Api部署到IIS Web服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!