mirror of
https://github.com/zfile-dev/zfile.git
synced 2025-04-19 05:34:52 +00:00
添加缓存支持, 添加搜索功能.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package im.zhaojun.common.service;
|
||||
|
||||
import im.zhaojun.common.config.StorageTypeFactory;
|
||||
import im.zhaojun.common.enums.StorageTypeEnum;
|
||||
import im.zhaojun.common.model.SystemConfig;
|
||||
import im.zhaojun.common.repository.SystemConfigRepository;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -15,4 +17,11 @@ public class SystemConfigService {
|
||||
public SystemConfig getSystemConfig() {
|
||||
return systemConfigRepository.findFirstBy();
|
||||
}
|
||||
}
|
||||
|
||||
public FileService getCurrentFileService() {
|
||||
SystemConfig systemConfig = getSystemConfig();
|
||||
StorageTypeEnum storageStrategy = systemConfig.getStorageStrategy();
|
||||
return StorageTypeFactory.getTrafficMode(storageStrategy);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user