英文:
how to deploy Spring boot application in IIS
问题
我有一个 Spring Boot 应用程序,如果我想在本地运行该应用程序,我们可以使用 spring-boot:run
命令运行,或者只需执行主类,我们的项目就可以运行。但是在这里,我想将相同的应用程序部署到 IIS 服务器上。
我有一个 Angular 应用,只需添加路径并运行 ng build --prod
就足以在 IIS 中运行,但是当涉及到 Java 时,我对如何在 IIS 中运行该应用程序感到困惑。
我认为使用 spring-boot:run
是行不通的,因为它使用了内部的 Tomcat 服务器,但是在 IIS 中,我们应该如何部署这个应用程序呢?
英文:
I have a Spring boot application, If I want to run that application locally we can run with spring-boot:run
Or by just executing the main class our project is ready to work. But here I want to deploy the same on IIS Server.
I have an angular app, by just adding the path and running ng build --prod
is sufficient to run in the IIS but when coming to java I am confused to run the application in IIS.
I dont think so it will work with spring-boot:run
as it is using internal tomcat server, But in the IIS how do we need to deploy this application.
答案1
得分: 1
这是一个基于Java的应用程序,因此不建议在IIS中部署。您可以使用Docker容器来运行该应用程序,然后使用反向代理将请求重定向到该API。
参考链接:
https://github.com/jonashackt/ansible-windows-docker-springboot
英文:
It is a java based application so it is not recommended to deploy in iis.you could use a docker container to run the application and then use a reverse proxy to redirect the request to that API.
Reference link:
https://github.com/jonashackt/ansible-windows-docker-springboot
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论