com.yuebaix:pangu-core

An all-in-one,out-of-the-box solution for handling web development.Handle chanllenges with own solid core codes.Support conveniences with springboot famework.


License
Glulxe

Documentation

PanGu 盘古

The name comes from the creator of universe in ancient chinese mythology.
以中国古代神话中创世神命名

What PanGu Is? 盘古是什么?

  • A Normal form of framework code. 框架代码范式。
  • A general solution for building website applications. 构建网站应用的通用解决方案。
  • Meeting the core challenges of building high-performance websites. 应对构建高性能网站的核心挑战。
  • Solid and less dependent framework code. 坚实少依赖的框架代码。
  • Enhancements based on springboot. 基于springboot进行增强。
  • Out of the box and easy to use. 开箱即用且易于使用。
  • Convenient for secondary development and expansion. 便于二次开发与扩展。
  • Exploration of reactive programing and coroutines. 对响应式与协程的探索。

Structure

.
├─pangu-common (base code 基础代码)
├─pangu-core (frame code 框架代码)
├─pangu-web (web code 网站基础代码)
├─pangu-spring-boot-starter (starter for pangu 盘古starter)
├─pangu-ready-spring-boot-starter (starter for pangu and more enhancements 封装盘古与更多增强starter)
└─pangu-test (integrated test code 集成测试代码)

Feature

Website Enhancements | OpenApi UI | Api Log | More

网站增强特性 | 接口UI | 接口日志 | 更多

PanGu has already added these starters below up. And there's gonna be more.

盘古已经引入了下面这些starter。并且还会有更多。

pangu-spring-boot-starter     ---> power to make web development sweet
springfox-boot-starter        ---> openapi doc for web interfaces
knife4j-spring-ui             ---> nice ui for openapi doc
logbook-spring-boot-starter   ---> record all requests and responses in an efficient way

Getting Started

1. Add dependency(Must). 添加依赖(必须)。

Gradle

implementation 'com.yuebaix:pangu-ready-spring-boot-starter:0.0.1'

Maven

<dependency>
    <groupId>com.yuebaix</groupId>
    <artifactId>pangu-ready-spring-boot-starter</artifactId>
    <version>0.0.1</version>
</dependency>

2. Manage dependencies(Recommend). 依赖管理(推荐)。

For gradle:

  1. Copy pangu-ready-denpendencies.gradle to your local src root path.
  2. Rename it to denpendencies.gradle.
  3. Then apply it.
apply from: "${rootDir}/denpendencies.gradle"

Notice:

  1. Rely on 'io.spring.dependency-management' gradle plugin,依赖'io.spring.dependency-management'插件。
  2. Built with SpringCloud Hoxton. But pangu-ready-denpendencies-greenwich is also provided. 使用SpringCLoud Hoxton构建,但是也提供了SpringCloud Greenwich版依赖的支持。

For maven:

Sadly there's no plan to support it. You could build one with maven dependencyManagement. If you want to contribute. Let me know. 并没有长期计划支持maven。你自己可以用maven dependencyManagement构建一个。如果你有兴趣贡献代码,请联系我。

3. Config to meet your flavor(Unnecessary). 配置一下满足你的口味(非必须)。

Here's the default configuration. 下面是默认的配置

pangu.starter.enabled=true
pangu.starter.ctxHolder.enabled=true
pangu.starter.banner.enabled=true
pangu.starter.banner.springboot.enabled=false
pangu.starter.banner.pangu.enabled=true

pangu.readystarter.enabled=true
pangu.readystarter.swagger.enabled=true
pangu.readystarter.logbook.enabled=true
pangu.readystarter.logbook.config.obfuscate-body-params=token,password,mobile,email

4. Kickstart. 启动。

Run your springboot application. Console output will look like below. 启动你的Springboot应用。控制台输出会像下面这样。

Console Output

5. Enjoy. 愉快玩耍吧。😉

Roadmap

LICENSE

Blush License

Maintainers

Gmail

Give a Star!

If you like or are using this project to learn or start your solution, please give it a star. Thanks!
觉得不错的话,别忘 star 👏

Changelog

Date Version Description
2021-09-20 0.0.1 first release
第一次发布
2021-09-04 0.0.1-SNAPSHOTT init project
项目初始化