Skip to content

Commit 48c3cd7

Browse files
Merge pull request #45 from BorderTech/release-1.0.7
Release 1.0.7
2 parents 167794e + 08e6287 commit 48c3cd7

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Add dependency:
3636
<dependency>
3737
<groupId>com.github.bordertech.config</groupId>
3838
<artifactId>config</artifactId>
39-
<version>1.0.6</version>
39+
<version>1.0.7</version>
4040
</dependency>
4141
....
4242
</project>
@@ -65,7 +65,7 @@ The default implementation looks for the following resources either as a classpa
6565
- `bordertech-defaults.properties` - framework defaults
6666
- `bordertech-app.properties` - application properties
6767
- `bordertech-local.properties` - local developer properties
68-
68+
6969
URL resources can be loaded from the user home directory or the current working directory
7070

7171
Projects will usually use `bordertech-app.properties` resource files.
@@ -76,7 +76,7 @@ The resources loaded into the Configuration can be overridden via [configuration
7676

7777
### Include resources
7878
Other property files can be included from other predefined property files.
79-
If the "include" property is defined, it is treated as a (comma-separated) list of additional resources (classpath resource or a URL)
79+
If the "include" property is defined, it is treated as a (comma-separated) list of additional resources (classpath resource or a URL)
8080
to load that are processed immediately within the current resource being loaded
8181

8282
``` java properties
@@ -85,32 +85,32 @@ include=include_resource_1.properties[,include_resource_2.properties]
8585

8686
### IncludeAfter resources
8787
Other property files can be included from the predefined property file after the current set has loaded.
88-
If this property is defined, it is treated as a (comma-separated) list of additional resources (classpath resource or a URL)
88+
If this property is defined, it is treated as a (comma-separated) list of additional resources (classpath resource or a URL)
8989
to load that are processed after the current (set of) resources have loaded.
9090

9191
``` java properties
9292
includeAfter=include_resource_1.properties[,include_resource_2.properties]
93-
```
93+
```
9494

9595
### += Append values to predefined properties
96-
Config also allows for the ability to append values to properties already defined.
96+
Config also allows for the ability to append values to properties already defined.
9797
This is done using '+=' instead of '=' on a key-value pair. Suggested use case is you have a global default set and then
9898
you want to append application specific values to the default values for access within an application.
99-
99+
100100
``` java properties
101101
# Defined in default.properties
102102
already.defined.key+=value1
103103

104104
#Defined in app.properties
105105
already.defined.key+=value2,value3
106-
```
106+
```
107107

108108
`Config.getInstance().get("already.defined.key")` returns `value1,value2,value3`
109109

110110
### Profiles
111111
Profiles allow you to map properties to different profiles - for example, dev, test, prod or mock.
112-
We can activate these profiles in different environments to set(override) the properties we need.
113-
The profile property is generally to be defined as either an OS environment variable or a JVM system property.
112+
We can activate these profiles in different environments to set(override) the properties we need.
113+
The profile property is generally to be defined as either an OS environment variable or a JVM system property.
114114
However, it can be set in a properties file which is useful in unit testing or testing on a local environment.
115115

116116
When a property with the key `bordertech.config.profile` is set, it is used as the suffix for each property lookup:
@@ -205,7 +205,7 @@ The following methods in the `Config` class are useful for unit testing:
205205

206206
## Configuration
207207

208-
The initial configuration of `Config` can be overridden by setting properties in a file `bordertech-config.properties`.
208+
The initial configuration of `Config` can be overridden by setting properties in a file `bordertech-config.properties`.
209209
The default `bordertech-config.properties` file name can also be overriden via a System or Environment property `BT_CONFIG_FILE`.
210210

211211
The following options can be set:-
@@ -239,13 +239,13 @@ bordertech.config.resource.append=my-project.properties
239239
[ConfigurationLoader](https://github.com/BorderTech/java-config/blob/master/src/main/java/com/github/bordertech/config/ConfigurationLoader.java) is the [SPI](https://docs.oracle.com/javase/tutorial/sound/SPI-intro.html) interface for classes that can load a custom configuration.
240240

241241
By default, the SPI lookup is enabled and if found, it will create the custom configuration
242-
242+
243243
If the `bordertech.config.spi.append.default` is true the Default Configuration will also be appended to the configuration.
244244

245245
### Best Practice
246246

247-
When using java-config in a container and setting specific properties for that container instance,
248-
this can be achieved by property file(s) placed in the container that can be referred to and included within the application at runtime.
247+
When using java-config in a container and setting specific properties for that container instance,
248+
this can be achieved by property file(s) placed in the container that can be referred to and included within the application at runtime.
249249

250250
## Contributing
251251

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<groupId>com.github.bordertech.config</groupId>
66
<name>config</name>
77
<artifactId>config</artifactId>
8-
<version>1.0.7-SNAPSHOT</version>
8+
<version>1.0.8-SNAPSHOT</version>
99

1010
<parent>
1111
<groupId>com.github.bordertech.common</groupId>

0 commit comments

Comments
 (0)