springboot输出json格式日志

1、在pom文件中添加依赖<dependency><groupId>net.logstash.logback</groupId><artifactId>logstash-logback-encoder</artifactId><version>6.2</version><&#x2...

ELK:filebeat采集springboot日志

本篇介绍如何通过filebeat来采集springboot日志1、设置springboot日志输出路径logging:file:path:D:/logs2、设置filebeat配置参数编辑filebeat.yml文件的filebeat.inputs参数filebeat.inputs:-type:logenabled:truepaths:-D:\logs\*json.keys_under_...
1/2024/how-to-use-Cacheable-in-springboot/">2024-11-01
Java
本文介绍如何在Springboot中通过@Cacheable注解实现数据缓存。在每次调用添加了@Cacheable注解的方法(需要缓存功能的方法)时,Spring会检查指定参数的指定目标方法是否已经被调用过,如果有就直接从缓存中获取方法调用后的结果,如果没有就调用方法并缓存结果后返回给用户。下次调用直接从缓存中获取。1、添加@EnableCaching​使用@EnableCaching标识在Spr...
Java, Spring, SpringBoot

springcloud学习笔记:分布式事务Seata的下载和启动

Seata是一款开源的分布式事务解决方案,致力于提供高性能和简单易用的分布式事务服务。Seata将为用户提供了AT、TCC、SAGA和XA事务模式,为用户打造一站式的分布式解决方案。1、Seata的下载​访问Seate官网https://seata.io/,进行下载页面。本次下载最新的版本1.5.2。2、Seata的启动​Server支持多种方式部署:直接部署,使用Docker,使用Docker-...