一般开发时不会在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建立软连接:
 
 
 posted on 2018-05-11 23:45  ding-xu  阅读(4091)  评论(0编辑  收藏  举报