forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 3
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 quarkusio#44079 from radcortez/fix-42114
Move core configuration to @ConfigMapping
- Loading branch information
Showing
83 changed files
with
589 additions
and
555 deletions.
There are no files selected for viewing
20 changes: 11 additions & 9 deletions
20
core/deployment/src/main/java/io/quarkus/banner/BannerConfig.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,24 +1,26 @@ | ||
package io.quarkus.banner; | ||
|
||
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; | ||
|
||
/** | ||
* Banner | ||
*/ | ||
@ConfigRoot(name = "banner") | ||
public class BannerConfig { | ||
|
||
private static final String DEFAULT_BANNER_FILE = "default_banner.txt"; | ||
@ConfigMapping(prefix = "quarkus.banner") | ||
@ConfigRoot(phase = ConfigPhase.BUILD_TIME) | ||
public interface BannerConfig { | ||
String DEFAULT_BANNER_FILE = "default_banner.txt"; | ||
|
||
/** | ||
* The path of the banner (path relative to root of classpath) | ||
* which could be provided by user | ||
*/ | ||
@ConfigItem(defaultValue = DEFAULT_BANNER_FILE) | ||
public String path; | ||
@WithDefault(DEFAULT_BANNER_FILE) | ||
String path(); | ||
|
||
public boolean isDefaultPath() { | ||
return DEFAULT_BANNER_FILE.equals(path); | ||
default boolean isDefaultPath() { | ||
return DEFAULT_BANNER_FILE.equals(path()); | ||
} | ||
} |
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
14 changes: 9 additions & 5 deletions
14
core/deployment/src/main/java/io/quarkus/deployment/ConfigBuildTimeConfig.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,22 +1,26 @@ | ||
package io.quarkus.deployment; | ||
|
||
import io.quarkus.runtime.annotations.ConfigDocPrefix; | ||
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; | ||
import io.smallrye.config.WithName; | ||
|
||
/** | ||
* Configuration | ||
*/ | ||
@ConfigRoot(name = ConfigItem.PARENT, phase = ConfigPhase.BUILD_TIME) | ||
@ConfigMapping(prefix = "quarkus.config") | ||
@ConfigRoot(phase = ConfigPhase.BUILD_TIME) | ||
@ConfigDocPrefix("quarkus.config") | ||
public class ConfigBuildTimeConfig { | ||
public interface ConfigBuildTimeConfig { | ||
/** | ||
* <p> | ||
* Set this to <code>true</code> to read configuration from system properties and environment variables only. This | ||
* only applies to runtime. | ||
* </p> | ||
*/ | ||
@ConfigItem(name = "config.sources.system-only", defaultValue = "false") | ||
public boolean systemOnly; | ||
@WithName("sources.system-only") | ||
@WithDefault("false") | ||
boolean systemOnly(); | ||
} |
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
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
Oops, something went wrong.