-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
= FileWatcher service | ||
`sample/sample-filewatcher-service` | ||
|
||
The purpose of this service is to demonstrate how to read configuration and track its changes from a plane properties file using `java.nio.file.WatchService`. | ||
|
||
Before using this service, must be specified the directory where the properties file located outside of the container and the path where the file located | ||
inside the container. For this, the `docker-compose.local.wildfly.yml` compose file must be changed as follow: | ||
|
||
* `CONFIG_PROPERTIES_FILE_PATH` environment variable define the properties file path inside the container | ||
** `CONFIG_PROPERTIES_FILE_PATH: /home/customConfig/config.properties` (this is the default value) | ||
* the directory of the properties file must be mounted to the container | ||
** `./customConfig:/home/customConfig'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
= FileWatcher service | ||
`sample/sample-filewatcher-service` | ||
|
||
A service célja annak bemutatása, hogy hogyan lehet konfigurációt felolvasni, illetve annak változását is követni, properties fájlból a | ||
`java.nio.file.WatchService` segítségével. | ||
|
||
A service használata előtt a properties fájl megtalálásához meg kell adni annak a konténeren kívüli mappáját, illetve a properties fájl konténeren belüli | ||
elérését, amihez a `docker-compose.local.wildfly.yml` compose fájlt ki kell egészíteni az alábbiak szerint: | ||
|
||
* CONFIG_PROPERTIES_FILE_PATH környezeti változóban meg kell adni a konténeren belüli elérési útját a properties fájlnak | ||
** `CONFIG_PROPERTIES_FILE_PATH: /home/customConfig/config.properties` (ez az alapértelmezett érték) | ||
* a properties fájl tartalmazó mappát fel kell csatolni a konténerhez, mint Docker volume, mivel a fájl változás követés mappán keresztül lehetséges | ||
** `./customConfig:/home/customConfig'` |