Commit Graph

219 Commits (d192b8c956887e4701b94e3ed302fb88e4771583)

Author SHA1 Message Date
John Niang 062af6fcad
Update Spring Boot to 3.0.4 (#3451)
#### What type of PR is this?

/kind improvement
/area core

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

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

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

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

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

```release-note
升级 Spring Boot 至 3.0.4
```
2023-03-06 03:44:11 +00:00
John Niang 01306b0b5a
Add downloadPluginPresets task (#3427)
#### What type of PR is this?

/kind feature
/area core

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

Add downloadPluginPresets task to download plugin presets from GitHub release.

```bash
> Task :downloadPluginPresets
Download https://github.com/halo-sigs/plugin-comment-widget/releases/download/v1.2.0/plugin-comment-widget-1.2.0.jar
Download https://github.com/halo-sigs/plugin-sitemap/releases/download/v1.0.1/plugin-sitemap-1.0.1.jar
Download https://github.com/halo-sigs/plugin-feed/releases/download/v1.1.0-beta.1/plugin-feed-1.1.0-beta.1.jar
Download https://github.com/halo-sigs/plugin-search-widget/releases/download/v1.0.0/plugin-search-widget-1.0.0.jar

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
10:47:59 AM: Execution finished 'downloadPluginPresets'.
```

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

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

#### Special notes for your reviewer:

Try to download plugin presets and check theme by using following commands:

```bash
./gradlew downloadPluginPresets

ls -lah src/main/resources/presets/plugins 
```

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

```release-note
None
```
2023-03-01 03:48:18 +00:00
John Niang 0d9ec4f197
Report test result using Jacoco plugin (#3385) 2023-02-24 15:51:21 +08:00
John Niang 937573e6b2
Upgrade to Spring Boot 3.0.3 (#3379)
#### 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.
```
2023-02-24 03:20:12 +00:00
John Niang c079762f65
Upgrade Lucene to 9.5.0 (#3190)
#### 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
```
2023-01-31 07:14:09 +00:00
John Niang f851b1ba53
Upgrade pf4j to 3.9.0 (#3191)
#### 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
```
2023-01-31 06:10:10 +00:00
John Niang b0be55cfad
Upgrade jasync-sql to 2.1.23 (#3192)
#### 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
```
2023-01-31 05:54:09 +00:00
John Niang ef45f396d8
Upgrade SpringDoc to 2.0.2 (#3186)
#### 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/springdoc/springdoc-openapi/releases/tag/v2.0.2> and <https://github.com/springdoc/springdoc-openapi/releases/tag/v2.0.1> for more.

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

```release-note
升级依赖 SpringDoc 至 2.0.2
```
2023-01-31 03:04:09 +00:00
John Niang bb7fe81343
Add spring-context-indexer to speed up startup (#3185)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.2.x

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

See https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#beans-scanning-index for more.

#### Special notes for your reviewer:

This might help a little, bu we have to.

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

```release-note
None
```
2023-01-31 02:58:09 +00:00
John Niang 1810255aea
Provide system config endpoint (#3182)
#### 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
提供系统配置详情端口
```
2023-01-30 07:20:11 +00:00
John Niang 536218d702
Upgrade Spring Boot to 3.0.2 (#3176)
#### 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
```
2023-01-30 03:44:12 +00:00
guqing 5c29ab5750
feat: support validate requires version for plugin (#3114)
#### What type of PR is this?
/kind feature
/area core
/milestone 2.2.x

#### What this PR does / why we need it:
插件安装和升级支持版本校验

BTW: 此 PR 中 PluginReconciler 有一些异常提示是没有加 i18n 的,主要是考虑 Reconciler 与请求不挂钩,无法获取到 request 上下文的 Locale,如果用 Locale.getDefault() 那么后续用户切换语言时也更改不到已经持久化到数据库中的错误信息,可能得靠客户端翻译异常。

参考文档:
- [semver-expressions-api-ranges](https://github.com/zafarkhaja/jsemver#semver-expressions-api-ranges)
- [integrating-with-actuator.build-info](https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/htmlsingle/#integrating-with-actuator.build-info)
- [BuildInfoContributor](https://github.com/spring-projects/spring-boot/blob/v3.0.1/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/info/BuildInfoContributor.java)

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

#### Special notes for your reviewer:
how to test it?
- 开发模式下不会校验插件填写的 requires,但通过接口安装和升级都会统一校验。
- 在 deployment 模式下安装插件和升级插件会根据 halo 的版本校验插件的 spec.requires 是否符合要求,参考 [semver-expressions-api-ranges](https://github.com/zafarkhaja/jsemver#semver-expressions-api-ranges)。
- 如果 spec.requires 为 `*` 则表示允许所有,如果填写为具体的版本号,例如 requires: "2.2.0" 则隐式表示为 `>=2.2.0`。

可以测试这几种情况是否符合期望。

/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?
```release-note
插件安装和升级支持版本校验
```
2023-01-13 02:50:12 +00:00
codychau fcfc7113f5
Support MariaDB Native Driver (#2787)
#### 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 数据库连接
```
2022-12-26 04:02:31 +00:00
will 3601acfa0a
Upgrade to spring boot 3.0.1 (#3031)
#### 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
```
2022-12-23 03:14:30 +00:00
guqing 98db7c6aff
chore: upgrade to PF4J 3.8.0 (#2772)
#### 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
```
2022-11-25 11:05:07 +00:00
John Niang 1b888dfb3e
Upgrade to Spring Boot 3.0.0 (#2768)
#### What type of PR is this?

/kind improvement
/area core

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

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

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

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

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

```release-note
升级依赖 Spring Boot 至 3.0.0
```
2022-11-25 02:33:06 +00:00
John Niang 368d8f4ef4
Upgrade to SpringDoc OpenAPI 2.0.0 (#2769)
#### 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
```
2022-11-25 02:31:07 +00:00
guqing 180548161a
feat: provides authentication and authorization expression dialects (#2729)
#### 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
主题端支持使用表达式方言获取登录状态和判断权限
```
2022-11-23 03:00:19 +00:00
John Niang 87ccd61ae5
Bump up springdoc-openapi (#2726)
#### 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
```
2022-11-21 05:44:27 +00:00
John Niang dac4eecea6
Implement full-text search of posts with Lucene default (#2675)
#### 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
提供文章全文搜索功能并支持搜索引擎扩展
```
2022-11-11 16:12:13 +00:00
John Niang 2cd501955f
Bump Spring Boot to 3.0.0-RC2 (#2692)
#### 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
```
2022-11-11 10:50:15 +00:00
John Niang ee032f8cb9
Bump jasync-r2dbc-mysql to 2.1.7 (#2631)
#### 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
```
2022-10-26 04:24:09 +00:00
John Niang 403f1bd7b2
Bump SpringDoc to 2.0.0-RC1 (#2628)
#### 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/springdoc/springdoc-openapi/releases/tag/v2.0.0-RC1>.

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

```release-note
None
```
2022-10-26 04:22:14 +00:00
John Niang d2aa707071
Bump Spring Boot to 3.0.0-RC1 (#2620)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.0

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

- See https://github.com/spring-projects/spring-boot/releases/tag/v3.0.0-RC1 for more.
- Due to [Default to Xor CSRF protection](https://github.com/spring-projects/spring-security/issues/11960), we have to implement a XOR algorithm in console project to generate a XORed token. Please be aware of source code of Spring Security at [here](9cb668aec2/web/src/main/java/org/springframework/security/web/server/csrf/XorServerCsrfTokenRequestAttributeHandler.java (L94-L115)), @halo-dev/sig-halo-console 

#### Special notes for reviewers

We have removed `ThemeJava8TimeDialect` due to removal of `thymeleaf-extras-java8time` module in https://github.com/thymeleaf/thymeleaf/issues/912

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

```release-note
None
```
2022-10-25 02:56:11 +00:00
John Niang 638ceac5a3
Bump version of SpringDoc to 2.0.0-M7 (#2593)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.0

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

See https://github.com/springdoc/springdoc-openapi/releases/tag/v2.0.0-M7 for more.

![image](https://user-images.githubusercontent.com/16865714/196356805-ce028139-4e5f-48d7-ba63-d29cefb17683.png)


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

```release-note
None
```
2022-10-18 10:12:11 +00:00
John Niang 543bdc45b5
Support running Halo with MySQL and MariaDB database (#2512)
#### 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
```
2022-10-09 02:32:30 +00:00
John Niang b23ed2efcc
Bump version of Spring Boot & SpringDoc (#2511)
#### What type of PR is this?

/kind improvement
/area core
/milestone 2.0

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

1. Upgrade Spring Boot to 3.0.0-M5. See https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0.0-M5-Release-Notes for more.
2. Upgrade SpringDoc to 2.0.0-M6. The version is compatible to Spring Boot 3.0.0-M5. See https://github.com/springdoc/springdoc-openapi/issues/1865 for more.

#### Special notes for your reviewer:

Please check the API documentation endpoint: <http://localhost:8090/swagger-ui.html>.

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

```release-note
None
```
2022-10-08 02:04:27 +00:00
guqing 7de944f61d
chore: degrade springboot version from 3.0.0-M5 to 3.0.0-M4 (#2496)
#### 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
```
2022-09-30 08:52:19 +00:00
John Niang 73c66289e0
Bump version of dependencies (#2466)
#### What type of PR is this?

/kind cleanup
/area core
/milestone 2.0

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

This PR mainly upgrades version of dependencies and removes unused dependencies.

See the following references for more:

- https://github.com/spring-projects/spring-boot/releases/tag/v3.0.0-M5
- https://github.com/jhy/jsoup/releases/tag/jsoup-1.15.3
- https://github.com/spring-projects/spring-security/issues/6613

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

```release-note
None
```
2022-09-25 11:22:14 +00:00
guqing ac8dd74211
feat: the ConfigMap named system to store user-defined configurations (#2415)
#### 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
```
2022-09-21 04:06:10 +00:00
guqing a0d55c58f6
feat: theme side provides variables for theme and some system settings (#2406)
#### 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
```
2022-09-15 06:52:13 +00:00
guqing b9957542f4
feat: add post module basic implementation (#2326)
<!--  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
```
2022-08-22 07:32:11 +00:00
John Niang 9911ba927d
Replace JDBC to R2DBC (#2324)
#### 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
```
2022-08-17 02:56:11 +00:00
John Niang 86f9daf421
Replace JSON schema with OpenAPI 3.0 (#2300)
#### 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
```
2022-08-03 03:34:14 +00:00
John Niang 3640dca0a1
Add label and field selector to Extension list API (#2279)
#### 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
```
2022-07-29 05:22:14 +00:00
John Niang 4cb94d3752
Upgrade Spring Boot to 3.0.0-M4 (#2269)
#### 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
```
2022-07-22 03:13:50 +00:00
John Niang 5953d2201d
Refactor CICD for Halo next (#2236) 2022-07-12 11:01:00 +08:00
John Niang 1024f71635
Replace webmvc with webflux (#2138)
* Replace webmvc to webflux

Signed-off-by: johnniang <johnniang@fastmail.com>

* Remove jetty dependency

Signed-off-by: johnniang <johnniang@fastmail.com>

* Refactor authentication module

* Refactor authentication module

* Migrate authorization module

* Refactor Login components

* Fix broken imports

* Upgrade springdoc version

* Refine security matcher using pathMatchers utility
2022-06-07 02:20:12 +00:00
guqing 2c057f4fe1
feat: add plugin implementation (#2128) 2022-05-31 04:06:10 +00:00
guqing 3c856d04af
feat: add personal access token authentication mechanism (#2116)
* feat: add personal access token authentication

* fix: merge conflicts

* refactor: remove base62 codec

* refactor: remove deprecated method

* feat: add base64 test

* chore: add todo for test only methods
2022-05-27 06:26:37 +00:00
John Niang 9990fdd086
Upgrade to Spring Boot 3.0.0-M3 (#2102)
Please see https://github.com/spring-projects/spring-boot/releases/tag/v3.0.0-M3
2022-05-20 03:35:34 +00:00
John Niang 5f9daf4735
Add JSON schema generator and validator (#2093)
Only validate the JSON schema when saving Extension into database.
2022-05-17 16:06:12 +00:00
John Niang 3cf2f9d7e1
Add support for API documentation (#2082) 2022-05-11 08:06:11 +00:00
John Niang 6db4f1105a
Upgrade Spring Boot to 3.0.0-M2 (#2071)
from 3.0.0-M1 to 3.0.0-M2, please refer to https://github.com/spring-projects/spring-boot/releases/tag/v3.0.0-M2
2022-05-06 09:56:13 +00:00
guqing 90d61a27e9
feat: add token provider (#1841) 2022-04-13 11:38:34 +00:00
guqing b3c82396ac
feat: Add security config for halo (#1838)
* feat: Add security config for halo

* chore: delete file

* feat: add security config intergration test case

* refactor: use EnableWebSecurity annotation

* refactor: patch prefix

* Update src/test/java/run/halo/app/integration/security/AuthenticationTest.java

Co-authored-by: John Niang <johnniang@fastmail.com>

* refactor: mvc path prefix config

Co-authored-by: John Niang <johnniang@fastmail.com>
2022-04-13 09:08:34 +00:00
guqing e2843adbe7
Create basic project structure for halo 2.0 (#1699)
* feat: Add project structure

* feat: Add config

* feat: Add flyway migrate config for h2 and mysql and postgresql

* fix: checkstyle config

* chore: Upgrade springboot 2.6 to 3.0.0-m1

* feat: Add spring snapshot url for repositories

* refactor: Change jdk11 to jdk17 for github ci config

* refactor: update build.gradle config
2022-03-04 15:04:11 +08:00
Ryan Wang 641264ba5c chore: clean code for next major version
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-03-03 11:34:42 +08:00
Ryan Wang c306586778
chore: bump Spring Boot to 2.5.10 (#1677)
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-02-26 12:30:34 +08:00
PONGSKY 4bfc3c0228
Revert dependency of minio-java to 7.1.4 (#1666)
* fix: 降低 minio 版本,回滚至与 springboot 相对应的 okhttp 依赖版本
2022-02-25 21:24:56 +08:00