[SpringBoot] Banner
                                            
                                                
                                                
                                                
                                                
                                                
                                                 5268 단어  SpringbootBannerBanner
                    
1. BannerMode OFF
- 아래 사진과 같은 배너를 OFF처리해보자
  
//배너가 실행이 안됨.
application.setBannerMode(Banner.Mode.OFF);
- 배너없이 바로 출력되는 것을 볼 수 있다.
2. Banner 만들기
[Banner.txt 만들기]

[application.properties]
server.port=8085
spring.main.web-application-type=none
spring.main.banner-mode=console
spring.banner.location=banner/banner.txt[Chapter01Application]
package com.rubypaaper;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Chapter01Application {
	public static void main(String[] args) {
		SpringApplication application = 
				new SpringApplication(Chapter01Application.class);
		application.setWebApplicationType(WebApplicationType.SERVLET);
		application.run(args);		
	}
}[결과확인]

3. Banner에 버전추가하기

- ${spring-boot.formatted-version} 를  banner.txt파일에 추가해준다.
  
- 아래에 버전이 같이 표기된다.
4. 이미지파일 Banner로 표현하기
- 아래와 같은 이미지를 배너로 사용해보기
  
  
 [application.properties]
server.port=8085
spring.main.web-application-type=none
spring.main.banner-mode=console
#spring.banner.location=banner/banner.txt
spring.banner.image.location=banner/img.png
spring.banner.image.width= 10
spring.banner.image.height=10[결과확인]

Author And Source
이 문제에 관하여([SpringBoot] Banner), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@yseonjin/SpringBoot-Banner저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
