gpt4 book ai didi

java - tomcat热部署war文件到现场

转载 作者:行者123 更新时间:2023-11-28 22:31:41 25 4
gpt4 key购买 nike

来自 this blog :

All you need to do is to

  1. keep your old app foo.war untouched

  2. name your new version of app to foo##0001.war and upload to webapps folder

The old session will use foo.war, and new user will use foo##0001.war.

这是在不重启网络服务器的情况下部署新版本应用程序的最佳方式吗?字符串字面上是否正确,myApp.war 将替换为 myApp##0001。 war,这个字符串看起来很不寻常。

最佳答案

根据Tomcat 7 documentation :

The version component is treated as a String both for performance reasons and to allow flexibility in versioning schemes. String comparisons are used to determine version order. If version is not specified, it is treated as the empty string. Therefore, foo.war will be treated as an earlier version than foo##11.war and foo##11.war will be treated as an earlier version than foo##2.war. If using a purely numerical versioning scheme it is recommended that zero padding is used so that foo##002.war is treated as an earlier version than foo##011.war.

所以字符串虽然非常规,但似乎是预期的。

但我想知道:通过 Tomcat 管理,您可以在不重新启动 Tomcat 的情况下部署/取消部署 Web 应用程序。你不能用那个吗?

关于java - tomcat热部署war文件到现场,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14915545/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com