SpringBoot个性化启动横幅设置方法解析

  

<强> 1。添加Banner.txt文件

  

 SpringBoot个性化启动横幅设置方法解析

        。_ _ _ _/\ \/___”_ _ _ _ (_)_ _ _ _ \ \ \ \   (()\ ___ | _ | _ | | ' _ \/_ | \ \ \ \   \ \/___)| | _)| | | | | | | (_ | |))))   “__ | | .__ | _ | | _ | _ | | _ \ __ |////=========| _ |==============| ___/=/_/_/_/::天恒弹簧引导::(v2.0.5.RELEASE)      

<强> 2。修改application.properties文件

        #端口号   server.port=8090   #配置禁止地址   spring.banner.location=banner.txt      

<强> 3。添加启动类

        包top.ytheng.demo;      进口org.springframework.boot.SpringApplication;   进口org.springframework.boot.autoconfigure.SpringBootApplication;      @SpringBootApplication//等于下面3个//@SpringBootConfiguration//@EnableAutoConfiguration//@ComponentScan   公开课DemoApplication {      公共静态void main (String [] args) {   SpringApplication.run (DemoApplication.class, args);   }      }      

<强> 4。右键运行启动项目,如图所示

  

 SpringBoot个性化启动横幅设置方法解析

  

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。

SpringBoot个性化启动横幅设置方法解析