随笔分类 -  Spring

摘要:引入依赖 <dependency> <groupId>jakarta.mail</groupId> <artifactId>jakarta.mail-api</artifactId> </dependency> <dependency> <groupId>org.springframework</g 阅读全文
posted @ 2024-07-09 09:02 漠孤烟 阅读(10) 评论(0) 推荐(0) 编辑
摘要:对比表: 应用 启动时间(秒) 内存消耗(M) 启动模式 app1(spring boot) + JVM 3.4 183.3 JVM app1(spring boot) + Native 0.44 57.7 native-image 阅读全文
posted @ 2024-06-03 15:21 漠孤烟 阅读(55) 评论(0) 推荐(0) 编辑
摘要:实现RuntimeHintsRegistrar接口,再用hints添加要注册的类型。 eg: @Configuration @ImportRuntimeHints(MyRuntimeHintsRegistrar.class) public class MyRuntimeHintsRegistrar 阅读全文
posted @ 2024-05-31 16:39 漠孤烟 阅读(88) 评论(0) 推荐(0) 编辑
摘要:简介 spring cloud loadbalancer是spring自家推出的负载均衡器,可以平替ribbon。 spring cloud loadbalancer + RestClient RestClient是spring framework 6.1(对应spring boot 3.2)里内置 阅读全文
posted @ 2024-04-25 09:58 漠孤烟 阅读(231) 评论(0) 推荐(0) 编辑
摘要:CRaC(Coordinated Restore at Checkpoint)。 CRaC 是 OpenJDK 项目,能够把运行中的 JVM,将其状态(包括您的应用程序)存储到磁盘中。然后,在另一个时间点,您可以从保存的检查点将 JVM 恢复到内存中。通过这种方式,可以启动一个应用程序,预热它,并创 阅读全文
posted @ 2023-12-02 14:54 漠孤烟 阅读(675) 评论(0) 推荐(0) 编辑
摘要:Spring 3.2原生支持虚拟线程,spring boot 2.x + JDK21再通过手工配置,也能使用上tomcat,如下: 来源: https://spring.io/blog/2022/10/11/embracing-virtual-threads config里定义两个类: @Confi 阅读全文
posted @ 2023-11-06 22:36 漠孤烟 阅读(431) 评论(0) 推荐(0) 编辑
摘要:使用GraalVM对spring boot工程进行native编译: 系统:Centos JDK:GraalVM JDK 21 报错: If you are unable to resolve this problem, please file an issue with the error rep 阅读全文
posted @ 2023-10-18 19:53 漠孤烟 阅读(2093) 评论(0) 推荐(0) 编辑
摘要:Spring Boot 2.3将包括对Kubernetes liveness&readiness Probe的本地支持,扩展了2.2的“运行状况组”支持,允许开发人员选择运行状况指标的子集,并将其分组为单个相关的运行状况。 Kubernetes的活性Liveness和就绪性probes探针 在Kub 阅读全文
posted @ 2020-04-05 22:17 漠孤烟 阅读(1672) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示