
springboot
persistenceヾ(◍°∇°◍)ノ
功不成,名不就,何以游戏人生! 努力到无能为力,拼搏到感动自己,路漫漫其修远兮,吾将上下而求索..
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
启动swagger报错nested exception is java.lang.NumberFormatException: For input string: “swagger-ui”
开心的启动swagger然后报错400Failed to convert value of type ‘java.lang.*’ to required type ‘java.lang.*’; nested exception is java.lang.NumberFormatException: For input string: “swagger-ui”注意:这个错误就需要你检查你项目中的所有controller所有Controller 中必须有@RequestMapp...原创 2020-05-14 21:03:49 · 3564 阅读 · 0 评论 -
springboot解决日期传给前端少了八小时的问题
第一种:import com.fasterxml.jackson.annotation.JsonFormat;import org.springframework.format.annotation.DateTimeFormat;@DateTimeFormat@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")@ApiModelProperty(value = "时间", example = "2020-4-.原创 2020-05-13 19:10:22 · 2338 阅读 · 0 评论 -
springboot解决Long /BigInteger /BigDecimal类型数据传给前端损失精度问题
import com.fasterxml.jackson.databind.ObjectMapper;import com.fasterxml.jackson.databind.module.SimpleModule;import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;import org.spring.原创 2020-05-13 17:03:02 · 3064 阅读 · 0 评论 -
SpringBoot 测试类注入对象失败
https://blog.youkuaiyun.com/persistencegoing/article/details/84376427一直没法自动注入,后来在@SpringBootTest,加入启动类Application后就可以了@RunWith(SpringRunner.class)@SpringBootTest(classes = Application.class)...原创 2019-04-01 16:32:58 · 2115 阅读 · 0 评论 -
SpringBoot2.0之 个性化Banner
https://blog.youkuaiyun.com/persistencegoing/article/details/84376427当我们开发了一套自己的系统时,如果加上自己的一个个性化Banner,会不会让我们的程序更加别具一格呢,下面我们能就来介绍一下SpringBoot的Banner功能。其实在SpringBoot 1.0中就已经有了更换启动Banner的方法,并且使用起来非常简...原创 2019-04-22 13:20:34 · 692 阅读 · 0 评论 -
SpringBoot2.0 多环境下配置文件设置
开发过程中面对不同的环境,例如数据库、redis服务器等的不同,可能会面临一直需要修改配置的麻烦中,在以前的项目中,曾通过Tomcat的配置来实现,有的项目甚至需要手动修改相关配置,这种方式费时费力,出错的概率还极大,SpringBoot为我们提供了更加简单方便的配置方案来解决多环境的配置问题,下面我们看看怎么实现。一、新建一个项目(本文以上篇的代码为基础)红框标示的即为本篇的重...原创 2019-04-22 13:25:58 · 996 阅读 · 0 评论 -
SpringBoot注解大全
一、注解(annotations)列表@SpringBootApplication:包含了@ComponentScan、@Configuration和@EnableAutoConfiguration注解。其中@ComponentScan让spring Boot扫描到Configuration类并把它加入到程序上下文。@Configuration 等同于spring的XML配置文件;使用Java...原创 2019-05-22 09:39:21 · 548 阅读 · 0 评论 -
springboot模板引擎thymeleaf(一)
很多初学者可能都不知道怎么读,翻译软件是“ saimu leifu ”,其实是错的读音的地址:https://fanyi.baidu.com/?aldtype=23#en/zh/thymeleaf官网中有正确的读音:https://www.thymeleaf.org/正确读音:/ˈtaɪmˌlɪːf/In case you are unsure, 'Thymeleaf' is pr...原创 2019-06-15 22:28:28 · 752 阅读 · 0 评论 -
SpringCloud(SpringBoot)、Tomcat和Nginx配置HTTPS
https://blog.youkuaiyun.com/persistencegoing/article/details/84376427一、https 简介HTTPS(全称:Hyper Text Transfer Protocol over Secure Socket Layer),是以安全为目标的HTTP通道,简单讲是HTTP的安全版。即HTTP下加入SSL层,HTTPS的安全基础是SS...原创 2018-12-21 09:51:29 · 2846 阅读 · 0 评论 -
SpringBoot多数据源配置下集成MyBatis、PageHelper以及druid监控
Demo项目采用Springboot 2.0.3RELEASE版本使用IDEA创建Spring boot项目后,在pom.xml中添加如下依赖 <!-- MyBaits --> <dependency> <groupId>org.mybatis.spring.boot</group...转载 2019-03-27 17:06:26 · 988 阅读 · 0 评论 -
swagger2如何测试单个文件或者多文件上传(springboot)
All rights reserved.No part of this article may be reproduced or distributed by any means,or stored in a database or retrieval system,without the prior written permission of persistenceGoing author...原创 2019-02-23 15:20:35 · 30778 阅读 · 12 评论 -
如何快速学习springboot,IDEA导入项目后无法启动application类,如何把普通项目(原本为springboot项目)变成springboot(maven)
All rights reserved.No part of this article may be reproduced or distributed by any means,or stored in a database or retrieval system,without the prior written permission of persistenceGoing authorhtt...原创 2019-02-26 10:25:32 · 6479 阅读 · 5 评论 -
@Data (lombok)
https://blog.youkuaiyun.com/persistencegoing/article/details/84376427这个注解来自于 lombok,lombok 能够减少大量的模板代码,在使用@Data 注解时, 需要导入lombok.Data,下面列举下 lombok提供的注解:val : 和 scala 中 val 同名, 可以在运行时确定类型;@NonNull : 注解在...转载 2019-03-07 09:27:18 · 2187 阅读 · 0 评论 -
解决SpringBoot @Value对static属性无效(为null)的问题
https://blog.youkuaiyun.com/persistencegoing/article/details/84376427springboot写一个工具类,使用@Value注入配置文件的值,但是一直为空,后来查资料发现@Value对static的属性注入无效。我的解决办法,其实也挺简单的,就写一个setter方法,在setter方法中注入。当然这个工具类首先得是一个Bean否则是不能被...原创 2019-03-12 13:39:50 · 1318 阅读 · 0 评论 -
Spring Boot-启动时加载数据CommandLineRunner
https://blog.youkuaiyun.com/persistencegoing/article/details/84376427实际应用中,我们会有在项目服务启动的时候就去加载一些数据或做一些事情这样的需求。为了解决这样的问题,Spring Boot 为我们提供了一个方法,通过实现接口 CommandLineRunner 来实现。创建一个类实现CommandLineRunner接口,将要实现...原创 2019-03-25 11:05:14 · 661 阅读 · 0 评论 -
SpringBoot+Mybatis+Mysql结合微信小程序实现登录
https://blog.youkuaiyun.com/persistencegoing/article/details/84376427今天利用了休息的时间自学了一下微信小程序 后端采用了流行的SpringBoot框架 接下来我们看代码吧 首先介绍的是后端代码搭建Spring Boot框架,搭建好后修改一下application.yml文件server: servlet: ...转载 2019-03-25 15:48:25 · 2708 阅读 · 0 评论 -
修改springboot内置tomcat上传文件的大小参数
https://blog.youkuaiyun.com/persistencegoing/article/details/84376427报错Maximum upload size exceededthe request was rejected because its size (9739444) exceeds the configured maximum (5242880)上传大小超出限...原创 2019-03-22 10:46:19 · 8968 阅读 · 0 评论 -
FileSizeLimitExceededException: The field files exceeds its maximum permitted size of 1048576 bytes
All rights reserved.No part of this article may be reproduced or distributed by any means,or stored in a database or retrieval system,without the prior written permission of persistenceGoing authorh...原创 2019-02-23 15:09:32 · 3293 阅读 · 0 评论