# 从 2.5.1.1 升级到 2.5.1.2

# 更新时间

2025 年 7 月 23 日

# 更新内容

  1. 支持文件上传时自定义扩展名白名单配置。
  2. 支持文件上传时对文件内容进行检测。

# 后端升级步骤

  1. 在根 pom 文件中修改hos-app-dependencies的版本号为2.5.1.2-RELEASEhos-starter-dependencies的版本号为1.3.1.2-RELEASE其余版本号不做改变。
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.mediway.hos</groupId>
            <artifactId>hos-app-dependencies</artifactId>
            <version>2.5.1.2-RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
        <dependency>
            <groupId>com.mediway.hos</groupId>
            <artifactId>hos-starter-dependencies</artifactId>
            <version>1.3.1.2-RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
hos:
  file:
    isOpenSize:               ### 是否开启默认文件上传大小限制    (默认为true)
    maxFileSize:              ### 接口默认上传文件大小单位是MB、GB,不能是M、G等单位        (默认为10MB)
    isOpenExtension:          ### 是否开启默认文件扩展名白名单    (默认为true)
    whiteExtensions:          ### 用户自定义添加文件扩展名白名单
      - .png     ### 白名单示例配置
      - .docx    ### 白名单示例配置
    tika-custom: ### 文件内容检测
      is-open-content-detect: true  ### 是否开启文件内容检测
      extensions:
        - .keytab   ### 配置自定义文件的扩展名(自定义文件扩展名需要配置,常见文件不需要配置)                                     #是否退出时触发统一认证退出,默认值为false