利用 Spring Boot Admin 对 Spring Boot 应用监控以及配置认证
前言 Spring Boot Admin 是一个优秀的 Spring Boot 应用监控,可以查看应用的各项性能指标,修改日志级别(生产环境利器,不用动不动就上 Arthas),dump 线程等功能。如果是微服务可以使用 Eureka 来做服务的注册与发现,单体应用的话直接往 Spring Boot Admin 的 Server 端注册就行。 这里…
310
|
|
|
2022-2-15 23:04
|
2022-2-15 23:04
658 字
|
10 分钟
全局日志记录traceId
全局日志记录traceId 单体应用为了更方便的排查问题,使用过滤器+日志框架的MDC功能,实现每个请求产生的日志,都包含一个UUID。 定义过滤器 @Component @Order(1) public class TraceFilter extends OncePerRequestFilter { public static final Str…
402
|
|
|
2022-1-03 20:35
|
2022-1-03 20:35
311 字
|
6 分钟
Spring Boot多任务并发处理
Spring Boot多任务并发处理 创建公共线程池 @ConfigurationProperties(prefix = "common-thread-pool") @Data @Slf4j @Configuration @EnableAsync public class CommonThreadPoolConfig imple…
638
|
|
|
2022-1-03 19:40
|
2022-1-03 19:40
219 字
|
6 分钟
01配置相关
1.介绍 这是一位大佬的写的,内容质量很高,而且也没有太深奥,不会导致我这种小白看不懂。没有采用收藏夹等方式来收藏这些文章,而是用博客来记录,目的是为了集中管理,方便个人每周的复盘学习和平时使用到了相关知识好方便找到这些文章来扩展复习,毕竟所学的知识不使用的话,会渐渐忘掉的。总的来说,之前的文章都是对SpringBoot的简单使用,接下来的文章算是…
681
|
|
|
2020-3-20 14:20
|
2020-3-20 16:27
578 字
|
3 分钟
二.SpringBoot整合Quartz框架
1. pom <!--springboot整合quartz需要用到--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>…
659
|
|
|
2020-2-05 17:49
|
2020-2-05 17:49
232 字
|
8 分钟
一.使用Scheduled 定时任务器
1. pom <!--添加Scheduled坐标--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version…
633
|
|
|
2020-2-05 14:58
|
2020-2-05 14:59
1106 字
|
7 分钟
二.使用Redis
1. pom <!--redis启动器坐标--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> &…
621
|
|
|
2020-2-03 17:43
|
2020-2-03 17:47
92 字
|
4 分钟
一.使用Ehcache
1. pom <dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache</artifactId> <version>2.8.9</version> </dependency> 2…
576
|
|
|
2020-2-01 16:47
|
2020-2-01 17:14
201 字
|
7 分钟
SpringBoot快速部署
1. 热部署 <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <d…
645
|
|
|
2020-1-20 15:13
|
2020-1-20 22:15
208 字
|
2 分钟
SpringBoot 整合 Junit 单元测试
1. pom.xml Eclipse创建时需要手动加依赖坐标 <!- 添加 junit 环境的 jar 包 -> <depndency> <groupId>org.springframework.bot</groupId> <artifactId>spring-bot-starter-te…
666
|
|
|
2020-1-16 15:54
|
2020-1-16 15:54
127 字
|
3 分钟