Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autopoi 模板导出缓存问题及解决方案 #5933

Closed
vixiaobai opened this issue Mar 1, 2024 · 5 comments · Fixed by jeecgboot/autopoi#109
Closed

autopoi 模板导出缓存问题及解决方案 #5933

vixiaobai opened this issue Mar 1, 2024 · 5 comments · Fixed by jeecgboot/autopoi#109

Comments

@vixiaobai
Copy link

版本号:

3.6.2

前端版本:

vue3版

问题描述:

业务需求会导出一些比较复杂的word表格. 在开发过程中发现模板导出存在缓存问题.
缓存问题会导致更新模板后不生效,需要每次都重启系统.

在此基础上稍加改动可以通过http连接加载模板更方便一些

截图&代码:

重写POICacheManager 添加清除缓存方法,需要时调用即可

package org.jeecgframework.poi.cache.manager;
public class POICacheManager {
// ... 省略
//添加清除缓存方法
    public static void cleanCache() {
        loadingCache.invalidateAll();
    }
@zhangdaiscott
Copy link
Member

cr

@hoperunChen
Copy link

已增加 清除缓存方法,待autopoi新版本更新

@xiaosehu
Copy link

xiaosehu commented Apr 8, 2024

vue2后台也遇到同类问题:修改或覆盖了word模板文件,然后重新生成的word文件内容没变,重启服务端才好使。
vue2又该如何解决呢?

@xiaosehu
Copy link

xiaosehu commented Apr 8, 2024

备注: vue2 后台版本 v3.4.3

@zhangdaiscott
Copy link
Member

升级autopoi到1.4.8版本就好了

<dependency>
  <groupId>org.jeecgframework</groupId>
  <artifactId>autopoi-web</artifactId>
  <version>1.4.8</version>
</dependency>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants