|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.tutorial.boot.BootPropertiesTutorial
@Document(title="Using Boot Properties", sortKey="basics1001") @DocCategory(value="basics") public class BootPropertiesTutorial
This tutorial shows how to use BootProperties
.
Constructor Summary | |
---|---|
BootPropertiesTutorial() |
Method Summary | |
---|---|
void |
bootProperties() BootProperties provide a simple interface to control the process of dealing with properties. |
void |
setUp() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BootPropertiesTutorial()
Method Detail |
---|
public void setUp()
@DocChapter public void bootProperties() throws MalformedURLException
BootProperties
provide a simple interface to control the process of dealing with properties. Boot properties are read in advance before any other properties are evaluated.
Boot properties are provided by the system as is. User's cannot add custom properties to it. Boot properties are used to control the process through configuration and cannot be accessed by user code.
In contrast to other properties files boot.properties
have to be placed under the META-INF/smartics-properties
folder.
Currently there is only one boot property called additionalPropertiesLocations
that allows to add additional locations for properties definitions. One use case for this property is to add a path to a (maybe removable) device where sensible properties are stored. Or it is simply a path to a location where operations has convenient access to.
The property is specified as shown in the following example.
smartics.properties.additionalPropertiesLocations=file:/D:/Transfer/external
The values are expected to be valid URLs. The usual constraints on specifying multiple properties apply (please refer to ListPropertyTutorial
for details).
Although the boot properties can be accessed, the client code does not see the actual properties, as you can see at in the following example:
MalformedURLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |