#### What type of PR is this?
/milestone 2.17.x
#### What this PR does / why we need it:
将 BasePlugin 的 PluginWrapper 构造函数标记为过时并输出警告日志提示
#### Does this PR introduce a user-facing change?
```release-note
在 BasePlugin 的 PluginWrapper 构造函数输出过时警告日志以提醒开发者尽快适配
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.17.x
#### What this PR does / why we need it:
提供对模板中 halo footer 标签内容的扩展点以支持扩展页脚内容
#### Which issue(s) this PR fixes:
Fixes#6189
#### Does this PR introduce a user-facing change?
```release-note
提供对模板中 halo footer 标签内容的扩展点以支持扩展页脚内容
```
#### What type of PR is this?
/kind feature
/kind api-change
/area core
/area plugin
/milestone 2.17.0
#### What this PR does / why we need it:
This PR creates a SearchService and makes it invokable for plugins.
#### Special notes for your reviewer:
1. Create a plugin
2. Publish all publication into Maven local repository by executing `./gradlew publishAllPublicationsToMavenLocalRepository`
3. Use `2.17.0-SNAPSHOT` as dependency version and refresh dependencies
4. Try to use the SearchService to search something.
#### Does this PR introduce a user-facing change?
```release-note
为插件提供全文搜索服务
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.17.x
#### What this PR does / why we need it:
This PR add support for allowing plugin to listen the event that the plugin has started. Below is an example of listening the event in plugin:
```java
@EventListener
void onPluginStartedEvent(PluginStartedEvent event) {
// do something.
}
```
See https://github.com/halo-dev/halo/issues/5339#issuecomment-2199220068 for more.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/5339#issuecomment-2199220068
#### Special notes for your reviewer:
1. Create a plugin, add the listener above and write some logs
2. Build and install the plugin
3. Start plugin and see the logs you wrote
#### Does this PR introduce a user-facing change?
```release-note
支持在插件中监听已启动事件
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.17.x
#### What this PR does / why we need it:
新增 LoginHandlerEnhancer 用于 Halo 扩展登录成功或失败后的处理逻辑如 RememberMe 和设备管理等
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area core
/kind bug
/milestone 2.17.x
#### What this PR does / why we need it:
修复 Device 模型中,Kind 定义错误的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/6221
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/area core
/kind api-change
/milestone 2.17.x
#### What this PR does / why we need it:
移除内置的页面静态缓存功能,后续将由 https://github.com/halo-sigs/plugin-page-cache 插件提供。
#### Which issue(s) this PR fixes:
Fixes#5639
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
移除内置的页面静态缓存功能,后续由 https://github.com/halo-sigs/plugin-page-cache 插件提供。
```
#### What type of PR is this?
/kind feature
/area plugin
/area core
/milestone 2.17.x
#### What this PR does / why we need it:
增强插件配置的缓存管理
1. 通过 SettingFetcher/ReactiveSettingFetcher 获取插件配置可以不在考虑获取数据的性能问题,当数据变更后会自动更新缓存
2. 现在你可以通过在插件中监听 `PluginConfigUpdatedEvent` 事件来做一些处理,它会在用户更改插件配置后被触发
#### Does this PR introduce a user-facing change?
```release-note
增强插件配置的缓存管理并支持通过监听 `PluginConfigUpdatedEvent` 事件做一些特殊处理
```
#### What type of PR is this?
/kind improvement
/kind api-change
/area core
#### What this PR does / why we need it:
This PR refactors ExtensionGetter implementation to add a support of enabling extension point(s). Here is an example of data field of `system` config map:
```json
{
"data": {
"extensionPointEnabled": "{ \"search-engine\": [\"search-engine-algolia\"]}"
},
```
> 1. The `search-engine` is a name of extension point definition.
> 2. The `search-engine-algolia` is a name of extension definition.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.17.x
#### What this PR does / why we need it:
此次变更为文章分类引入了一个新的 `preventParentPostCascadeQuery` 布尔属性,用于控制分类及其子分类下的文章显示方式。具体变更包括:
- 在分类结构中增加了 `preventParentPostCascadeQuery` 属性。
- 当分类的 `preventParentPostCascadeQuery` 属性设置为 `true` 时,该分类的文章数量不会汇总到父分类中。
- 更新了树结构遍历逻辑,以支持对 `preventParentPostCascadeQuery` 属性的处理。
- 确保独立分类中的文章显示受控,不向上级分类进行聚合。
- 增加了相应的测试用例,以验证在不同树结构中 `preventParentPostCascadeQuery` 属性的功能性。
#### Which issue(s) this PR fixes:
Fixes#5663Fixes#4923
Fixes https://github.com/halo-dev/halo/issues/3418
#### Does this PR introduce a user-facing change?
```release-note
新增独立分类选项用于控制关联的子分类下的文章显示以提供更灵活的内容管理方式
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.17.x
#### What this PR does / why we need it:
This PR adds patch method for all extensions API.
Patch example:
```bash
http -a admin:admin PATCH http://localhost:8090/apis/plugin.halo.run/v1alpha1/plugins/app-store-integration \
Content-Type:application/json-patch+json \
--raw='[{"op": "replace", "path": "/spec/enabled", "value": false}]'
```
#### Which issue(s) this PR fixes:
Fixes#2311
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.17.x
#### What this PR does / why we need it:
支持在分类上为关联的文章统一设置渲染模板
现在文章的模板生效顺序为:
1. 文章关联的分类上设置的文章模板,如果有多个则选择第一个
2. 文章上设置的自定义模板
3. 文章的默认模板
#### Which issue(s) this PR fixes:
Fixes#6101
#### Does this PR introduce a user-facing change?
```release-note
支持在分类上为关联的文章统一设置渲染模板
```
#### What type of PR is this?
/kind improvement
/area core
/area plugin
#### What this PR does / why we need it:
This PR wholly refactors plugin reconciliation to implement dependency mechanism.
Currently,
- If we disable plugin which has dependents, the plugin must wait for dependents to be disabled.
- If we enable plugin which has dependencies , the plugin must wait for dependencies to be enabled.
- If we upgrade plugin which has dependents, the plugin must request dependents to be unloaded. After the plugin is unloaded, the plugin must cancel unload request for dependents.
#### Which issue(s) this PR fixes:
Fixes#5872
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
优化被依赖的插件的升级,启用和禁用
```
#### What type of PR is this?
/kind improvement
/area core
/area plugin
/milestone 2.16.x
#### What this PR does / why we need it:
为插件提供文章内容获取的 bean 以简化文章内容获取
#### Which issue(s) this PR fixes:
Fixes #
#### Does this PR introduce a user-facing change?
```release-note
为插件提供文章内容获取的 Bean
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.16.x
#### What this PR does / why we need it:
新增文章定时发布功能
#### Which issue(s) this PR fixes:
Fixes#4602
#### Does this PR introduce a user-facing change?
```release-note
新增文章定时发布功能
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.16.x
#### What this PR does / why we need it:
为自定义模型 List API 添加默认排序
#### Which issue(s) this PR fixes:
Fixes#5647
#### Does this PR introduce a user-facing change?
```release-note
为自定义模型 List API 添加默认排序
```
#### What type of PR is this?
/kind feature
/area core
/area ui
/milestone 2.16.x
#### What this PR does / why we need it:
优化认证方式的排序并支持拖动
#### Which issue(s) this PR fixes:
Fixes#5813
#### Does this PR introduce a user-facing change?
```release-note
优化认证方式的排序并支持拖动
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.16.x
#### What this PR does / why we need it:
修复对 Unstructured 的 metadata 进行更改不会被应用的问题
#### Does this PR introduce a user-facing change?
```release-note
修复插件定义的权限没有在插件详情页显示的问题
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.15.x
#### What this PR does / why we need it:
通知订阅支持基于表达式订阅
see #5632 for more details
how to test it?
1. 测试系统通知功能的文章、页面有新评论通知和评论有新回复通知的功能是否正常
2. 测试 2.14 创建的文章、评论和回复升级到此版本后是否能继续收到相应通知,如文章有新评论
#### Which issue(s) this PR fixes:
Fixes#5632
#### Does this PR introduce a user-facing change?
```release-note
通知订阅支持基于表达式订阅避免订阅随数据量增长同时自动优化之前的订阅数据
```
#### What type of PR is this?
/area core
/area ui
/kind feature
/kind api-change
#### What this PR does / why we need it:
为主题和插件的定义文件添加 issues 字段,用于填写问题反馈地址。方便使用者可以清楚的知道可以在哪里反馈问题。
<img width="767" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/b7dfce3f-8362-4964-82b8-cc018b85bb82">
#### Which issue(s) this PR fixes:
Fixes#5715
#### Does this PR introduce a user-facing change?
```release-note
为主题和插件的定义文件添加问题反馈(issues)字段
```
#### What type of PR is this?
/kind feature
/area core
/area plugin
#### What this PR does / why we need it:
This PR allows plugin developers defining WebSocket endpoints in plugins.
#### Which issue(s) this PR fixes:
Fixes#5285
#### Does this PR introduce a user-facing change?
```release-note
支持在插件中实现 WebSocket
```
* feat: invalidate all sessions of a user after password changed
* fix: unit test case
* refactor: use spring session 3.3 to adapt
* refactor: compatible with session timeout configuration
* refactor: indexed session repository
* Reload page after changed the password
Signed-off-by: Ryan Wang <i@ryanc.cc>
* chore: update session repository
---------
Signed-off-by: Ryan Wang <i@ryanc.cc>
Co-authored-by: Ryan Wang <i@ryanc.cc>
#### What type of PR is this?
/kind cleanup
/area core
#### What this PR does / why we need it:
This PR adds support for generating API docs into project and generate API client according the API docs.
To generate/update latest API docs, execute the following command:
```bash
./gradlew clean generateOpenApiDocs
```
To generate/update latest API client, execute the following command:
```bash
make -C ui api-client-gen
```
Meanwhile, I also remove the lint on API client due to unnecessary.
Supersedes of https://github.com/halo-dev/halo/pull/5637
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
#### What this PR does / why we need it:
文章支持根据访问量和评论量排序
#### Which issue(s) this PR fixes:
Fixes#3216
#### Does this PR introduce a user-facing change?
```release-note
文章支持根据访问量和评论量排序
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.15.x
#### What this PR does / why we need it:
优化分类关联文章数量的查询避免因查询数据量过大而导致的阻塞或内存溢出
#### Does this PR introduce a user-facing change?
```release-note
优化分类关联文章数量的查询避免因查询数据量过大而导致的阻塞或内存溢出
```
#### What type of PR is this?
/kind cleanup
/area core
#### What this PR does / why we need it:
This PR collects all Gradle plugin versions into root build.gradle for easy management.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind chore
/area core
#### What this PR does / why we need it:
I get the following errors when I develop Halo in JDK 21:
```bash
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':application:bootRun'.
> Could not resolve all dependencies for configuration ':application:runtimeClasspath'.
> Failed to calculate the value of task ':application:compileJava' property 'javaCompiler'.
> No matching toolchains found for requested specification: {languageVersion=17, vendor=any, implementation=vendor-specific} for MAC_OS on aarch64.
> No locally installed toolchains match and toolchain download repositories have not been configured.
```
This PR removes the Java toolchain configuration and adds source and target compatibility to Java 17, allowing developers to develop Halo in Java 17 or higher versions.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
#### What this PR does / why we need it:
优化标签关联的文章数量的更新方式以降低标签太多时对 CPU 的消耗
how to test it?
测试文章关联标签、取消关联、更新关联、删除文章到回收站、彻底删除文章时标签对应的文章可见文章数量和所有文章数量是否正确
#### Does this PR introduce a user-facing change?
```release-note
优化标签关联的文章数量的更新方式以降低标签太多时对 CPU 的消耗
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.14.x
#### What this PR does / why we need it:
使用索引机制优化评论数据查询以提高效率
how to test it?
- 测试 console 评论列表和筛选条件是否正确
- 测试主题端评论显示是否正确
#### Does this PR introduce a user-facing change?
```release-note
使用索引机制优化评论数据查询以提高效率
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.14.x
#### What this PR does / why we need it:
修复了索引查询使用含有 OR 条件嵌套 AND 条件时若匹配数据集间无交集导致的查询结果不正确的问题
如伪查询:`or(query, and(otherQuery1, otherQuery2))`
问题描述:当 `query` 匹配的结果与 `and(otherQuery1, otherQuery2)` 匹配的结果无交集时 and 会将自身不匹配的数据剔除导致 `query` 无法匹配到而出现缺少数据的问题
#### Does this PR introduce a user-facing change?
```release-note
None
```
### What type of PR is this?
/kind improvement
/area core
/milestone 2.13.x
### What this PR does / why we need it:
使用索引机制优化通知和订阅查询以提高性能
how to test it
测试通知列表不报错即可
### Does this PR introduce a user-facing change?
```release-note
使用索引机制优化通知和订阅查询以提高性能
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.13.x
#### What this PR does / why we need it:
构建查询视图时只选择被使用到的索引字段
how to test it?
验证文章和附件列表的查询条件和排序条件不会报错即可
#### Does this PR introduce a user-facing change?
```release-note
优化查询视图构建只选择被使用到的索引字段构建查询视图
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.13.x
#### What this PR does / why we need it:
使用索引机制优化用户查询以提高性能
#### Does this PR introduce a user-facing change?
```release-note
使用索引机制优化用户查询以提高性能
```
#### What type of PR is this?
/kind feature
/area core
/area plugin
/milestone 2.13.x
#### What this PR does / why we need it:
See https://github.com/halo-dev/halo/issues/5379 for more.
This PR provides three extension points:
- FormLoginSecurityWebFilter
- AuthenticationSecurityWebFilter
- AnonymousAuthenticationSecurityWebFilter
which could be extended by plugins easily.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/5379
#### Special notes for your reviewer:
TBD.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/kind improvement
/area core
/area console
/kind api-change
#### What this PR does / why we need it:
增加对用户注册时必须验证邮箱的支持
#### Which issue(s) this PR fixes:
Fixes#5016
#### Special notes for your reviewer:
`regRequireVerifyEmail` 为 `false` 时与现在的注册行为一致
为 `true` 时注册页显示验证码校验相关,注册成功后 `UserSpec.emailVerified` 即为 `true`
没有判断邮件通知是否开启,与现有的邮箱验证一致,如未开启则收不到邮件
#### Does this PR introduce a user-facing change?
```release-note
增加对用户注册时必须验证邮箱的支持
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.13.x
#### What this PR does / why we need it:
使用索引功能优化附件列表查询
#### Does this PR introduce a user-facing change?
```release-note
使用索引功能优化附件列表查询
```
#### What type of PR is this?
/kind feature
/milestone 2.12.x
/area core
#### What this PR does / why we need it:
我们为文章自定义模型的数据调协过程引入了重要的优化。
在以前,当数据量大(例如,50,000篇文章)的情况下,每次系统重启都会触发耗时且资源密集的所有数据的协调过程,即使大部分数据并不需要调协。这导致了不必要的数据库查询和高资源消耗。
为了解决这个问题,我们在文章自定义模型的 status 中添加了一个新的 `Long observedVersion` 属性。
每次协调后,此属性将更新为 `metadata.version`,还调整了 `syncAllOnStart` 条件,只有当 `status.observedVersion < metadata.version` 时才会调协数据。
这个改变确保了只有在启动时需要的数据会被协调,从而减少了资源使用和不必要的协调过程。
因此,Halo 的数据承载能力得到了显著提高。
**how to test it?**
使用此 PR 测试:启动时文章只有首次会执行 reconcile,再次重启时则不会再执行,如果直接修改数据去除掉 `status.observedVersion` 来模拟迁移或漏 reconcile 的过程则启动时该数据会被再次执行 reconcile
#### Which issue(s) this PR fixes:
Fixes#5147
#### Does this PR introduce a user-facing change?
```release-note
优化文章数据的调协过程以降低 Halo 启动时文章的调协耗时同时提高性能和资源利用率
```