现象:
1:tomcat 控制台打印所有静态文件的警告日志
2:tomcat启动贼慢
报错日志:
27-Nov-2019 11:54:05.925 警告 [eps.joyhua.cn-startStop-1] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/WEB-INF/classes/mybatis-generator/mybatis-generator-core-1.3.2-sources.jar] to the cache for web application [] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
...........
解决方案:
在tomcat 安装目录下的conf/context.xml 中的 </Context> 标签前添加
示例:
<Context>
<!-- Default set of monitored resources. If one of these changes, the -->
<!-- web application will be reloaded. -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
<Resources cachingAllowed="true" cacheMaxSize="1000000" />
</Context>
参考资料:https://gofinall.com/75.html