#### What type of PR is this?
/kind cleanup
/area core
/milestone 2.16.x
#### What this PR does / why we need it:
This PR upgrades dependency Spring Boot to [3.3.0](https://github.com/spring-projects/spring-boot/releases/tag/v3.3.0).
#### Does this PR introduce a user-facing change?
```release-note
升级 Spring Boot 至 3.3.0
```
#### 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 cleanup
/area core
#### What this PR does / why we need it:
This PR mainly upgrades Spring Boot to [3.2.4](https://github.com/spring-projects/spring-boot/releases/tag/v3.2.4), and also upgrades other Gradle plugins.
#### Does this PR introduce a user-facing change?
```release-note
升级依赖 Spring Boot 至 3.2.4
```
#### 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 cleanup
/area core
#### What this PR does / why we need it:
This PR totally refactor project structure for a better plugin development. Now we can maintain and publish api and platform modules at Halo application side, which will be references by plugins.
Currently, we can execute command `./gradlew clean publish` to publish api and platform modules into **local** Maven repository, so that we can refer these dependencies (`run.halo.tools.platform:plugin:2.4.0-SNAPSHOT` and `run.halo.app:api:2.4.0-SNAPSHOT`) in plugin projects.
I will make another pull request to publish api library and platforms into Maven central repository.
**Modules explanation**:
- API module contains common classes which might be used by plugins.
- Plugin Platform module contains dependency declarations of other plugin API modules.
- Application Platform module contains dependency declarations application module might uses.
If we want to build application only(exclude check and jar), we have to execute the command below:
```bash
./gradlew clean :application:build -x :application:check -x :application:jar
```
The executable Jar will be generated at folder `application/build/libs/`.
If we want to build a Docker image, we could execute the command below:
```bash
docker build -t johnniang/halo:project-structure .
# Test the Docker image
docker run -it --rm -p8090:8090 johnniang/halo:project-structure
```
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2730
#### Special notes for your reviewer:
#### 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:
Upgrade to Gradle 8.0.2 by using command `./gradlew wrapper --gradle-version 8.0.2 --distribution-type bin`.
Recently, we have a plan to restructure our project via Gradle 8, so I upgrade to Gradle 8.0.2 now.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind cleanup
/area core
#### What this PR does / why we need it:
Upgrade to Spring Boot 3.0.3. See https://github.com/spring-projects/spring-boot/releases/tag/v3.0.3 for more.
#### Does this PR introduce a user-facing change?
```release-note
Upgrade to Spring Boot 3.0.3.
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.2.x
#### What this PR does / why we need it:
See https://lucene.apache.org/core/9_5_0/MIGRATE.html for more.
#### Special notes for your reviewer:
Please confirm that the search widget is working fine.
#### Does this PR introduce a user-facing change?
```release-note
升级依赖 Lucene 至 9.5.0
```
#### What type of PR is this?
/kind imporvement
/area core
/milestone 2.2.x
#### What this PR does / why we need it:
See 2d3cf24fed/CHANGELOG.md (390---2023-01-30) for more.
#### Special notes for your reviewer:
Please confirm that the plugin module is working fine.
#### Does this PR introduce a user-facing change?
```release-note
升级依赖 PF4J 至 3.9.0
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.2.x
#### What this PR does / why we need it:
See https://github.com/jasync-sql/jasync-sql/releases/tag/2.1.23 for more.
#### Does this PR introduce a user-facing change?
```release-note
升级依赖 jasync-sql 至 2.1.13
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.2.x
#### What this PR does / why we need it:
Provide `globalconfig` actuator endpoint to let console and theme know how to do according various system configuration. The endpoint allows anonymous users to access, but other actuator endpoints can be accessed by admin users.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3055
#### Special notes for your reviewer:
Try to request <http://localhost:8090/actuator/globalinfo> and see the result.
```json
{
"externalUrl":"http://localhost:8090",
"timeZone":"Asia/Shanghai",
"locale":"en_US",
"allowComments":true,
"allowRegistration":false
}
```
You can request <http://localhost:8090/actuator/info> to see more detail as well.
```json
{
"git": {
"branch": "feat/system-info",
"commit": {
"id": "ca4e93d",
"time": "2023-01-19T08:56:15Z"
}
},
"build": {
"artifact": "halo",
"name": "halo",
"time": "2023-01-29T15:04:42.151Z",
"version": "2.2.0-SNAPSHOT",
"group": "run.halo.app"
},
"java": {
"version": "17.0.6",
"vendor": {
"name": "Amazon.com Inc.",
"version": "Corretto-17.0.6.10.1"
},
"runtime": {
"name": "OpenJDK Runtime Environment",
"version": "17.0.6+10-LTS"
},
"jvm": {
"name": "OpenJDK 64-Bit Server VM",
"vendor": "Amazon.com Inc.",
"version": "17.0.6+10-LTS"
}
},
"os": {
"name": "Windows 11",
"version": "10.0",
"arch": "amd64"
}
}
```
#### Does this PR introduce a user-facing change?
```release-note
提供系统配置详情端口
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.2.x
#### What this PR does / why we need it:
Upgrade Spring Boot to 3.0.2.
See https://github.com/spring-projects/spring-boot/releases/tag/v3.0.2 for more.
#### Does this PR introduce a user-facing change?
```release-note
升级依赖 Spring Boot 至 3.0.2
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
引入对R2DBC的MariaDB的支持,增加例子配置
#### Special notes for your reviewer:
现在,Halo可以使用MariaDB数据库原生驱动了,摆脱MySQL驱动带来的连接问题。
- [x] 支持首次启动执行SQL脚本创建表
#### Does this PR introduce a user-facing change?
<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
支持 MariaDB 数据库连接
```
#### What type of PR is this?
/kind improvement
/area core
#### What this PR does / why we need it:
Upgrade to spring boot 3.0.1
#### Which issue(s) this PR fixes:
Fixes#3030
#### Special notes for your reviewer:
#### 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:
see also https://github.com/pf4j/pf4j/compare/release-3.7.0...release-3.8.0
#### Which issue(s) this PR fixes:
Fixes#2771
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
升级依赖 PF4J 至 3.8.0
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0.0-rc.2
#### What this PR does / why we need it:
See https://github.com/halo-dev/halo/issues/2767 for more.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2767
#### Does this PR introduce a user-facing change?
```release-note
升级依赖 SpringDoc OpenAPI 至 2.0.0
```
#### What type of PR is this?
/kind feature
/milestone 2.0.0-rc.1
/area core
#### What this PR does / why we need it:
主题端支持使用表达式方言获取登录状态和判断权限,例如:
获取当前登录用户名
```html
<div th:text="${#authentication.name}">
The value of the "name" property of the authentication object should appear here.
</div>
```
关于判断登录状态我们并不推荐调用表达式 `${#authentication.isAuthenticated()}`,因为始终返回 `true`,使用以下几种属性表达式代替:
```html
<div sec:authorize="isAuthenticated()">
如果不是匿名用户你会看到我
</div>
<div sec:authorize="isFullyAuthenticated()">
如果不是匿名用户且不是 rememberMe 你会看到我
</div>
```
其他
```html
<div sec:authorize="isAnonymous()">
如果是匿名用户你会看到我
</div>
```
```html
<div sec:authorize="isRememberMe()">
如果是 rememberMe 你会看到我
</div>
```
更多请参考:
https://github.com/thymeleaf/thymeleaf-extras-springsecurity
Console 端判断是否登录需要改一下,目前所有未登录状态都属于一个叫 anonymousUser 的用户
#### Which issue(s) this PR fixes:
Fixes#2676
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
主题端支持使用表达式方言获取登录状态和判断权限
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0.0
#### What this PR does / why we need it:
springdoc-openapi 2.0.0-RC2 fully supports Spring Boot 3.0.0-RC2 currently, please see https://github.com/springdoc/springdoc-openapi/releases/tag/v2.0.0-RC2 for more.
#### Does this PR introduce a user-facing change?
```release-note
升级依赖 SpringDoc OpenAPI 至 2.0.0-RC2
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.0
#### What this PR does / why we need it:
This PR mainly implement full-text search of posts and provide extension point for other search engine.
Meanwhile, I implement ExtensionGetter to get implemention(s) of extension point from system ConfigMap.
But there still are something to do here:
- [x] Udpate documents when posts are published or posts are becoming unpublic.
- [x] Delete documents when posts are unpublished or deleted.
Because I'm waiting for https://github.com/halo-dev/halo/pull/2659 got merged.
I create two endpoints:
1. For full-text search of post
```bash
curl -X 'GET' \
'http://localhost:8090/apis/api.halo.run/v1alpha1/indices/post?keyword=halo&limit=10000&highlightPreTag=%3CB%3E&highlightPostTag=%3C%2FB%3E' \
-H 'accept: */*'
```
1. For refreshing indices
```bash
curl -X 'POST' \
'http://localhost:8090/apis/api.console.halo.run/v1alpha1/indices/post' \
-H 'accept: */*' \
-d ''
```
#### Which issue(s) this PR fixes:
Fixes #https://github.com/halo-dev/halo/issues/2637
#### 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
/milestone 2.0
#### What this PR does / why we need it:
Bump Spring Boot to 3.0.0-RC2.
See https://github.com/spring-projects/spring-boot/releases/tag/v3.0.0-RC2 for more.
#### Does this PR introduce a user-facing change?
```release-note
升级 Spring Boot 至 3.0.0-RC2
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
Please refer to <https://github.com/jasync-sql/jasync-sql/releases/tag/2.1.7>.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.0
#### What this PR does / why we need it:
Add MySQL script to support running Halo with MySQL database due to https://github.com/jasync-sql/jasync-sql/issues/311 has been resolved.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2464
#### Special notes for reviewers
Steps to test:
1. Start up MySQL. e.g.:
```yaml
version: '3.1'
services:
db:
image: mysql
# NOTE: use of "mysql_native_password" is not recommended: https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password
# (this is just an example, not intended to be a production configuration)
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: openmysql
ports:
- 3306:3306
adminer:
image: adminer
restart: always
ports:
- 8080:8080
```
```bash
docker-compose -f mysql.yaml up
```
2. Start Halo with `mysql` profile. e.g.:
```bash
./gradlew bootRun --args="--spring.profiles.active=mysql"
```
3. Validate the functionality of Halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
将 spring boot 的版本从 3.0.0-M5 降级到 3.0.0-M5 以解决 swragger 无法使用的问题
#### Which issue(s) this PR fixes:
Fixes #
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
将原来系统默认的系统配置 system 改名为 system-default, 并使用名为 system 的 ConfigMap 来存储用户自定义的系统配置。系统最终配置为用户自定义系统配置 Merge Patch 系统默认配置的结果。
see also #2304
#### Which issue(s) this PR fixes:
Fixes#2304
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/milestone 2.0
/area core
#### What this PR does / why we need it:
提供当前使用主题(预览或激活)的 configMap 变量和部分系统设置等变量。
提供了以下变量:
- `${theme}` 当前主题的信息,theme.yaml
- `${theme.config}` 获取当前主题的设置项
- ~`${siteSetting}`~ `${site}` 提供必要系统变量
#### Which issue(s) this PR fixes:
Fixes#2389
#### Special notes for your reviewer:
how to test it?
再任意主题模板上使用表达式获取例如:`${theme}`,`${theme.config.sns?.email}`
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
<!-- Thanks for sending a pull request! Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->
#### What type of PR is this?
/kind feature
/milestone 2.0
/area core
<!--
添加其中一个类别:
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind improvement
适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->
#### What this PR does / why we need it:
新增文章模块的基本实现
提供创建文章,更新草稿和发布文章三个 API
#### Which issue(s) this PR fixes:
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
A part of #2322
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
None
```
#### What type of PR is this?
/kind feature
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
1. Replace JDBC to R2DBC
2. Make our system fully reactive
#### Which issue(s) this PR fixes
Fixes#2308
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.0
#### What this PR does / why we need it:
This PR introduces [openapi4j](https://github.com/openapi4j/openapi4j) to replace JSON schema. See #2294 for more.
#### Which issue(s) this PR fixes:
Fix#2294
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/kind api-change
/area core
/milestone 2.0
#### What this PR does / why we need it:
Add label and field selector to Extension list API for filtering Extensions.
<img width="322" alt="image" src="https://user-images.githubusercontent.com/16865714/181462887-549162fd-5e8d-4cec-834c-24875ada4789.png">
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind flake
/area core
/milestone 2.0
#### What this PR does / why we need it:
Upgrade Spring Boot to 3.0.0-M4. Please see <https://github.com/spring-projects/spring-boot/releases/tag/v3.0.0-M4>.
#### Does this PR introduce a user-facing change?
```release-note
None
```