Jelajahi Sumber

更新banner

陈精华 2 tahun lalu
induk
melakukan
e3fb1d7c15

+ 0 - 2
server/src/main/java/cn/keking/ServerMain.java

@@ -1,6 +1,5 @@
 package cn.keking;
 
-import cn.keking.config.AppBanner;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -23,7 +22,6 @@ public class ServerMain {
         stopWatch.start();
         ConfigurableApplicationContext context = new SpringApplicationBuilder(ServerMain.class)
                 .logStartupInfo(false)
-                .banner(new AppBanner())
                 .run(args);
         stopWatch.stop();
         Integer port = context.getBean(ServerProperties.class).getPort();

+ 0 - 28
server/src/main/java/cn/keking/config/AppBanner.java

@@ -1,28 +0,0 @@
-package cn.keking.config;
-
-import org.springframework.boot.Banner;
-import org.springframework.core.env.Environment;
-
-import java.io.PrintStream;
-
-/**
- * @author kl (http://kailing.pub)
- * @since 2021/2/8
- */
-public class AppBanner implements Banner {
-    @Override
-    public void printBanner(Environment environment, Class<?> sourceClass, PrintStream out) {
-        out.println(
-                "  _      _      ______   _   _         __      __  _                   \n" +
-                " | |    | |    |  ____| (_) | |        \\ \\    / / (_)                  \n" +
-                " | | __ | | __ | |__     _  | |   ___   \\ \\  / /   _    ___  __      __\n" +
-                " | |/ / | |/ / |  __|   | | | |  / _ \\   \\ \\/ /   | |  / _ \\ \\ \\ /\\ / /\n" +
-                " |   <  |   <  | |      | | | | |  __/    \\  /    | | |  __/  \\ V  V / \n" +
-                " |_|\\_\\ |_|\\_\\ |_|      |_| |_|  \\___|     \\/     |_|  \\___|   \\_/\\_/  \n" +
-                "                                                                     \n" +
-                " => Spring Boot ::  (v2.4.2)               QQ1 :: 613025121\n" +
-                " => kkFileView  ::  (v4.1.0-SNAPSHOT)      QQ2 :: 484680571\n" +
-                " => github      ::  https://github.com/kekingcn/kkFileView\n" +
-                " => gitee       ::  https://gitee.com/kekingcn/file-online-preview\n");
-    }
-}

+ 14 - 0
server/src/main/resources/banner.txt

@@ -0,0 +1,14 @@
+
+  _      _      ______   _   _         __      __  _
+ | |    | |    |  ____| (_) | |        \ \    / / (_)
+ | | __ | | __ | |__     _  | |   ___   \ \  / /   _    ___  __      __
+ | |/ / | |/ / |  __|   | | | |  / _ \   \ \/ /   | |  / _ \ \ \ /\ / /
+ |   <  |   <  | |      | | | | |  __/    \  /    | | |  __/  \ V  V /
+ |_|\_\ |_|\_\ |_|      |_| |_|  \___|     \/     |_|  \___|   \_/\_/
+
+ => Spring Boot ::  ${spring-boot.version}
+ => kkFileView  ::  4.1.0-SNAPSHOT
+ => Homepage    ::  https://kkfileview.keking.cn
+ => Github      ::  https://github.com/kekingcn/kkFileView
+ => Gitee       ::  https://gitee.com/kekingcn/file-online-preview
+ => QQ Group    ::  613025121  484680571