From 69a3a835a5a208450bcb172f6a530342aa5f7d7f Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 18 Jun 2022 09:22:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20`yudao-spring-boot-starter?= =?UTF-8?q?-banner`=20=E7=BB=84=E4=BB=B6=EF=BC=8C=E7=94=A8=E4=BA=8E?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=90=AF=E5=8A=A8=E6=97=B6=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E6=96=87=E6=A1=A3=E3=80=81=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-dependencies/pom.xml | 5 ++++ yudao-framework/pom.xml | 1 + .../yudao-spring-boot-starter-banner/pom.xml | 30 +++++++++++++++++++ .../config/YudaoBannerAutoConfiguration.java | 20 +++++++++++++ .../banner/core/BannerApplicationRunner.java | 8 ++--- .../yudao/framework/banner/package-info.java | 6 ++++ .../main/resources/META-INF/spring.factories | 2 ++ .../src/main/resources/banner.txt | 0 .../YudaoDataPermissionAutoConfiguration.java | 2 +- yudao-server/pom.xml | 4 +++ .../server/framework/tip/package-info.java | 4 --- 11 files changed, 73 insertions(+), 9 deletions(-) create mode 100644 yudao-framework/yudao-spring-boot-starter-banner/pom.xml create mode 100644 yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/config/YudaoBannerAutoConfiguration.java rename yudao-server/src/main/java/cn/iocoder/yudao/server/framework/tip/core/TipApplicationRunner.java => yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/core/BannerApplicationRunner.java (87%) create mode 100644 yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/package-info.java create mode 100644 yudao-framework/yudao-spring-boot-starter-banner/src/main/resources/META-INF/spring.factories rename {yudao-server => yudao-framework/yudao-spring-boot-starter-banner}/src/main/resources/banner.txt (100%) delete mode 100644 yudao-server/src/main/java/cn/iocoder/yudao/server/framework/tip/package-info.java diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 751c65447e..c5e0630bea 100644 --- a/yudao-dependencies/pom.xml +++ b/yudao-dependencies/pom.xml @@ -79,6 +79,11 @@ + + cn.iocoder.boot + yudao-spring-boot-starter-banner + ${revision} + cn.iocoder.boot yudao-spring-boot-starter-biz-operatelog diff --git a/yudao-framework/pom.xml b/yudao-framework/pom.xml index aca714e2bf..ed8f6719f2 100644 --- a/yudao-framework/pom.xml +++ b/yudao-framework/pom.xml @@ -11,6 +11,7 @@ pom yudao-common + yudao-spring-boot-starter-banner yudao-spring-boot-starter-mybatis yudao-spring-boot-starter-redis yudao-spring-boot-starter-web diff --git a/yudao-framework/yudao-spring-boot-starter-banner/pom.xml b/yudao-framework/yudao-spring-boot-starter-banner/pom.xml new file mode 100644 index 0000000000..e740fce5f6 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-banner/pom.xml @@ -0,0 +1,30 @@ + + + + yudao-framework + cn.iocoder.boot + ${revision} + + 4.0.0 + yudao-spring-boot-starter-banner + jar + + ${project.artifactId} + Banner 用于在 console 控制台,打印开发文档、接口文档等 + https://github.com/YunaiV/ruoyi-vue-pro + + + + cn.iocoder.boot + yudao-common + + + + org.springframework.boot + spring-boot-starter + + + + diff --git a/yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/config/YudaoBannerAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/config/YudaoBannerAutoConfiguration.java new file mode 100644 index 0000000000..2ae83f3f80 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/config/YudaoBannerAutoConfiguration.java @@ -0,0 +1,20 @@ +package cn.iocoder.yudao.framework.banner.config; + +import cn.iocoder.yudao.framework.banner.core.BannerApplicationRunner; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * Banner 的自动配置类 + * + * @author 芋道源码 + */ +@Configuration +public class YudaoBannerAutoConfiguration { + + @Bean + public BannerApplicationRunner bannerApplicationRunner() { + return new BannerApplicationRunner(); + } + +} diff --git a/yudao-server/src/main/java/cn/iocoder/yudao/server/framework/tip/core/TipApplicationRunner.java b/yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/core/BannerApplicationRunner.java similarity index 87% rename from yudao-server/src/main/java/cn/iocoder/yudao/server/framework/tip/core/TipApplicationRunner.java rename to yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/core/BannerApplicationRunner.java index db71c50796..27e2f70ebb 100644 --- a/yudao-server/src/main/java/cn/iocoder/yudao/server/framework/tip/core/TipApplicationRunner.java +++ b/yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/core/BannerApplicationRunner.java @@ -1,19 +1,19 @@ -package cn.iocoder.yudao.server.framework.tip.core; +package cn.iocoder.yudao.framework.banner.core; import cn.hutool.core.thread.ThreadUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; -import org.springframework.stereotype.Component; import java.util.concurrent.TimeUnit; /** * 项目启动成功后,提供文档相关的地址 + * + * @author 芋道源码 */ -@Component @Slf4j -public class TipApplicationRunner implements ApplicationRunner { +public class BannerApplicationRunner implements ApplicationRunner { @Override public void run(ApplicationArguments args) throws Exception { diff --git a/yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/package-info.java b/yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/package-info.java new file mode 100644 index 0000000000..aba7268534 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-banner/src/main/java/cn/iocoder/yudao/framework/banner/package-info.java @@ -0,0 +1,6 @@ +/** + * Banner 用于在 console 控制台,打印开发文档、接口文档等 + * + * @author 芋道源码 + */ +package cn.iocoder.yudao.framework.banner; diff --git a/yudao-framework/yudao-spring-boot-starter-banner/src/main/resources/META-INF/spring.factories b/yudao-framework/yudao-spring-boot-starter-banner/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000000..416b894770 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-banner/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + cn.iocoder.yudao.framework.banner.config.YudaoBannerAutoConfiguration diff --git a/yudao-server/src/main/resources/banner.txt b/yudao-framework/yudao-spring-boot-starter-banner/src/main/resources/banner.txt similarity index 100% rename from yudao-server/src/main/resources/banner.txt rename to yudao-framework/yudao-spring-boot-starter-banner/src/main/resources/banner.txt diff --git a/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/config/YudaoDataPermissionAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/config/YudaoDataPermissionAutoConfiguration.java index 609e8a34be..62534ed63b 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/config/YudaoDataPermissionAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-data-permission/src/main/java/cn/iocoder/yudao/framework/datapermission/config/YudaoDataPermissionAutoConfiguration.java @@ -13,7 +13,7 @@ import org.springframework.context.annotation.Configuration; import java.util.List; /** - * 数据全新啊的自动配置类 + * 数据权限的自动配置类 * * @author 芋道源码 */ diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index 612072b7ec..d3faf0e1e3 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -63,6 +63,10 @@ spring-boot-configuration-processor true + + cn.iocoder.boot + yudao-spring-boot-starter-banner + diff --git a/yudao-server/src/main/java/cn/iocoder/yudao/server/framework/tip/package-info.java b/yudao-server/src/main/java/cn/iocoder/yudao/server/framework/tip/package-info.java deleted file mode 100644 index 3006aa4ae2..0000000000 --- a/yudao-server/src/main/java/cn/iocoder/yudao/server/framework/tip/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * 目的:项目启动成功后,提供文档相关的地址 - */ -package cn.iocoder.yudao.server.framework.tip;