-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from sberyozkin/config_mapping
Use ConfigMapping in the build time config
- Loading branch information
Showing
2 changed files
with
9 additions
and
6 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
13 changes: 8 additions & 5 deletions
13
...eployment/src/main/java/io/quarkiverse/filevault/deployment/FileVaultBuildTimeConfig.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 |
---|---|---|
@@ -1,16 +1,19 @@ | ||
package io.quarkiverse.filevault.deployment; | ||
|
||
import io.quarkus.runtime.annotations.ConfigItem; | ||
import io.quarkus.runtime.annotations.ConfigPhase; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
import io.smallrye.config.ConfigMapping; | ||
import io.smallrye.config.WithDefault; | ||
|
||
/** | ||
* Build time configuration for File Vault. | ||
*/ | ||
@ConfigRoot(name = "file.vault") | ||
public class FileVaultBuildTimeConfig { | ||
@ConfigMapping(prefix = "quarkus.file.vault") | ||
@ConfigRoot(phase = ConfigPhase.BUILD_TIME) | ||
public interface FileVaultBuildTimeConfig { | ||
/** | ||
* If the File Vault extension is enabled. | ||
*/ | ||
@ConfigItem(defaultValue = "true") | ||
public boolean enabled; | ||
@WithDefault("true") | ||
boolean enabled(); | ||
} |