[英]How to run two spring boot applications on same server?
I have two Spring Boot applications.我有两个 Spring Boot 应用程序。 I want them to run on different ports at the same time on the server, right now I'm testing it locally on my computer and when I run both jars and I'm using one application, the other one would refresh and logout.
我希望它们同时在服务器上的不同端口上运行,现在我正在我的计算机上本地测试它,当我运行两个 jar 并且我正在使用一个应用程序时,另一个会刷新并注销。 I can't use both applications at the same time.
我不能同时使用这两个应用程序。
Is this a problem with the embedded server, spring boot or something else?这是嵌入式服务器的问题,spring boot还是其他什么? I've read a couple of articles but I'm not sure why is this or how to solve this in the best way.
我已经阅读了几篇文章,但我不确定这是为什么或如何以最佳方式解决这个问题。 Should I package both apps as WAR and run them using Apache Tomcat, or is there a newest way to do this with spring boot and the jar packaging?
我应该将这两个应用程序打包为 WAR 并使用 Apache Tomcat 运行它们,还是有最新的方法可以使用 spring boot 和 jar 打包来执行此操作?
The sessions are based on cookie and the cookie is saved based on the name and the hostname.会话基于 cookie,cookie 是根据名称和主机名保存的。 For example if you are running two spring boot or tomcat applications and try to connect on these 2 applications:
例如,如果您正在运行两个 spring boot 或 tomcat 应用程序并尝试连接这两个应用程序:
You can:你可以:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.