springboot学习笔记(二)—— springboot的启动模式设置
- 把springboot的启动类图标(spring)去掉,在启动类中添加以下代码
package com.xdr.spring;
import org.springframework.boot.Banner.Mode;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/*
* springboot 的启动类或引导类
*/
@SpringBootApplication //表明是springboot的引导类
public class Application {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("启动springboot");
//SpringApplication.run(Application.class, args);
SpringApplication application = new SpringApplication(Application.class);
application.setBannerMode(Mode.OFF); //启动引导类模式 关闭
application.run(args);
}
}
一般不建议去掉,比较麻烦
本文来自博客园,作者:兮动人,转载请注明原文链接:https://www.cnblogs.com/xdr630/p/15255150.html