From 9fdbb2cbbc9206deb50a0c1cd958005d7150095c Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Wed, 13 Dec 2023 12:39:34 +0100 Subject: [PATCH] Fix #170: Custom Spring Boot Banner --- src/main/resources/application.properties | 4 ++++ src/main/resources/banner.txt | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 src/main/resources/banner.txt diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 9ef03e9b..85143950 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -34,6 +34,10 @@ spring.jpa.hibernate.ddl-auto=none # Set JMX default domain in case JMX is enabled, otherwise the application startup fails due to clash in JMX bean names spring.jmx.default-domain=mobile-utility-server +spring.application.name=mobile-utility-server +banner.application.name=${spring.application.name} +banner.application.version=@project.version@ + # Disable open session in view to avoid startup warning of Spring boot spring.jpa.open-in-view=false diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt new file mode 100644 index 00000000..fb458110 --- /dev/null +++ b/src/main/resources/banner.txt @@ -0,0 +1,10 @@ + __ __ _ _ _ _ _ _ _ _ _ _ ____ + | \/ | ___ | |__ (_) | ___ | | | | |_(_) (_) |_ _ _ / ___| ___ _ ____ _____ _ __ + | |\/| |/ _ \| '_ \| | |/ _ \ | | | | __| | | | __| | | | \___ \ / _ \ '__\ \ / / _ \ '__| + | | | | (_) | |_) | | | __/ | |_| | |_| | | | |_| |_| | ___) | __/ | \ V / __/ | + |_| |_|\___/|_.__/|_|_|\___| \___/ \__|_|_|_|\__|\__, | |____/ \___|_| \_/ \___|_| + |___/ + +${AnsiColor.GREEN} :: ${banner.application.name} (${banner.application.version}) :: ${AnsiColor.GREEN} +${AnsiColor.RED} :: Spring Boot${spring-boot.formatted-version} :: ${AnsiColor.RED} +${AnsiColor.DEFAULT} \ No newline at end of file