Commit Graph

50 Commits (main)

Author SHA1 Message Date
John Niang 52a1e98bb7
Upgrade to SpringDoc to 2.8.3 (#7207)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

This PR upgrades to SpringDoc to [2.8.3](https://github.com/springdoc/springdoc-openapi/releases/tag/v2.8.3).

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 SpringDoc 至 2.8.3
```
2025-01-20 09:35:30 +00:00
John Niang 348e7c906f
Fix failing checks of staging repository when releasing to Maven (#7114)
#### What type of PR is this?

/kind bug
/area core

#### What this PR does / why we need it:

When I tried to publish Maven publications into OSSHR <https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/>, I couldn't close and release the opening staging repository because our Maven publications didn't meet the requirements of OSSHR, for example, `Sign Files with GPG/PGP` and `Project Name, Description and URL`.

This PR tries to fix those problem and all checks will pass. You can check it from <https://central.sonatype.com/artifact/run.halo.app/api/overview>.

> https://central.sonatype.org/publish/requirements/

#### Does this PR introduce a user-facing change?

```release-note
None
```
2024-12-05 08:45:15 +00:00
John Niang f8be914038
Upgrade to PF4J 3.13.0 (#7099)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

This PR upgrades to [PF4J 3.13.0](https://github.com/pf4j/pf4j/releases/tag/release-3.13.0).

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 PF4J 至 3.13.0
```
2024-12-02 07:42:59 +00:00
John Niang d985b7a768
Upgrade to SpringDoc 2.7.0 (#7072)
* Upgrade to SpringDoc 2.7.0

Signed-off-by: John Niang <johnniang@foxmail.com>
2024-11-25 10:45:05 +08:00
guqing 3bdec9eacf
fix: vertical images are rotated to horizontal when generating thumbnails (#6842)
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.20.x

#### What this PR does / why we need it:
修复竖向图片生成缩略图后会丢失方向信息展示为横向图片的问题

#### Which issue(s) this PR fixes:
Fixes #6802

#### Does this PR introduce a user-facing change?
```release-note
修复竖向图片生成缩略图后会丢失方向信息展示为横向图片的问题
```
2024-10-12 13:47:10 +00:00
John Niang 38b7898899
Upgrade to jsoup 1.18.1 (#6765)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.20.x

#### What this PR does / why we need it:

This PR upgrades to jsoup 1.18.1. See https://github.com/jhy/jsoup/releases/tag/jsoup-1.18.1 for more.

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 jsoup 至 1.18.1
```
2024-10-04 12:34:42 +00:00
John Niang 6ac8c9b2f7
Upgrade to Lucene 9.12.0 (#6763)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.20.x

#### What this PR does / why we need it:

This PR upgrades to Lucene 9.12.0. See https://lucene.apache.org/core/9_12_0/changes/Changes.html for more.

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Lucene 至 9.12.0
```
2024-10-04 11:58:42 +00:00
John Niang b3fa0b9568
Upgrade to Guava 33.3.1-jre (#6762)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.20.x

#### What this PR does / why we need it:

This PR upgrades to Guava 33.3.1-jre. See https://github.com/google/guava/releases/tag/v33.3.1 for more.

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Guava 至 33.3.1-jre
```
2024-10-04 11:54:43 +00:00
guqing ef37aa794b
feat: implement new mechanisms for generating and managing attachment thumbnails (#6454)
#### What type of PR is this?
/kind feature
/area core
/milestone 2.19.x

#### What this PR does / why we need it:
实现了图片类型的附件缩略图生成和管理的新机制

实现依据 RFC:https://github.com/halo-dev/rfcs/pull/24

使用缩略图前需要配置 externalUrl 才能生成

**How to test it?**
1. 测试本地缩略图的文件是否正确,每个图片对应到相应 size 的目录如 thumbnails/w400 应该是一对一
2. 每个图片生成缩略图的只会在 `http://localhost:8090/apis/storage.halo.run/v1alpha1/thumbnails` 中存在一份记录
3. 测试删除附件会删除对应的缩略图文件和 [thumbnails](http://localhost:8090/apis/storage.halo.run/v1alpha1/thumbnails) 
记录
4. 修改 externalUrl 以上功能均不会受到影响

#### Which issue(s) this PR fixes:
Fixes #2387 

#### Does this PR introduce a user-facing change?
```release-note
附件图片支持生成多尺寸图片,文章支持响应式图片。
```
2024-08-26 10:27:14 +00:00
guqing 58fe872844
feat: add file size and type restriction for local file uploads (#6390)
#### What type of PR is this?
/kind feature
/area core

#### What this PR does / why we need it:
本次 PR 为本地附件存储策略增加了对上传单文件大小和文件类型限制的功能,具体包括:

1. 单文件大小限制:
实现了对单个文件上传大小的验证功能,确保上传文件不超过设定的最大值。
2. 文件类型限制:
添加了文件类型限制功能,使用 Apache Tika 读取上传文件的 magic numbers 得到文件 mime type 并根据用户配置来决定是否允许上传

参考链接:
- [List of file signatures](https://en.wikipedia.org/wiki/List_of_file_signatures)
- [File Magic Numbers: The Easy way to Identify File Extensions](https://library.mosse-institute.com/articles/2022/04/file-magic-numbers-the-easy-way-to-identify-file-extensions/file-magic-numbers-the-easy-way-to-identify-file-extensions.html)

#### Which issue(s) this PR fixes:
Fixes #6385

#### Does this PR introduce a user-facing change?
```release-note
为本地附件存储策略增加了对上传单文件大小和文件类型限制的功能
```
2024-08-01 01:58:12 +00:00
John Niang 6440ad509e
Upgrade SpringDoc to 2.6.0 (#6227)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.17.0

#### What this PR does / why we need it:

This PR upgrades SpringDoc to 2.6.0 and its gradle plugin to 1.9.0.
See https://github.com/springdoc/springdoc-openapi/releases/tag/v2.6.0 and https://github.com/springdoc/springdoc-openapi-gradle-plugin/releases/tag/1.9.0 for more.

#### Does this PR introduce a user-facing change?

```release-note
升级 SpringDoc 至 2.6.0
```
2024-07-01 03:17:15 +00:00
John Niang 0ddc4f8d42
Upgrade Lucene to 9.11.1 (#6188)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.17.x

#### What this PR does / why we need it:

See https://github.com/apache/lucene/releases/tag/releases%2Flucene%2F9.11.1 for more.

#### Does this PR introduce a user-facing change?

```release-note
升级 Lucene 至 9.11.1
```
2024-06-28 01:58:58 +00:00
John Niang 632bb69dfe
Refactor search engine and improve document extensibility (#6082)
#### What type of PR is this?

/kind improvement
/kind api-change
/area core

#### What this PR does / why we need it:

See https://github.com/JohnNiang/halo/blob/refactor/search/docs/extension-points/search-engine.md for more

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/5202
Fixes https://github.com/halo-dev/halo/issues/5339
Fixes https://github.com/halo-dev/halo/issues/5613
Fixes https://github.com/halo-dev/halo/issues/5172
Fixes https://github.com/halo-dev/halo/issues/4796
Fixes https://github.com/halo-dev/halo/issues/5625
Fixes https://github.com/halo-dev/halo/issues/5805

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
重构搜索引擎并提高可扩展性。
```
2024-06-26 15:22:51 +00:00
guqing d6da4c6bba
chore: upgrade pf4j version to 3.12.0 (#6143)
#### What type of PR is this?
/kind bug
/area core
/milestone 2.17.x

#### What this PR does / why we need it:
升级 pf4j 至 3.12.0 版本以解决插件依赖解析不正确的问题

#### Which issue(s) this PR fixes:
Fixes #5616

#### Does this PR introduce a user-facing change?
```release-note
升级 pf4j 至 3.12.0 版本以解决插件依赖解析不正确的问题
```
2024-06-26 03:40:48 +00:00
Ryan Wang 4f63352b47
chore: bump mariadb driver to 1.2.1 to fix crash issue (#6133)
#### What type of PR is this?

/area core
/kind bug
/milestone 2.17.x

#### What this PR does / why we need it:

升级 MariaDB 的原生驱动版本至 [1.2.1](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/releases/tag/1.2.1),以解决无法正常部署的问题。

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/5534

#### Special notes for your reviewer:

测试方式:

```shell
./gradlew clean build -x check -x test --refresh-dependencies
```

```shell
docker build -t halohub/halo:mariadb-fix .
```

```yaml
services:
  halo:
    image: halohub/halo:mariadb-fix
    restart: on-failure:3
    networks:
      halo_network:
    volumes:
      - ./halo2:/root/.halo2
    ports:
      - "8090:8090"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8090/actuator/health/readiness"]
      interval: 30s
      timeout: 5s
      retries: 5
      start_period: 30s
    command:
      - --spring.r2dbc.url=r2dbc:pool:mariadb://halodb:3306/halo
      - --spring.r2dbc.username=root
      - --spring.r2dbc.password=jzm3h9t9jggo6ww
      - --spring.sql.init.platform=mariadb
      - --halo.external-url=http://localhost:8090/

  halodb:
    image: mariadb:latest
    container_name: mariadb
    restart: always
    networks:
      halo_network:
    environment:
      MYSQL_ROOT_PASSWORD: jzm3h9t9jggo6ww
      MYSQL_DATABASE: halo
    volumes:
      - ./db:/var/lib/mysql
networks:
  halo_network:
```

```shell
docker compose up
```

#### Does this PR introduce a user-facing change?

```release-note
升级 MariaDB 的原生驱动版本至 [1.2.1](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/releases/tag/1.2.1),以解决使用 MariaDB 无法正常部署的问题。
```
2024-06-24 16:16:44 +00:00
John Niang fa9d3ee8a2
Upgrade PF4J to 3.11.1 (#5950)
#### What type of PR is this?

/kind cleanup
/area core
/area plugin

#### What this PR does / why we need it:

See https://github.com/pf4j/pf4j/releases/tag/release-3.11.1 and https://github.com/halo-dev/halo/pull/5770 for more.

#### Does this PR introduce a user-facing change?

```release-note
升级 PF4J 至 3.11.1
```
2024-05-20 04:14:41 +00:00
John Niang cc7f2de805
Downgrade pf4j to 3.10.0 (#5770)
Signed-off-by: JohnNiang <johnniang@foxmail.com>
2024-04-23 11:30:33 +08:00
John Niang 38ae38c842
Upgrade SpringDoc to 2.5.0 (#5717)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

This PR upgrades SpringDoc to [2.5.0](https://github.com/springdoc/springdoc-openapi/releases/tag/v2.5.0).

#### Does this PR introduce a user-facing change?

```release-note
升级 SpringDoc 至 2.5.0
```
2024-04-16 03:14:07 +00:00
John Niang 6d1e35d01f
Upgrade SpringDoc to 2.4.0 (#5569)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

This PR upgrades SpringDoc to [2.4.0](https://github.com/springdoc/springdoc-openapi/releases/tag/v2.4.0).

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 SpringDoc 至 2.4.0
```
2024-03-22 08:36:07 +00:00
John Niang 0843747abc
Collect Gradle plugin versions into root build.gradle (#5511)
#### 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
```
2024-03-15 10:34:07 +00:00
John Niang a8627cbc2f
Upgrade PF4J to 3.11.0 (#5462)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

This PR upgrades Pf4j to [3.11.0](https://github.com/pf4j/pf4j/releases/tag/release-3.11.0) regularlly.

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 PF4J 至 3.11.0
```
2024-03-07 06:45:06 +00:00
John Niang 348079d82e
Upgrade Spring Boot to 3.2.3 (#5402)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.13.x

#### What this PR does / why we need it:

Upgrade Spring Boot to [3.2.3](https://github.com/spring-projects/spring-boot/releases/tag/v3.2.3).

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Spring Boot 至 3.2.3
```
2024-02-25 14:24:08 +00:00
John Niang e2b8d6e1f9
Upgrade Resilience4j to 2.2.0 (#5262)
#### What type of PR is this?

/kind improvement
/area core

#### What this PR does / why we need it:

This PR upgrades Resilience4J to 2.2.0. See https://github.com/resilience4j/resilience4j/blob/v2.2.0/RELEASENOTES.adoc for more.

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Resilience4j 至 2.2.0
```
2024-01-29 05:59:51 +00:00
John Niang 9ae7323404
Upgrade Lucene to 9.9.1 (#5261)
#### What type of PR is this?

/kind improvement
/area core

#### What this PR does / why we need it:

This PR upgrades Lucene to 9.9.1. See https://lucene.apache.org/core/corenews.html#apache-lucenetm-991-available for more.

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Lucene 至 9.9.1
```
2024-01-29 02:58:50 +00:00
John Niang 9d9b1527bc
Upgrade Spring Boot to 3.2.2 (#5232)
#### What type of PR is this?

/kind improvement
/area core

#### What this PR does / why we need it:

See https://github.com/spring-projects/spring-boot/releases/tag/v3.2.2 for more.

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Spring Boot 至 3.2.2
```
2024-01-23 05:11:41 +00:00
John Niang 7946585bb5 Support TOTP two-factor authentication for backend
Signed-off-by: John Niang <johnniang@foxmail.com>
2024-01-15 15:22:06 +08:00
John Niang 197c622b35
Upgrade to SpringDoc 2.3.0 (#4987)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.12.x

#### What this PR does / why we need it:

Upgrade to SpringDoc 2.3.0. See https://github.com/springdoc/springdoc-openapi/releases/tag/v2.3.0 for more.

#### Does this PR introduce a user-facing change?

```release-note
升级 SpringDoc 至 2.3.0
```
2023-12-04 06:34:09 +00:00
John Niang 3bb2d8fbae Upgrade to Spring Boot 3.2.0 2023-11-24 00:09:45 +08:00
John Niang b04496e4f3
Upgrade to SpringDoc 2.2.1-SNAPSHOT (#4854)
#### What type of PR is this?

/kind bug
/area core
/milestone 2.11.x

#### What this PR does / why we need it:

This PR upgrades to SpringDoc 2.2.1-SNAPSHOT to resolve the problem of Swagger API doc display errors.

#### Does this PR introduce a user-facing change?

```release-note
升级 SpringDoc 至 2.2.1-SNAPSHOT 以解决部分 API 文档无法正常使用的问题
```
2023-11-15 03:04:09 +00:00
John Niang 65a7e970cd
Upgrade to Spring Boot 3.2.0-RC2 (#4850)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.11.x

#### What this PR does / why we need it:

- Upgrade to Spring Boot 3.2.0-RC2.
- Fix unit test errors due to upgrading.

See https://github.com/spring-projects/spring-boot/releases/tag/v3.2.0-RC2 for more.

#### Does this PR introduce a user-facing change?

Anyone who is using H2 database and wants to upgrade this version has to backup and restore Halo or upgrade old h2 database file manually.

```release-note
[Action Required] 升级 Spring Boot 至 3.2.0-RC2
```
2023-11-13 09:28:08 +00:00
John Niang 21e975d60a
Upgrade to Spring Boot 3.1.5 (#4758)
#### What type of PR is this?

/kind cleanup

#### What this PR does / why we need it:

Upgrade to Spring Boot 3.1.5. See https://github.com/spring-projects/spring-boot/releases/tag/v3.1.5 for more.

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Spring Boot 至 3.1.5
```
2023-10-20 03:24:44 +00:00
John Niang 610609656d
Upgrade to PF4J 3.10.0 (#4666)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.10.0

#### What this PR does / why we need it:

Upgrade to [PF4J 3.10.0](https://github.com/pf4j/pf4j/releases/tag/release-3.10.0).

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 PF4J 至 3.10.0
```
2023-09-27 05:04:17 +00:00
John Niang d002579456
Upgrade to Spring Boot 3.1.4 (#4665)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.10.0

#### What this PR does / why we need it:

Upgrade to Spring Boot [3.1.4](https://github.com/spring-projects/spring-boot/releases/tag/v3.1.4).

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Spring Boot 至 3.1.4
```
2023-09-27 05:02:23 +00:00
John Niang e40b5d2388
Refine search result by customizing analyzer (#4456)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.9.x

#### What this PR does / why we need it:

- Removes dependency `cn.shenyanchao.ik-analyzer:ik-analyzer:9.0.0` due to no significant effect for searching result.
- Customize our own analyzer with StandardTokenizer, HTMLStripCharFilter and LowerCaseFilterFactory.

Please be aware of that the default field to search has become to `content` instead of `title` + `excerpt` + `content`. If someone wants to search title only, use `title: halo` as query string. For more details, please refer to <https://lucene.apache.org/core/9_5_0/queryparser/org/apache/lucene/queryparser/flexible/standard/StandardQueryParser.html>.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/4455

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
优化本地搜索引擎
```
2023-08-25 15:46:12 +00:00
John Niang acb738a8ac
Upgrade Lucene to 9.7.0 (#4479)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.9.x

#### What this PR does / why we need it:

This PR upgrades Lucene to 9.7.0. See: 
- https://lucene.apache.org/core/corenews.html#apache-lucenetm-970-available
- https://lucene.apache.org/core/9_7_0/changes/Changes.html

for more. for more.

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Lucene 至 9.7.0
```
2023-08-25 08:50:12 +00:00
John Niang 229bcafe71
Upgrade Spring Boot to 3.1.3 (#4478)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.9.x

#### What this PR does / why we need it:

This PR upgrades Spring Boot to 3.1.3. See https://github.com/spring-projects/spring-boot/releases/tag/v3.1.3 for more.

#### Does this PR introduce a user-facing change?

```release-note
升级依赖 Spring Boot 至 3.1.3
```
2023-08-25 08:40:11 +00:00
John Niang 20df302ef5
Upgrade to SpringDoc 2.2.0 for OpenAPI 3.1 support (#4384)
#### What type of PR is this?

/kind cleanup

#### What this PR does / why we need it:

This PR upgrades SpringDoc to 2.2.0 for OpenAPI 3.1 support. Please see https://github.com/springdoc/springdoc-openapi/releases/tag/v2.2.0 for more.

#### Special notes for your reviewer:

- Start Halo by using following command:
    ```bash
    ./gradlew bootRun --args="--spring.profiles.active=dev --halo.plugin.runtime-mode=deployment"
    ```
- Try to request <http://localhost:8090/swagger-ui.html> and check if the OpenAPI version is 3.1

#### Does this PR introduce a user-facing change?

```release-note
升级 SpringDoc 至 2.2.0
```
2023-08-08 07:02:12 +00:00
John Niang e98aec32ca
Upgrade Spring Boot 3.1.2 (#4284)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.8.x

#### What this PR does / why we need it:

Upgrade Spring Boot 3.1.2. See https://github.com/spring-projects/spring-boot/releases/tag/v3.1.2 for more.

#### Does this PR introduce a user-facing change?

```release-note
升级 Spring Boot 至 3.1.2。
```
2023-07-24 03:20:14 +00:00
John Niang 25103b9ff8
Upgrade Spring Boot to 3.1.1 (#4136)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.7.x

#### What this PR does / why we need it:

Upgrade Spring Boot to 3.1.1. See https://github.com/spring-projects/spring-boot/releases/tag/v3.1.1 for more.

#### Does this PR introduce a user-facing change?

```release-note
升级 Spring Boot 至 3.1.1
```
2023-06-28 08:08:11 +00:00
John Niang 02369fbd3c
Add rate limiter for login endpoint (#4062)
#### What type of PR is this?

/kind feature
/area core

#### What this PR does / why we need it:

This PR introduces https://github.com/resilience4j/resilience4j to archive the feature. The login endpoint has limited login failures at a rate of 3 per minute.

See https://github.com/halo-dev/halo/issues/4044 for more.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/4044

#### Special notes for your reviewer:

1. Start Halo.
2. Try to login with incorrect credential 4 times
3. Check the response.

#### Does this PR introduce a user-facing change?

```release-note
增加登录失败次数限制功能
```
2023-06-16 04:50:12 +00:00
guqing 350e54d42a
chore: bump google guava version to 32.0.1-jre (#4081)
#### What type of PR is this?
/milestone 2.7.x
/area core

#### What this PR does / why we need it:
升级 Google Guava 版本至 32.0.1-jre

Guava [31.1](https://github.com/google/guava/releases/tag/v31.1) 至 [32.0.1](https://github.com/google/guava/releases/tag/v32.0.1) 的变化:
1. 移除了部分 API 的 `@Beta` 注解进入稳定版
2. 关于 `Files.createTempDir` 方法的安全性修复 https://github.com/advisories/GHSA-7g45-4rm6-3mm3 (https://github.com/google/guava/issues/2575)

详情参考:https://github.com/google/guava/releases/tag/v32.0.0

#### Does this PR introduce a user-facing change?

```release-note
升级 Google Guava 版本至 32.0.1-jre
```
2023-06-15 14:30:12 +00:00
John Niang ebcafe6117
Replace R2DBC MySQL driver to io.asyncer:r2dbc-mysql (#3918)
#### What type of PR is this?

/kind improvement
/area core

#### What this PR does / why we need it:

Replace R2DBC MySQL driver to io.asyncer:r2dbc-mysql. See https://github.com/halo-dev/halo/issues/3804 for more.

Please note that there will be an error like below when starting up Halo on MacOS:

```java
2023-05-09T14:24:45.161+08:00 ERROR 4668 --- [  restartedMain] i.n.r.d.DnsServerAddressStreamProviders  : Unable to load io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider, fallback to system defaults. This may result in incorrect DNS resolutions on MacOS. Check whether you have a dependency on 'io.netty:netty-resolver-dns-native-macos'. Use DEBUG level to see the full stack: java.lang.UnsatisfiedLinkError: failed to load the required native library
```

After manual test, I haven't found any problems caused by the error. And this only occurs on MacOS when developing.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3804

#### Special notes for your reviewer:

Steps to test:

1. Start up a MySQL server, e.g.:
    ```bash
    docker run -it --rm --name halodb -p 3306:3306 -e MYSQL_ROOT_PASSWORD=openmysql -e MYSQL_DATABASE=halo mysql:8
    ```
3. Start Halo with mysql profile active
    ```bash
    make -C console dev
    ./gradlew bootRun --args="--spring.profiles.active=dev,mysql --halo.plugin.runtime-mode=deployment"
    ```
5. Check the functionality of Halo

#### Does this PR introduce a user-facing change?

```release-note
替换 R2DBC MySQL 驱动为:io.asyncer:r2dbc-mysql
```
2023-05-31 06:41:03 +00:00
John Niang 4abe16f20a
Upgrade to Spring Boot 3.1.0 (#3996)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.6.x

#### What this PR does / why we need it:

Upgrade to Spring Boot 3.1.0, please refer to <https://github.com/spring-projects/spring-boot/releases/tag/v3.1.0>.

#### Does this PR introduce a user-facing change?

```release-note
升级 Spring Boot 至 3.1.0
```
2023-05-25 13:22:18 +00:00
John Niang c0c1806476
Upgrade to Spring Boot 3.1.0-RC2 (#3917)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

Upgrade to Spring Boot 3.1.0-RC2.

See https://github.com/spring-projects/spring-boot/releases/tag/v3.1.0-RC2 and https://github.com/spring-projects/spring-boot/releases/tag/v3.1.0-RC1 for more.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3816

#### Does this PR introduce a user-facing change?

```release-note
升级 Spring Boot 至 3.1.0-RC2
```
2023-05-09 04:31:43 +00:00
John Niang 6ca2cabffb
Upgrade to Spring Boot 3.0.6 (#3832)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

Upgrade to Spring Boot 3.0.6.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3829

#### Does this PR introduce a user-facing change?

```release-note
升级 Spring Boot 至 3.0.6
```
2023-04-24 07:47:43 +00:00
John Niang ed14fcb5f4
Support publishing to maven central repository (#3767)
#### What type of PR is this?

/kind feature
/area core

#### What this PR does / why we need it:

Use Gradle plugin `maven-publish` to publish Halo modules(`platform.application`, `platform.plugin` and `api`) to Maven central repository.

```bash
# Try to publish to Maven local repository.
./gradlew publish
# Really publish to Maven central repository.
./gradlew -Prelease publish -PossrhUsername=username -PossrhPassword=password
```

Note that currently we only support manually publishing.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/2730

#### Does this PR introduce a user-facing change?

```release-note
None
```
2023-04-18 14:28:23 +08:00
John Niang d8f4e478e2
Upgrade to SpringDoc OpenAPI 2.1.0 (#3687)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

Upgrade to SpringDoc OpenAPI 2.1.0. See https://github.com/springdoc/springdoc-openapi/releases/tag/v2.1.0 for more.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3496

#### Does this PR introduce a user-facing change?

```release-note
升级 SpringDoc OpenAPI 至 2.1.0
```
2023-04-03 14:06:14 +00:00
John Niang b9867415da
Upgrade to MariaDB R2DBC connector 1.1.4 (#3610)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

See https://github.com/halo-dev/halo/issues/3600 for more.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3600

#### Special notes for your reviewer:

We can follow the commands below to test it:

```bash
# Start up MariaDB
docker run -d --env MARIADB_USER=halo -p 3306:3306 --env MARIADB_PASSWORD=mariadb --env MARIADB_ROOT_PASSWORD=mariadb -e MARIADB_DATABASE=halo mariadb:latest

# Start up Halo
make -C console dev
./gradlew bootRun --args="--spring.profiles.active=dev,mariadb"
```

#### 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 R2DBC connector 1.1.4
```
2023-03-29 02:26:12 +00:00
John Niang a0b4a0eb0b
Upgrade to Spring Boot 3.0.5 (#3609)
#### What type of PR is this?

/kind cleanup
/area core

#### What this PR does / why we need it:

See https://github.com/halo-dev/halo/issues/3599 for more.

#### Which issue(s) this PR fixes:

Fixes https://github.com/halo-dev/halo/issues/3599

#### Does this PR introduce a user-facing change?

```release-note
升级至 Spring Boot 3.0.5
```
2023-03-28 15:42:12 +00:00
John Niang c400c85922
Refactor project structure for a better development (#3552)
#### 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
重构项目结构
```
2023-03-23 08:02:33 +00:00