Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
Open Source
>
Web Development
>
Web Framework
&&
Watch
Unwatch
Watching
Releases Only
Ignoring
424
Star
4.3K
Fork
777
GVP
opensolon
/
solon
Code
Issues
78
Pull Requests
2
Insights
Pipelines
Service
JavaDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
374
feat(hotreload): 添加应用热重载支持功能
Open
曾玉飞:main
opensolon:main
曾玉飞
create on 2026-03-30 16:54
Clone/Download
HTTPS
SSH
Copy
Email Patch
Diff file
1. feat(hotreload): 添加应用热重载支持功能 --- ### 这个PR有什么用 / 我们为什么需要它? 在开发过程中,每次代码修改都需要手动重启应用,严重影响开发效率。热重载功能可以监视 class 文件变化,自动重启应用,提供接近"秒级"的代码反馈循环,显著提升开发者体验。 ### 总结您的更改 实现了完整的应用热重载机制,核心包括: 1. HotReloadLauncher - 热重载控制器 - 管理当前 SolonApp 实例的原子引用 - 协调重启流程(优雅停机 → 新建实例 → 原子切换) - 支持 PID 获取和关闭钩子注册 2. 这里是列表文本HotReloadManager - 文件监视器 - 使用 Java NIO WatchService 递归监视目录 - 配置 solon.hotreload.watch-dirs(默认 target/classes) - 支持去抖(debounce,默认 500ms)和冷却(cooldown 1000ms) - 自动重建 WatchService(处理 mvn clean 等场景) 3. AppClassLoader 增强 - 支持子类优先加载策略 - 实现 Closeable 以便释放资源 - 每次重启创建新的类加载器,旧实例关闭后 GC 4. 无缝重启流程 - 等待进行中请求完成(最多 30 秒) - 原子引用切换确保请求不丢失 - 短暂睡眠释放 OS 端口锁 #### 请注明您已完成以下工作: - [X] 确保测试通过,并在需要时添加测试覆盖率。 - [X] 确保提交消息遵循 [常规提交规范](https://www.conventionalcommits.org/) 的规则。 - [ ] 考虑文档的影响,如果需要,打开一个新的文档问题或文档更改的PR。
此 Pull Request 需要贡献者签署贡献者协议。
This pull request needs to pass some approval items
Type
Assign personnel
Status
Reviewer
西东
In progress
(0/1 )
This pull request cannot be merged. It needs to be reviewed
How to merge Pull Request
git checkout main
git pull https://gitee.com/zengyufei/solon.git main
git push origin main
Comments
4
Commits
1
Files
4
Checks
Code problems
0
Bulk operation
Expand
Collapse
Reviewer
Code Owner
Reviewer
zqxvip
mistio
wistn
wistn
前世男友
lanbaba666
古法BUG编造非遗传承人
qoder
纸伞下的烟雨
ZhiSanA
馒头虫
mantouchong
yukai
D3System
黑小马
heixiaomas_admin
llm163520
llm163520
读钓
songyinyin
Sorghum
ezdemo
孔皮皮
kongweiguang
hans
wu-zhihao
fzdwx
ekoclike
tanghc
durcframework
Chris
oppsgo
傲世孤尘
asgc
蛮不换
u2young
小xu中年
xls-web
小奶奶花生米
little-grandma-peanut
林天穹
ingrun
西东
noear_admin
No Setting
Min number
1
Tester
zqxvip
mistio
wistn
wistn
前世男友
lanbaba666
古法BUG编造非遗传承人
qoder
纸伞下的烟雨
ZhiSanA
馒头虫
mantouchong
yukai
D3System
黑小马
heixiaomas_admin
llm163520
llm163520
读钓
songyinyin
Sorghum
ezdemo
孔皮皮
kongweiguang
hans
wu-zhihao
fzdwx
ekoclike
tanghc
durcframework
Chris
oppsgo
傲世孤尘
asgc
蛮不换
u2young
小xu中年
xls-web
小奶奶花生米
little-grandma-peanut
林天穹
ingrun
西东
noear_admin
No Setting
Min number
0
Priority
Not specified
Serious
Main
Secondary
Unimportant
Label
Label settings
No Setting
Link Issue
No link issue
Successfully merged pull requests will close issues
Milestone
No related milestones
Automatic processing
Delete branch after merge
The commit branch is a defualt branch and cannot be deleted
Close related Issues after merge
Use flattening for the Pull Request merger
After checking this option, it is recommended to use the Squash Merge method to consolidate to simplify the submission history
Participators
(2)
Java
1
https://gitee.com/opensolon/solon.git
git@gitee.com:opensolon/solon.git
opensolon
solon
solon
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register