Package io.microsphere.spring.boot.util
Class SpringApplicationUtils
- java.lang.Object
-
- io.microsphere.spring.boot.util.SpringApplicationUtils
-
- All Implemented Interfaces:
io.microsphere.util.Utils
public abstract class SpringApplicationUtils extends java.lang.Object implements io.microsphere.util.UtilsSpringApplicationUtilities class- Since:
- 1.0.0
- Author:
- Mercy
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddDefaultPropertiesResource(java.lang.String resourceLocation)Add "defaultProperties" resource pathstatic voidaddDefaultPropertiesResources(java.lang.String... resourceLocations)Add one or more "defaultProperties" resource pathsstatic java.util.Set<java.lang.String>getDefaultPropertiesResources()static java.lang.StringgetLoggingLevel(org.springframework.context.ConfigurableApplicationContext context)Get logging level with upper case from the SpringPropertySourcesstatic java.lang.StringgetLoggingLevel(org.springframework.core.env.PropertyResolver propertyResolver)Get logging level(Upper case) from the SpringPropertySourcesstatic org.springframework.core.io.ResourceLoadergetResourceLoader(org.springframework.boot.SpringApplication springApplication)static voidlog(org.springframework.boot.SpringApplication springApplication, java.lang.String[] args, java.lang.String pattern, java.lang.Object... patternArgs)LogSpringApplicationstatic voidlog(org.springframework.boot.SpringApplication springApplication, java.lang.String[] args, org.springframework.context.ConfigurableApplicationContext context, java.lang.String pattern, java.lang.Object... patternArgs)LogSpringApplication
-
-
-
Method Detail
-
addDefaultPropertiesResource
public static void addDefaultPropertiesResource(java.lang.String resourceLocation)
Add "defaultProperties" resource path- Parameters:
resourceLocation- "defaultProperties" resource path
-
addDefaultPropertiesResources
public static void addDefaultPropertiesResources(java.lang.String... resourceLocations)
Add one or more "defaultProperties" resource paths- Parameters:
resourceLocations- one or more "defaultProperties" resource paths
-
getDefaultPropertiesResources
public static java.util.Set<java.lang.String> getDefaultPropertiesResources()
- Returns:
- read-only
defaultPropertiesResources
-
getResourceLoader
public static org.springframework.core.io.ResourceLoader getResourceLoader(org.springframework.boot.SpringApplication springApplication)
-
getLoggingLevel
public static java.lang.String getLoggingLevel(@Nullable org.springframework.context.ConfigurableApplicationContext context)Get logging level with upper case from the SpringPropertySources- Parameters:
context-ConfigurableApplicationContextcontext- Returns:
- logging level with upper case
-
getLoggingLevel
public static java.lang.String getLoggingLevel(@Nullable org.springframework.core.env.PropertyResolver propertyResolver)Get logging level(Upper case) from the SpringPropertySources- Parameters:
propertyResolver-PropertyResolver- Returns:
- logging level with upper case
-
log
public static void log(org.springframework.boot.SpringApplication springApplication, java.lang.String[] args, java.lang.String pattern, java.lang.Object... patternArgs)LogSpringApplication- Parameters:
springApplication-SpringApplicationargs- the command line argumentspattern- the logging message patternpatternArgs- the logging message arguments
-
log
public static void log(org.springframework.boot.SpringApplication springApplication, java.lang.String[] args, @Nullable org.springframework.context.ConfigurableApplicationContext context, java.lang.String pattern, java.lang.Object... patternArgs)LogSpringApplication- Parameters:
springApplication-SpringApplicationargs- the command line argumentscontext-ConfigurableApplicationContextpattern- the logging message patternpatternArgs- the logging message arguments
-
-