Close

Spring Boot - Customizing properties Examples

[Last Updated: Nov 8, 2025]

Spring Boot 

package com.logicbig.example;

import org.springframework.boot.SpringApplication;

import java.net.MalformedURLException;

public class CommandLineAppPropsSwitchExample {
public static void main (String[] args) throws MalformedURLException {
SpringApplication app = new SpringApplication(CustomBannerExample.class);
app.setLogStartupInfo(false);
//rename my-application.properties to application.properties
//or use a command line switch.. here we just overriding args
String[] myArgs = {"--spring.config.name=my-application"};
app.run(myArgs);
}
}

Output

---------------------
Test Banner
---------------------
Original Post




Customizing spring, setting command line switch for banner location.

package com.logicbig.example;

import org.springframework.boot.SpringApplication;

import java.net.MalformedURLException;

public class CommandLinePropSwitchExample {
public static void main (String[] args) throws MalformedURLException {

SpringApplication app = new SpringApplication(CommandLinePropSwitchExample.class);
app.setLogStartupInfo(false);
//rename resources/my-banner.txt to banner.txt
//here we are just using command line arg
String[] strings = {"--banner.location=my-banner.txt"};
app.run(strings);
}
}

Output

---------------------
Test Banner
---------------------
Original Post




package com.logicbig.example;

import org.springframework.boot.SpringApplication;

import java.net.MalformedURLException;
import java.util.Properties;

public class SetDefaultPropertiesExample {
public static void main (String[] args) throws MalformedURLException {
SpringApplication app = new SpringApplication(CustomBannerExample.class);
Properties p = new Properties();
p.setProperty("banner.location", "my-banner.txt");
p.setProperty("logging.level.org.springframework", "DEBUG");
app.setDefaultProperties(p);
app.run(args);
}
}

Output

