Web Programming/springboot
Springboot 콘솔 배너 변경하기 ( 배너 생성 사이트 소개 )
맑은안개
2022. 7. 25. 11:06
Springboot 콘솔 배너 변경
Springboot Application 기동 시 아래와 같은 배너(banner)
가 콘솔에 출력되는데, 이를 변경하는 방법을 알아보자.
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.7.2)
Default banner
는 banner.txt파일이 존재 시 해당 파일을 Default banner로 사용한다.
아래의 banner 생성 사이트에 접속하여 원하는 문구를 입력한다.
https://devops.datenkollektiv.de/banner.txt/index.html
결과의 텍스트를 모두 복사하여, project경로/resources에 banner.txt로 붙여넣어 저장한다.
Application 실행 결과
application.propertie
spring.banner.location=banner_prod.txt
- 파일명을 지정한다.
spring.main.banner-mode=off
- 배너출력을 하지 않는다.
spring.banner.image.location=main_icon.png
- 이미지를 텍스트로 변환하여 콘솔에 출력한다.
spring.banner.image.height=20
spring.banner.image.width=50
height
,width
옵션을 사용하여 콘솔에 출력되는 크기를 지정할 수 있다.
Use cases
- 운영/개발/로컬 실행환경에 따라 배너의 텍스트를 변경 할 수 있다.( active 사용 )
반응형