
springBoot
小玉起起
不要假装很努力!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Spring框架里面的ApplicationContextAware接口
Spring框架里面的ApplicationContextAware接口的使用原创 2023-05-10 16:29:44 · 254 阅读 · 0 评论 -
java swagger上传文件配置
1.直接按照模板设置就可以 @ApiImplicitParams({ @ApiImplicitParam(name = "title", value = "标题", required = true, dataType = "String", paramType = "query"), }) @PostMapping(value = "/contribution",consumes = "multipart/*",headers = "content-type=multip原创 2022-01-18 16:05:12 · 2041 阅读 · 0 评论 -
访问swagger-ui.html页面报错Unable to infer base url.
1.报错如下2.解决方案在启动类上添加@EnableSwagger2注解原创 2021-12-08 17:18:30 · 756 阅读 · 0 评论 -
Failed to deserialize payload
1.redis反序列化报错,具体报错如下 Cannot deserialize; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to deserialize payload. Is the byte array a result of corresponding serialization for DefaultDeserializer?; neste原创 2021-03-30 17:38:18 · 10778 阅读 · 0 评论 -
swagger2.9.2 报java.lang.NumberFormatException: For input string: ““...
1.解决办法参考https://www.cnblogs.com/haolb123/archive/2004/01/13/14183839.html原创 2021-01-15 15:37:56 · 3907 阅读 · 0 评论 -
java.io.EOFException: null
1.错误类型DEBUG o.a.coyote.http11.Http11Processor - Error parsing HTTP request headerjava.io.EOFException: null at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1262) at org.apache.tomcat.util.net.NioEndpoint$NioSo原创 2021-01-08 10:05:11 · 22115 阅读 · 0 评论 -
java.lang.IllegalStateException: Failed to load property source from location ‘classpath:/config/
1.用SpringBoot重构项目是遇到加载配置文件的错误,导致项目一直启动不了。java.lang.IllegalStateException: Failed to load property source from location 'classpath:/config/application.yml2.第一反应是yml里面参数不规范(一般是配置文件中有多余的空格 或缺少空格),仔细检查之后,不是文件格式的问题,而是配置文件编码不一致导致的,统一编码之后 项目正常启动。编码设置如下图:...原创 2020-12-30 17:29:40 · 5010 阅读 · 0 评论 -
自定义线程池
1.先上代码import com.google.common.util.concurrent.ThreadFactoryBuilder;import java.util.concurrent.*;public class ThreadPool { /** * 获取CPU核心数 * * 核心线程数设置 * CPU 密集型:线程数量=cpu核心数量 * IO 密集型:线程数量=cpu核心数量*2 */ private s原创 2020-11-26 10:41:37 · 4012 阅读 · 0 评论 -
SpringBoot配置文件脱敏处理
为避免把数据库等明文密码直接对外暴漏,需要对配置文件进行脱敏处理,具体步骤总结如下:1.导入依赖<dependency> <groupId>com.github.ulisesbocchio</groupId> <artifactId>jasypt-spring-boot-starter</artifactId> <version>1.18</version></dependency>原创 2020-07-02 15:52:42 · 5581 阅读 · 0 评论