2025-10-29 09:06:26.709 DEBUG 14976 --- [sExample.main()] .b.l.ClasspathLoggingApplicationListener : Application started with classpath: [file:/D:/LogicBig/example-projects/spring-boot/boot-startup-customizing/target/classes/, file:/C:/Users/Joe/.m2/repository/org/springframework/boot/spring-boot-starter/1.4.2.RELEASE/spring-boot-starter-1.4.2.RELEASE.jar, file:/C:/Users/Joe/.m2/repository/org/springframework/boot/spring-boot/1.4.2.RELEASE/spring-boot-1.4.2.RELEASE.jar, file:/C:/Users/Joe/.m2/repository/org/springframework/spring-context/4.3.4.RELEASE/spring-context-4.3.4.RELEASE.jar, file:/C:/Users/Joe/.m2/repository/org/springframework/spring-aop/4.3.4.RELEASE/spring-aop-4.3.4.RELEASE.jar, file:/C:/Users/Joe/.m2/repository/org/springframework/spring-beans/4.3.4.RELEASE/spring-beans-4.3.4.RELEASE.jar, file:/C:/Users/Joe/.m2/repository/org/springframework/spring-expression/4.3.4.RELEASE/spring-expression-4.3.4.RELEASE.jar, file:/C:/Users/Joe/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.4.2.RELEASE/spring-boot-autoconfigure-1.4.2.RELEASE.jar, file:/C:/Users/Joe/.m2/repository/org/springframework/boot/spring-boot-starter-logging/1.4.2.RELEASE/spring-boot-starter-logging-1.4.2.RELEASE.jar, file:/C:/Users/Joe/.m2/repository/ch/qos/logback/logback-classic/1.1.7/logback-classic-1.1.7.jar, file:/C:/Users/Joe/.m2/repository/ch/qos/logback/logback-core/1.1.7/logback-core-1.1.7.jar, file:/C:/Users/Joe/.m2/repository/org/slf4j/slf4j-api/1.7.21/slf4j-api-1.7.21.jar, file:/C:/Users/Joe/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.21/jcl-over-slf4j-1.7.21.jar, file:/C:/Users/Joe/.m2/repository/org/slf4j/jul-to-slf4j/1.7.21/jul-to-slf4j-1.7.21.jar, file:/C:/Users/Joe/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.21/log4j-over-slf4j-1.7.21.jar, file:/C:/Users/Joe/.m2/repository/org/springframework/spring-core/4.3.4.RELEASE/spring-core-4.3.4.RELEASE.jar, file:/C:/Users/Joe/.m2/repository/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar]
2025-10-29 09:06:26.714 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'context.listener.classes' in any property source
2025-10-29 09:06:26.721 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'banner.image.location' in any property source
2025-10-29 09:06:26.722 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Found key 'banner.location' in [defaultProperties] with type [String]
2025-10-29 09:06:26.725 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'banner.charset' in any property source
2025-10-29 09:06:26.728 DEBUG 14976 --- [sExample.main()] o.s.core.env.MutablePropertySources : Adding [version] PropertySource with lowest search precedence
2025-10-29 09:06:26.729 DEBUG 14976 --- [sExample.main()] o.s.core.env.MutablePropertySources : Adding [ansi] PropertySource with highest search precedence
2025-10-29 09:06:26.730 DEBUG 14976 --- [sExample.main()] o.s.core.env.MutablePropertySources : Adding [title] PropertySource with highest search precedence
---------------------
Test Banner
---------------------
2025-10-29 09:06:26.766 DEBUG 14976 --- [sExample.main()] o.s.core.env.StandardEnvironment : Adding [systemProperties] PropertySource with lowest search precedence
2025-10-29 09:06:26.767 DEBUG 14976 --- [sExample.main()] o.s.core.env.StandardEnvironment : Adding [systemEnvironment] PropertySource with lowest search precedence
2025-10-29 09:06:26.767 DEBUG 14976 --- [sExample.main()] o.s.core.env.StandardEnvironment : Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
2025-10-29 09:06:26.794 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'context.initializer.classes' in any property source
2025-10-29 09:06:26.795 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'spring.config.name:application' in any property source
2025-10-29 09:06:26.795 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'spring.config.name' in any property source
2025-10-29 09:06:26.795 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'vcap.application.name:application' in any property source
2025-10-29 09:06:26.795 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'vcap.application.name' in any property source
2025-10-29 09:06:26.795 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'spring.application.name:application' in any property source
2025-10-29 09:06:26.795 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'spring.application.name' in any property source
2025-10-29 09:06:26.795 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'PORT:null' in any property source
2025-10-29 09:06:26.795 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'PORT' in any property source
2025-10-29 09:06:26.795 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'server.port:null' in any property source
2025-10-29 09:06:26.795 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'server.port' in any property source
2025-10-29 09:06:26.796 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'spring.application.index:null' in any property source
2025-10-29 09:06:26.796 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'spring.application.index' in any property source
2025-10-29 09:06:26.796 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'vcap.application.instance_index:null' in any property source
2025-10-29 09:06:26.797 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'vcap.application.instance_index' in any property source
2025-10-29 09:06:26.797 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'spring.profiles.active' in any property source
2025-10-29 09:06:26.801 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'autoConfigurationReport'
2025-10-29 09:06:26.805 INFO 14976 --- [sExample.main()] c.l.example.SetDefaultPropertiesExample : Starting SetDefaultPropertiesExample on JoeMsi with PID 14976 (D:\LogicBig\example-projects\spring-boot\boot-startup-customizing\target\classes started by joe2 in D:\LogicBig\example-projects\spring-boot\boot-startup-customizing)
2025-10-29 09:06:26.805 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'spring.profiles.active' in any property source
2025-10-29 09:06:26.805 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'spring.profiles.default' in any property source
2025-10-29 09:06:26.805 INFO 14976 --- [sExample.main()] c.l.example.SetDefaultPropertiesExample : No active profile set, falling back to default profiles: default
2025-10-29 09:06:26.805 DEBUG 14976 --- [sExample.main()] o.s.boot.SpringApplication : Loading source class com.logicbig.example.CustomBannerExample
2025-10-29 09:06:26.825 DEBUG 14976 --- [sExample.main()] s.c.a.AnnotationConfigApplicationContext : Bean factory for org.springframework.context.annotation.AnnotationConfigApplicationContext@2e597a39: org.springframework.beans.factory.support.DefaultListableBeanFactory@cfcc1c6: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,customBannerExample]; root of factory hierarchy
2025-10-29 09:06:26.837 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
2025-10-29 09:06:26.837 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
2025-10-29 09:06:26.844 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Eagerly caching bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' to allow for resolving potential circular references
2025-10-29 09:06:26.854 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory'
2025-10-29 09:06:26.855 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating instance of bean 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory'
2025-10-29 09:06:26.855 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Eagerly caching bean 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory' to allow for resolving potential circular references
2025-10-29 09:06:26.856 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Finished creating instance of bean 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory'
2025-10-29 09:06:26.862 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Finished creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
2025-10-29 09:06:26.868 DEBUG 14976 --- [sExample.main()] o.s.core.env.StandardEnvironment : Removing [applicationConfigurationProperties] PropertySource
2025-10-29 09:06:26.868 DEBUG 14976 --- [sExample.main()] o.s.core.env.StandardEnvironment : Removing [defaultProperties] PropertySource
2025-10-29 09:06:26.868 DEBUG 14976 --- [sExample.main()] o.s.core.env.StandardEnvironment : Adding [defaultProperties] PropertySource with lowest search precedence
2025-10-29 09:06:26.869 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'
2025-10-29 09:06:26.869 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'
2025-10-29 09:06:26.871 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Eagerly caching bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' to allow for resolving potential circular references
2025-10-29 09:06:26.871 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Finished creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'
2025-10-29 09:06:26.871 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor'
2025-10-29 09:06:26.871 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor'
2025-10-29 09:06:26.871 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Eagerly caching bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' to allow for resolving potential circular references
2025-10-29 09:06:26.871 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Finished creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor'
2025-10-29 09:06:26.871 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor'
2025-10-29 09:06:26.871 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating instance of bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor'
2025-10-29 09:06:26.875 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Eagerly caching bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor' to allow for resolving potential circular references
2025-10-29 09:06:26.875 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Finished creating instance of bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor'
2025-10-29 09:06:26.875 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor'
2025-10-29 09:06:26.875 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating instance of bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor'
2025-10-29 09:06:26.875 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Eagerly caching bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor' to allow for resolving potential circular references
2025-10-29 09:06:26.876 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Finished creating instance of bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor'
2025-10-29 09:06:26.876 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor'
2025-10-29 09:06:26.876 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating instance of bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor'
2025-10-29 09:06:26.876 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Eagerly caching bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor' to allow for resolving potential circular references
2025-10-29 09:06:26.876 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Finished creating instance of bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor'
2025-10-29 09:06:26.877 DEBUG 14976 --- [sExample.main()] s.c.a.AnnotationConfigApplicationContext : Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@7560a21b]
2025-10-29 09:06:26.877 DEBUG 14976 --- [sExample.main()] s.c.a.AnnotationConfigApplicationContext : Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@5ad43ade]
2025-10-29 09:06:26.878 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@cfcc1c6: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,customBannerExample,org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor]; root of factory hierarchy
2025-10-29 09:06:26.878 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
2025-10-29 09:06:26.878 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'
2025-10-29 09:06:26.878 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor'
2025-10-29 09:06:26.879 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor'
2025-10-29 09:06:26.879 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerProcessor'
2025-10-29 09:06:26.879 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating instance of bean 'org.springframework.context.event.internalEventListenerProcessor'
2025-10-29 09:06:26.883 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Eagerly caching bean 'org.springframework.context.event.internalEventListenerProcessor' to allow for resolving potential circular references
2025-10-29 09:06:26.886 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Finished creating instance of bean 'org.springframework.context.event.internalEventListenerProcessor'
2025-10-29 09:06:26.886 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerFactory'
2025-10-29 09:06:26.886 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating instance of bean 'org.springframework.context.event.internalEventListenerFactory'
2025-10-29 09:06:26.887 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Eagerly caching bean 'org.springframework.context.event.internalEventListenerFactory' to allow for resolving potential circular references
2025-10-29 09:06:26.889 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Finished creating instance of bean 'org.springframework.context.event.internalEventListenerFactory'
2025-10-29 09:06:26.889 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating shared instance of singleton bean 'customBannerExample'
2025-10-29 09:06:26.889 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Creating instance of bean 'customBannerExample'
2025-10-29 09:06:26.889 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Eagerly caching bean 'customBannerExample' to allow for resolving potential circular references
2025-10-29 09:06:26.890 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Finished creating instance of bean 'customBannerExample'
2025-10-29 09:06:26.890 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory'
2025-10-29 09:06:26.891 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor'
2025-10-29 09:06:26.891 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor'
2025-10-29 09:06:26.891 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'org.springframework.context.event.internalEventListenerFactory'
2025-10-29 09:06:26.913 DEBUG 14976 --- [sExample.main()] s.c.a.AnnotationConfigApplicationContext : Unable to locate LifecycleProcessor with name 'lifecycleProcessor': using default [org.springframework.context.support.DefaultLifecycleProcessor@195557c9]
2025-10-29 09:06:26.914 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'lifecycleProcessor'
2025-10-29 09:06:26.915 DEBUG 14976 --- [sExample.main()] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory'
2025-10-29 09:06:26.916 DEBUG 14976 --- [sExample.main()] o.s.c.e.PropertySourcesPropertyResolver : Could not find key 'spring.liveBeansView.mbeanDomain' in any property source
2025-10-29 09:06:26.919 INFO 14976 --- [sExample.main()] c.l.example.SetDefaultPropertiesExample : Started SetDefaultPropertiesExample in 0.377 seconds (JVM running for 4.947)
2025-10-29 09:06:26.927 DEBUG 14976 --- [ Thread-2] o.s.b.f.s.DefaultListableBeanFactory : Returning cached instance of singleton bean 'lifecycleProcessor'
2025-10-29 09:06:26.927 DEBUG 14976 --- [ Thread-2] o.s.b.f.s.DefaultListableBeanFactory : Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@cfcc1c6: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,customBannerExample,org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor]; root of factory hierarchy
2025-10-29 09:06:26.927 DEBUG 14976 --- [ Thread-2] o.s.b.f.s.DefaultListableBeanFactory : Retrieved dependent beans for bean 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory': [org.springframework.context.annotation.internalConfigurationAnnotationProcessor]
Original Post




package com.logicbig.example;

import org.springframework.boot.SpringApplication;

import java.net.MalformedURLException;

public class TurnOffLogsExample {
public static void main (String[] args) throws MalformedURLException {
SpringApplication app = new SpringApplication(TurnOffLogsExample.class);
app.setLogStartupInfo(false);
app.run(args);
}
}

Output


. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.2.RELEASE)
Original Post




See Also