springcloud
springcloud微服务架构,分布式框架
小新新爱洗澡
项目开发中遇到的问题,并记录下可以帮助到其他人的解决办法,技术分享总结
展开
-
Spring Boot上传文件 org.apache.tomcat.util.http.fileupload.FileUploadBase$FileSizeLimitExceededException
目的:解决项目上传文件1Mb的限制方法,我在开发中碰到过好几个地方对上传文件都有1Mb的限制,可实际开发中远远不够,这就需要我们去修改默认配置了,破解上传文件1Mb的禁锢1.项目使用的是Spring Boot + Spring Cloud,上传附件报超出自带tomacat限制大小(默认1M)当上传超过1Mb的时候会报如下错误:Maximum upload size exceeded...原创 2019-04-28 11:06:57 · 6881 阅读 · 7 评论 -
Name for argument type [java.lang.Long] not available, and parameter name information not found in
异常Name for argument type [java.lang.Long] not available, and parameter name information not found in class file either.如图:我出现这个问题是因为觉得eclipse太卡,所以关闭了很多eclipse的插件配置解决:方案一:在项目名上右键选择Proper...原创 2019-04-03 17:38:25 · 14070 阅读 · 0 评论 -
springboot中@NotEmpty ,@NotNull的区别
1 @NotEmpty :不能为null,且Size>02 @NotNull:不能为null,但可以为empty,没有Size的约束。官方文档解释:@NotNull: The CharSequence, Collection, Map or Array object is not null,but can be empty.@NotEmpty: The CharSequen...原创 2018-11-13 17:40:16 · 4914 阅读 · 0 评论 -
java,springboot中日期 yyyy-MM-dd HH:mm:ss和yyyy-MM-dd hh:mm:ss的区别
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")在springboot开发中,绝大多数人肯定用过这个Date格式转换标签,在Java开发中需要转换时间格式也是一样。那么有yyyy-MM-dd HH:mm:ss和yyyy-MM-dd hh:mm:ss有啥区...原创 2018-11-13 17:33:48 · 3175 阅读 · 0 评论 -
springboot在启动的时候执行sql文件无效,静态文件无效
问题:spring boot 1.x版本都没问题,但用spring boot 2.0以上版本在resource文件夹下添加schema.sql或schema-all.sql,或者是在application中配置schema:- classpath:department.sql都无法在spring boot启动时执行sql文件,也就是启动springboot程序的时候控制台不会看到执行数据库...原创 2018-10-25 14:35:30 · 3018 阅读 · 0 评论