#### 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
```
* feat: split post content to new table and support content version control
* feat: Improve post version management
* feat: Add post content and version record deletion
* feat: Add isInProcess attribute for post list and detail api
* feat: Add migrate sql script
* fix: Add a sql of allow origin_content to null in posts table
* feat: Assign a value to the source of the post content version record
* Bump versions of dependencies
* Bump spring boot to 2.5.8
Signed-off-by: John Niang <johnniang@fastmail.com>
* Revert dependency of bce sdk
Signed-off-by: John Niang <johnniang@fastmail.com>
* feat: Add date parse methods and test
* feat: Add utility methods of get the specified part of the given date
* refactor: Replace the use of dateutil in hutool
* refactor: Replace the StrUtil of hutool with StringUtils of commons-lang3
* refactor: Replace the use of Tuple in hutool
* refactor: Replace the use of ServltUtil in hutool
* refactor: Replace the use of PageUtil in hutool
* refactor: Replace the use of CollectionUtil in hutool
* refactor: Add QRcode generate method
* refactor: replace all hutool utility and add some utils
* fix: check style of tests
* refactor: add logging
* fix: logging
* fix: set default timezone
* fix: code style
* refactor: rename variable tfaKey to mfaKey
* refactor: Use commons-lang3's RandomStringUtils to replace some methods
* refactor: update javadoc
* refactor: update test
* refactor: reformat code
* feat: Add more test case
* feat: Add source