
springboot
Coco_淳
既然琴瑟起,何以笙箫默
展开
-
springboot自定义线程池+mdc异步线程注入traceid
springboot自定义线程池,mdc异步线程注入traceid原创 2023-06-05 16:30:31 · 1340 阅读 · 0 评论 -
springboot+skywalking初体检
springboot+skywalking原创 2022-10-19 15:08:50 · 1308 阅读 · 3 评论 -
springboot中使用rabbitmq
springboot使用rabbitmq原创 2022-09-19 09:12:02 · 782 阅读 · 0 评论 -
springboot 请求url path提取
path提取原创 2022-09-02 10:47:35 · 1365 阅读 · 0 评论 -
springboot @PostMapping注解使用
@PostMapping注解使用原创 2022-08-31 11:17:40 · 4366 阅读 · 0 评论 -
springboot @Scheduled和@Async
@Scheduled和@Async原创 2022-08-18 10:21:06 · 857 阅读 · 0 评论 -
继承HttpServletRequestWrapper自定义,重复消费请求参数
package com.xxx.request;import javax.servlet.ReadListener;import javax.servlet.ServletInputStream;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletRequestWrapper;import java.io.ByteArrayInputStream;import java.io.IO.原创 2022-03-25 15:15:31 · 3374 阅读 · 0 评论 -
springboot使用配置文件为类静态变量赋值
链接一:java静态类如何赋值_Java如何读取配置文件并赋值静态变量_weixin_42523552的博客-CSDN博客链接二:1.SpringBoot 读取配置文件的值 赋给静态变量 - java_静止 - 博客园 (cnblogs.com)原创 2022-03-01 17:08:56 · 477 阅读 · 0 评论 -
springboot 排除swagger 拦截
package com.dc.smart.core.config;import cn.dev33.satoken.interceptor.SaRouteInterceptor;import org.hibernate.validator.HibernateValidator;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;.原创 2022-01-28 16:09:46 · 4671 阅读 · 0 评论 -
springboot事件监听
本文内容是我工作中使用的方式,还有其他实现方式,参考:(1条消息) SpringBoot-事件监听的4种实现方式_ignorewho的博客-CSDN博客_springboot监听https://blog.csdn.net/ignorewho/article/details/80702827自定义事件:继承自ApplicationEvent抽象类,然后定义自己的构造器自定义监听:实现ApplicationListener<T>接口,然后实现onApplicationEvent方法事件发..原创 2022-01-07 09:12:34 · 469 阅读 · 0 评论 -
springboot参数校验
参考文章:(1条消息) springBoot参数联合校验,自定义分组校验_yuhui666666的博客-CSDN博客_springboot 参数联合校验https://blog.csdn.net/y666666y/article/details/118482863一、自定义注解完成微信支付,申请退款参数二选一@GroupSequenceProvider(value = NativeRefundSequenceProvider.class)@Datapublic class NativeRef.原创 2022-01-04 10:58:18 · 971 阅读 · 0 评论 -
springboot中读取classpath下的资源文件
1、NIO包中的操作 String content = new String(Files.readAllBytes(Paths.get(ClassLoader.getSystemResource("static/xxxx.txt").toURI())), "utf-8"); 2、ClassPathResource 读取 inputstream ClassPathResource classPathResource = new ClassPathResource原创 2021-12-29 14:33:36 · 1647 阅读 · 0 评论 -
Springboot 多线程
1. 自定义线程池package net.genesysinfo.digitalreport.config;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.scheduling.annotation.EnableAsync;import org.springfram.原创 2021-11-24 11:47:30 · 656 阅读 · 0 评论 -
Springboot中Logback日志配置
1、根据日期和文件大小分割日志,同一天产生多个日志,以索引标识实际使用修改<maxFileSize>1KB</maxFileSize> 的值<configuration> <!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径--> <property name="LOG_HOME" value="D:\\" /> <!-- %m输出的信息,%p日志级别,%t线程名,%d日期,%...原创 2021-10-13 17:10:35 · 1489 阅读 · 0 评论 -
@RequestHeader 注解 从REST Controller获取HTTP请求头
传送门:从REST Controller获取HTTP请求头_liululee的博客-CSDN博客原创 2021-08-20 09:13:56 · 529 阅读 · 0 评论