我正在尝试在jhipster整体应用程序中实现一个简单的下载按钮,以帮助我下载特定实体的所有条目。
有人可以帮助我,告诉我该怎么做吗?
答案 0 :(得分:1)
添加此软件包:
public class VideoCache {
private static SimpleCache sDownloadCache;
public static SimpleCache getInstance() {
if (sDownloadCache == null) sDownloadCache = new SimpleCache(new File(getCacheDir(), "exoCache"), new NoOpCacheEvictor());
return sDownloadCache;
}
}
然后创建此服务:
DataSource.Factory dataSourceFactory = new CacheDataSourceFactory(VideoCache.getInstance(), new DefaultDataSourceFactory(this, "seyed"));
用法:
yarn add file-saver
yarn add xlsx