SpringBoot 在IDEA中实现热部署 (JRebel实用版)

SpringBoot 在IDEA中实现热部署 (JRebel实用版) JRebel插件安装步骤: 在setting - Plugins 里面搜索 JReble 激活链接: System.out.println("https://jrebel.qekang.com/6f540b75-a1f5-4ccc-ae32-d00e12eda632"); System.out.println("[email protected]"); 准备条件 File–>Serrings–>Compiler–>找到Build project automatically勾选上,代表自动编译 ...

January 30, 2021 · 1 min

springboot三种系统初始化方式解析

springboot三种系统初始化方式解析 1. 第一种 利用 spring.factories 在资源文件目录建立 spring.factories 文件 存入key-value信息 org.springframework.context.ApplicationContextInitializer=com.zhu.ggball.springboot.initializer.FirstInitializer 实现 ApplicationContextInitializer 类 /** * @program: springboot * @description: 第一种初始化方式 * @author: ggBall * @create: 2021-01-13 09:16 **/ @Order(1) public class FirstInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> { @Override public void initialize(ConfigurableApplicationContext applicationContext) { // 1. 获取环境 ConfigurableEnvironment environment = applicationContext.getEnvironment(); // 2. 构建自己的属性 HashMap<String, Object> map = new HashMap<>(); map.put("key1","value1"); MapPropertySource source = new MapPropertySource("firstInitializer", map); // 3. 加入环境属性集中 environment.getPropertySources().addLast(source); System.out.println("firstInitializer start... "); } } 原理: ...

January 30, 2021 · 2 min

springCache配合redis做缓存

springCache配合redis做缓存 redis的优势 我们都知道redis可以作为缓存,是因为它具有 大内存作为缓存 redis的缓存可以被持久化 redis可以实现分布式缓存 Redis可以处理每秒百万级的并发,是专业的绶存服务 redis对缓存有过期时间机制 Redis不仅仅支持简单的k/v类型的数据,同时还提供list,set,zset,hash等数据结构的存储。 什么是springCache 概述 Spring 3.1 引入了激动人心的基于凝视(annotation)的缓存(cache)技术,它本质上不是一个具体的缓存实现方案(比如EHCache 或者 OSCache),而是一个对缓存使用的抽象,通过在既有代码中加入少量它定义的各种 annotation,即能够达到缓存方法的返回对象的效果。 ...

January 30, 2021 · 6 min

利用Excutors异步执行任务

利用Excutors异步执行任务 起因是项目中,有一个接口是查询数据库,for循环查询了10次,特别|消耗时间,当时数据有100万条时,查询时间需要6,7秒 ,所以想异步查询数据库,然后得到自己想要的结果。 ...

January 30, 2021 · 5 min

Harness 工具调用原理 - 配图大纲 Article: content/posts/ai/agent-harness/工具调用/1.harness之tool调用原理.md Type: flowchart | Style: hand-drawn | Density: high (每场景 1 图) | Language: zh ...

1 min
总访问量 总访客数