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);
}
}
一般不建议去掉,比较麻烦
标签:application,springboot,启动,boot,笔记,Application,SpringApplication,设置 来源: https://blog.51cto.com/u_14673658/2786563