sprinboot默认是开启banner的,如下图:
如果不想输出logo,可以通过以下两种方法来关闭:
1.修改main方法
public class SpringbootstudyApplication {
public static void main(String[] args) {
SpringApplication springApplication=new SpringApplication(SpringbootstudyApplication.class);
springApplication.setBannerMode(Banner.Mode.OFF);
springApplication.run(args);
}
2.修改yml文件
spring:
main:
banner-mode: "off"
注意:双引号一定要加,否则报
Cannot convert value of type 'java.lang.Boolean' to required type 'org.springframework.boot.Banner$Mode' for property 'bannerMode': no matching editors or conversion strategy found]
默认的banner为什么会