设置tomcat支持软连接

一般开发时不会在tomcat安装目录/data/tomcat/webapps/ROOT 下去,上传部署;而是建立软连接,在tomcat安装目录之外操作,比如执行git pull拉取项目,而tomcat默认不支持软连接。
 
1、要让tomcat支持软连接,需要在tomcat配置文件conf/context.xml里追加allowLinking="true"(tomcat8开始配置有变),具体如下配置:
 
 
<!-- Tomcat 7: -->
<Context allowLinking="true" />
 
<!-- Tomcat 8: -->
<Context>
<Resources allowLinking="true" />
</Context>
 
 
 
 
在tomcat建立软连接:
 
 
原文地址:https://www.cnblogs.com/dingxu/p/9027064.html