Skip to content

Commit

Permalink
Merge pull request #5007 from poikilotherm/5006-enhance-secretdir
Browse files Browse the repository at this point in the history
FISH-788 Support sub-directories for MPCONFIG SecretDirConfigSource. #5006
  • Loading branch information
Alan authored Jan 28, 2021
2 parents 63d9d4f + 45d7a33 commit ef826d7
Show file tree
Hide file tree
Showing 7 changed files with 948 additions and 353 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,12 @@ public PayaraConfigSource() {
configService = null;
}

/**
* Should only be used for test purposes
* @param configService Usually a mocked implementation
*/
PayaraConfigSource(ConfigProviderResolverImpl configService) {
this.domainConfiguration = null;
this.configService = configService;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
import javax.inject.Inject;
import javax.inject.Named;

import fish.payara.nucleus.executorservice.PayaraExecutorService;
import org.eclipse.microprofile.config.Config;
import org.eclipse.microprofile.config.spi.ConfigBuilder;
import org.eclipse.microprofile.config.spi.ConfigProviderResolver;
Expand Down Expand Up @@ -104,7 +105,7 @@
import fish.payara.nucleus.microprofile.config.source.PayaraExpressionConfigSource;
import fish.payara.nucleus.microprofile.config.source.PayaraServerProperties;
import fish.payara.nucleus.microprofile.config.source.PropertiesConfigSource;
import fish.payara.nucleus.microprofile.config.source.SecretsDirConfigSource;
import fish.payara.nucleus.microprofile.config.source.DirConfigSource;
import fish.payara.nucleus.microprofile.config.source.ServerConfigSource;
import fish.payara.nucleus.microprofile.config.source.SystemPropertyConfigSource;
import fish.payara.nucleus.microprofile.config.source.extension.ExtensionConfigSourceService;
Expand Down Expand Up @@ -135,6 +136,10 @@ public class ConfigProviderResolverImpl extends ConfigProviderResolver implement

@Inject
private ServerContext context;

// Some sources might want to execute background tasks in a controlled fashion
@Inject
private PayaraExecutorService executorService;

// Gives access to deployed applications
@Inject
Expand Down Expand Up @@ -297,6 +302,10 @@ public ConfigBuilder getBuilder() {
return new PayaraConfigBuilder(this);
}

public PayaraExecutorService getExecutor() {
return this.executorService;
}

Config getNamedConfig(String applicationName) {
Config result = null;
ApplicationInfo info = applicationRegistry.get(applicationName);
Expand All @@ -322,7 +331,7 @@ private List<ConfigSource> getDefaultSources(String appName, String moduleName)
sources.add(new SystemPropertyConfigSource());
sources.add(new JNDIConfigSource());
sources.add(new PayaraServerProperties());
sources.add(new SecretsDirConfigSource());
sources.add(new DirConfigSource());
sources.add(new PasswordAliasConfigSource());
sources.add(new JDBCConfigSource());
if (appName != null) {
Expand Down
Loading

0 comments on commit ef826d7

Please sign in to comment.