在 tomcat 中禁用特定 war 的加载

Disable a loading of specific war in tomcat

tomcat 中是否有任何配置可用,我需要禁用特定 war 的加载。

此致,

拉格万

server.xml 中查找 Host 元素。向其添加具有适当值的 deployIgnore 属性。
值为

A regular expression defining paths to ignore when autoDeploy and deployOnStartup are set.
...
This regular expression is relative to appBase. It is also anchored, meaning the match is performed against the entire file/directory name. So, foo matches only a file or directory named foo but not foo.war, foobar, or myfooapp. To match anything with "foo", you could use .*foo.*.

例如,您可以指定类似

的内容
<Host name="localhost"  appBase="webapps" deployIgnore="yourApp(.war)?"
        unpackWARs="true" autoDeploy="true">
    ...        
</Host>

documentation