-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re-add ConfigSourceFactory from 64d0d5f
to be replaced, once there is an official way to access higher-order config (see eclipse/microprofile-config#470)
- Loading branch information
1 parent
2108874
commit 091b93e
Showing
5 changed files
with
25 additions
and
5 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
19 changes: 19 additions & 0 deletions
19
backend/src/main/java/org/cryptomator/hub/config/HubConfigSourceFactory.java
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,19 @@ | ||
package org.cryptomator.hub.config; | ||
|
||
import io.smallrye.config.ConfigSourceContext; | ||
import io.smallrye.config.ConfigSourceFactory; | ||
import org.eclipse.microprofile.config.spi.ConfigSource; | ||
|
||
import java.util.List; | ||
|
||
public class HubConfigSourceFactory implements ConfigSourceFactory { | ||
|
||
private static final String HUBCONFIG_PROPERTY_KEY = "hub.config.path"; | ||
|
||
@Override | ||
public Iterable<ConfigSource> getConfigSources(ConfigSourceContext configSourceContext) { | ||
var configPath = configSourceContext.getValue(HUBCONFIG_PROPERTY_KEY); | ||
var hubConfig = new HubConfig(configPath.getValue()); | ||
return List.of(hubConfig); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
backend/src/main/resources/META-INF/services/io.smallrye.config.ConfigSourceFactory
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 @@ | ||
org.cryptomator.hub.config.HubConfigSourceFactory |
1 change: 0 additions & 1 deletion
1
...end/src/main/resources/META-INF/services/org.eclipse.microprofile.config.spi.ConfigSource
This file was deleted.
Oops, something went wrong.
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