Commit Graph

8 Commits (7946585bb522276f7aff548dea6dc86bd925af86)

Author SHA1 Message Date
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
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
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
John Niang 21de4d7e55
Bump version of dependencies (#1602)
* 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>
2021-12-23 11:17:58 +08:00
John Niang c22348e03a
Upgrade spring boot version (#1289)
* Update gradle wrapper version

* Update spring boot version to 2.5.0-M2

* Fix wrong const of temp_dir

* Refactor error controller

* Fix startup error due to theme not found

* Refine error controller handler

* Refine multipart resolver config

* Fix ThemeRepositoryImplTest error

* Fix freemarker not found error

* chore: change jetty to undertow.

* Remove useless throws

Co-authored-by: Ryan Wang <i@ryanc.cc>
2021-03-06 00:58:12 +08:00
chaos.su 9ec3088f1e
support distributed cache and customized halo home. (#754)
* support distributed cache with redis

* fix HOME_DIR; theme configurations auto update in distributed deployment; update redis cache configuration demo

* remove redundant const of WORK_DIR

Co-authored-by: John Niang <johnniang@riseup.net>
2020-05-01 14:43:01 +08:00
ruibaby 022db247d4 Change setttings.gradle to settings.gradle 2019-06-17 15:53:13 +08:00