Package org.springframework.boot.ansi
Class AnsiPropertySource
- java.lang.Object
- org.springframework.core.env.PropertySource<AnsiElement>
- org.springframework.boot.ansi.AnsiPropertySource
public class AnsiPropertySource extends org.springframework.core.env.PropertySource<AnsiElement>
PropertyResolver
forAnsiStyle
,AnsiColor
andAnsiBackground
elements. Supports properties of the formAnsiStyle.BOLD
,AnsiColor.RED
orAnsiBackground.GREEN
. Also supports a prefix ofAnsi.
which is an aggregation of everything (with background colors prefixedBG_
).- Since:
- 1.3.0
Constructor Summary
Constructors Constructor Description AnsiPropertySource(String name, boolean encode)
Create a newAnsiPropertySource
instance.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getProperty(String name)
Constructor Detail
AnsiPropertySource
public AnsiPropertySource(String name, boolean encode)
Create a newAnsiPropertySource
instance.- Parameters:
name
- the name of the property sourceencode
- if the output should be encoded
Method Detail
getProperty
public Object getProperty(String name)
- Specified by:
getProperty
in classorg.springframework.core.env.PropertySource<AnsiElement>