diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml index 751c65447..c5e0630be 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 aca714e2b..ed8f6719f 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 000000000..e740fce5f --- /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 000000000..2ae83f3f8 --- /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 db71c5079..27e2f70eb 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 000000000..aba726853 --- /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 000000000..416b89477 --- /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 609e8a34b..62534ed63 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 612072b7e..d3faf0e1e 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 3006aa4ae..000000000 --- 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;