在配置文件中修改了

spring.servlet.multipart.max-file-size=3.40
spring.servlet.multipart.max-request-size=3M 遇到下面的错误:

Description:

Failed to bind properties under 'spring.servlet.multipart.max-file-size' to org.springframework.util.unit.DataSize:

Property: spring.servlet.multipart.max-file-size
Value: 3M
Origin: class path resource [application.properties]:2:40
Reason: failed to convert java.lang.String to org.springframework.util.unit.DataSize

Action:

Update your application's configuration

Java springboot 中上传图片文件的1Md的限制的更多相关文章

  1. java project中 xml文件路径问题

    xml文件默认是和src文件平级的,当不在project根目录下时,java代码中使用xml文件时需要写为这种形式:“/src/..../bean.xml”

  2. JAVA框架中XML文件

    其实在JAVA开发中servlet配置,映射注入配置等等都可以用xml来配置 在此处的department是实体类的名字,而不是对应的数据库表的名字 数据库表的字段名=#{实体类属性名} 逆向工程生成 ...

  3. Java SpringBoot中使用sqljdbc4注意事项 java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver

    因项目需要,需要在Java项目中访问 MSSQLServer 数据库,本地开发的时候,没有问题,可以正常链接数据库,通过Jenkins部署到服务器上时候,报数据库驱动未找到. java.lang.Cl ...

  4. angularJs中上传图片/文件功能:ng-file-upload

    原文技术交流:http://www.ncloud.hk/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/angularjs-ng-file-upload/ 在做网站的过程中难 ...

  5. java项目中Excel文件的导入导出

    package poi.excel; import java.io.IOException; import java.io.InputStream; import java.io.OutputStre ...

  6. kafka+windows+java+springboot中的配置

    1.百度kafka+zookeeper+windows配置 1.1  zookeeper配置 dataDir=/tmp/zookeeper # the port at which the client ...

  7. Eclipse 中 Java 项目中 .settings 文件夹作用

    今天工作时,因对 .settings 文件夹误操作,耗时 6 个多小时,才了解到原因就出在 .settings 文件夹.经查阅资料,对 .settings 做如下整理: 就如setting这个名字,就 ...

  8. java项目中Excel文件预览

    package com.linkonworks.df.busi.utils; import java.io.File; import java.io.FileInputStream; import j ...

  9. java项目中获取文件路径的几种方法

    // 第一种: 2 File f = new File(this.getClass().getResource("/").getPath()); // 结果: /Users/adm ...

随机推荐

  1. 【Leetcode_easy】868. Binary Gap

    problem 868. Binary Gap solution1: class Solution { public: int binaryGap(int N) { ; vector<int&g ...

  2. 11点睛Spring4.1-Property Editor

    11.1 Propert Editor property editor是JavaBeans API的一项特性,用来字符和属性值之间的互相转换(如2014-03-02和Date类型的互相转换) spri ...

  3. Arcgis javascript api 动态图层自图层可见性设置

    Arcgis javascript api 动态图层自图层可见性设置 子图层管理 rest服务 sublayers sublayer ArcGISDynamicMapServiceLayer 本文主要 ...

  4. pt-kill MySQL会话杀灭神器

    废话不多说,直接上例子: pt-kill --host=127.0.0.1 --user=xxx --password=xxxxxx --port=xxxx --busy-time 10 --matc ...

  5. Andrew Ng机器学习课程10

    Andrew Ng机器学习课程10 a example 如果hypothesis set中的hypothesis是由d个real number决定的,那么用64位的计算机数据表示的话,那么模型的个数一 ...

  6. windows server 2012 r2 无法安装 .net 3.5

    服务器需安装SQL 2012 ,因需安装.net3.5,没有想到2012出于安全竟然不让手动安装,对于源文件也是把控比较严,折腾了好一会儿才解决问题 有参才一下powershell等安装命令,均失败. ...

  7. 【MPEG】DVB / ATSC / ISDB区别

    硬件的区别: 欧洲“DVB标准”和美国“ATSC数字电视标准”的主要区别如下: (1)方形像素:在ATSC标准中采纳了“方形像素”(Square Picture Eelements),因为它们更加适合 ...

  8. 又是a+b

    题目描述: 给定两个整数 a, b (a, b 均不超过 int 类型的表示范围),求出 a + b 的和.输入描述: 多组输入,每组输入为一行,里面有 2 个数 a, b.输出描述: 对于每一组输入 ...

  9. C 语言字符串的比较

    C 语言字符串的比较 #include <stdio.h> #include <Windows.h> #include <string.h> int main(vo ...

  10. linux终端提示符修改

    Linux主机名莫名其妙的由@myhostname变成了@bogon了之后 1.在linux下添加一个127.0.0.2名叫bogon的主机此方法使用后,bogon主机名得以解析,使用的主机名仍为bo ...