上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页
摘要: 引入依赖 <dependency> <groupId>jakarta.mail</groupId> <artifactId>jakarta.mail-api</artifactId> </dependency> <dependency> <groupId>org.springframework</g 阅读全文
posted @ 2024-07-09 09:02 漠孤烟 阅读(28) 评论(0) 推荐(0)
摘要: <repositories> <repository> <id>spring-milestones</id> <name>Spring Milestones</name> <url>https://repo.spring.io/milestone</url> <snapshots> <enabled 阅读全文
posted @ 2024-07-06 09:01 漠孤烟 阅读(19) 评论(0) 推荐(0)
摘要: 定义 public class MyClass<T> { private Class<T> clazz; public MyClass() { Type type = this.getClass().getGenericSuperclass(); if (type instanceof Parame 阅读全文
posted @ 2024-07-04 14:38 漠孤烟 阅读(33) 评论(0) 推荐(0)
摘要: 默认情况下,打出来的jar包都是给其他项目依赖的。如果本身该jar要独立运行,则需要打包成executable jar jar --create --file App.jar --main-class com.example.App -C build . App.jar: jar包名 com.exa 阅读全文
posted @ 2024-07-04 09:09 漠孤烟 阅读(46) 评论(0) 推荐(0)
摘要: 引言 java里,json框架何其多,常见的有jackson、fastjson、gson等。各自的api互不相通,与代码耦合度高,切换json库的代码修改工作量非常大。如果使用json的api为统一的入口,各家再进行实现,代码与实现类不耦合,像slf4j一样,切换log框架(log4j/logbac 阅读全文
posted @ 2024-07-02 11:19 漠孤烟 阅读(731) 评论(0) 推荐(0)
摘要: 1、包装axios const restWithHeader = axios.create({ baseURL: import.meta.env.APP_BASE_API_URL, timeout: 60000, headers: { 'header1': 'This is a header val 阅读全文
posted @ 2024-06-19 08:51 漠孤烟 阅读(256) 评论(0) 推荐(0)
摘要: #查看想开的端口是否已开: firewall-cmd --query-port=3306/tcp #添加指定需要开放的端口: firewall-cmd --add-port=3306/tcp --permanent #重载入添加的端口: firewall-cmd --reload #查询3306端口 阅读全文
posted @ 2024-06-17 10:57 漠孤烟 阅读(34) 评论(0) 推荐(0)
摘要: 需求 访问某个url后缀时,例如:/abc/*,自动路由到指定http服务地址http://myhost/* 代码 httpServer.createContext("/abc", BeanFactory.proxyHandler("yourhost:8080")); 反向代理处理器 public 阅读全文
posted @ 2024-06-14 14:43 漠孤烟 阅读(425) 评论(0) 推荐(0)
摘要: 引入依赖 <dependency> <groupId>com.googlecode.juniversalchardet</groupId> <artifactId>juniversalchardet</artifactId> <version>1.0.3</version> </dependency 阅读全文
posted @ 2024-06-12 15:30 漠孤烟 阅读(35) 评论(0) 推荐(0)
摘要: CRaC Coordinated Restore at Checkpoint,翻译为中文:从检查点原样恢复重启。 大致的原理是将JVM的当前运行状态进行持久化存储起来,相当于存储某一刻运行时的快照,给那一刻的JVM运行状态进行拍照即为检查点。再启动服务时直接通过该快照文件恢复至运行状态。通过检查点恢 阅读全文
posted @ 2024-06-06 11:16 漠孤烟 阅读(407) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页