springboot2 如何配置文件上傳的大小

application.yml配置文件下添加如下配置

spring:
  datasource:
    name: 8888
    url: jdbc:mysql://127.0.0.1:3306/***?useUnicode=true&characterEncoding=utf8
    username: root
    password: 123456
    driver-class-name: com.mysql.jdbc.Driver
    type: com.alibaba.druid.pool.DruidDataSource
    filters: stat
    maxActive: 20
    initialSize: 1
    maxWait: 60000
    minIdle: 1
    timeBetweenEvictionRunsMillis: 60000
    minEvictableIdleTimeMillis: 300000
    validationQuery: select 'x'
    testWhileIdle: true
    testOnBorrow: false
    testOnReturn: false
    poolPreparedStatements: true
    maxOpenPreparedStatements: 20
  messages:
    basename: message/messages_zh_CN
    encoding: UTF-8
  servlet:
    multipart:
      max-request-size: 100MB
      max-file-size: 10MB

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章