Class PropertyExample
java.lang.Object
info.ejava.examples.app.config.valueinject.PropertyExample
- All Implemented Interfaces:
org.springframework.boot.CommandLineRunner
@Component
public class PropertyExample
extends Object
implements org.springframework.boot.CommandLineRunner
-
Field Details
-
strVal
-
intVal
private final int intVal -
booleanVal
private final boolean booleanVal -
floatVal
private final float floatVal -
intList
-
intListDelimiter
-
intArray
private final int[] intArray -
intSet
-
map
-
mapValue
-
systemProperties
-
-
Constructor Details
-
PropertyExample
public PropertyExample(@Value("${val.str:}") String strVal, @Value("${val.int:0}") int intVal, @Value("${val.boolean:false}") boolean booleanVal, @Value("${val.float:0.0}") float floatVal, @Value("${val.intList:}") List<Integer> intList, @Value("${val.intList:}") Set<Integer> intSet, @Value("${val.intList:}") int[] intArray, @Value("#{\'${val.intListDelimiter:}\'.split(\'!\')}") List<Integer> intListDelimiter, @Value("#{${val.map:{}}}") Map<Integer, String> map, @Value("#{${val.map:{0:\'\',3:\'\'}}[3]}") String mapValue, @Value("#{systemProperties}") Map<String, String> systemProperties)
-
-
Method Details
-
run
- Specified by:
run
in interfaceorg.springframework.boot.CommandLineRunner
- Throws:
Exception
-