Class ZerowebFsConfig

java.lang.Object
io.github.xezzon.zeroweb.storage.fs.ZerowebFsConfig

@Configuration @ConfigurationProperties(prefix="zeroweb.file.fs") @ConditionalOnProperty(name="ZEROWEB_FS_BASEPATH") public class ZerowebFsConfig extends Object
文件系统存储配置。 如果没有配置附件存储的基础路径,则不会注册 Bean。
Author:
xezzon
  • Constructor Details

    • ZerowebFsConfig

      public ZerowebFsConfig()
  • Method Details

    • init

      @PostConstruct public void init() throws IOException
      应用启动后,创建文件上传基础目录(如果不存在)
      Throws:
      IOException - 创建目录失败
    • getBasePath

      public Path getBasePath()
      获取文件上传基础路径
      Returns:
      文件上传基础路径
    • getPartSize

      public long getPartSize()
      获取文件存储的分片大小
      Returns:
      文件存储的分片大小。单位 Byte