新增 `yudao-spring-boot-starter-banner` 组件,用于项目启动时打印开发文档、接口文档等

This commit is contained in:
YunaiV 2022-06-18 09:22:26 +08:00
parent e5f343a3e9
commit 69a3a835a5
11 changed files with 73 additions and 9 deletions

View File

@ -79,6 +79,11 @@
</dependency>
<!-- 业务组件 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-spring-boot-starter-banner</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId>

View File

@ -11,6 +11,7 @@
<packaging>pom</packaging>
<modules>
<module>yudao-common</module>
<module>yudao-spring-boot-starter-banner</module>
<module>yudao-spring-boot-starter-mybatis</module>
<module>yudao-spring-boot-starter-redis</module>
<module>yudao-spring-boot-starter-web</module>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>yudao-framework</artifactId>
<groupId>cn.iocoder.boot</groupId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>yudao-spring-boot-starter-banner</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>Banner 用于在 console 控制台,打印开发文档、接口文档等</description>
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
<dependencies>
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-common</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -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();
}
}

View File

@ -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 {

View File

@ -0,0 +1,6 @@
/**
* Banner 用于在 console 控制台打印开发文档接口文档等
*
* @author 芋道源码
*/
package cn.iocoder.yudao.framework.banner;

View File

@ -0,0 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
cn.iocoder.yudao.framework.banner.config.YudaoBannerAutoConfiguration

View File

@ -13,7 +13,7 @@ import org.springframework.context.annotation.Configuration;
import java.util.List;
/**
* 数据全新啊的自动配置类
* 数据权限的自动配置类
*
* @author 芋道源码
*/

View File

@ -63,6 +63,10 @@
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-spring-boot-starter-banner</artifactId>
</dependency>
<!-- 服务保障相关 -->
<dependency>

View File

@ -1,4 +0,0 @@
/**
* 目的项目启动成功后提供文档相关的地址
*/
package cn.iocoder.yudao.server.framework.tip;