public static class DatabaseConfig { @SingleValue private String alias; public String getAlias() { return alias; } public DatabaseConfig setAlias(String alias) { this.alias = alias; return this; } } }
public static class ItemCacheConfig { @SingleValue private boolean enabled = true; private String name; public boolean isEnabled() { return enabled; } public ItemCacheConfig setEnabled(boolean enabled) { this.enabled = enabled; return this; } public String getName() { return name; } public ItemCacheConfig setName(String name) { this.name = name; return this; } } }
public static class UserConfig { @SingleValue private String password = ""; private Set<String> roles = new HashSet<>(); public String getPassword() { return password; } public UserConfig setPassword(String password) { this.password = password; return this; } public Set<String> getRoles() { return Collections.unmodifiableSet(roles); } public UserConfig addRole(String role) { this.roles.add(role); return this; } }
public static class AliasConfig { @SingleValue private String password; private String qualifier; public String getPassword() { return password; } public AliasConfig setPassword(String password) { this.password = password; return this; } public String getQualifier() { return qualifier; } public AliasConfig setQualifier(String qualifier) { this.qualifier = qualifier; return this; } } }
public static class LoggerConfig { @SingleValue private Level level = Level.INFO; private boolean additive = true; public Level getLevel() { return level; } public LoggerConfig setLevel(Level level) { this.level = level; return this; } public boolean isAdditive() { return additive; } public LoggerConfig setAdditive(boolean additive) { this.additive = additive; return this; } } }
public static class RealmConfig { @SingleValue private String name; private String roleMapper; private String permissionResolver; public String getName() { return name; } public RealmConfig setName(String name) { this.name = name; return this; } public String getRoleMapper() { return roleMapper; } public RealmConfig setRoleMapper(String roleMapper) { this.roleMapper = roleMapper; return this; } public String getPermissionResolver() { return permissionResolver; } public RealmConfig setPermissionResolver(String permissionResolver) { this.permissionResolver = permissionResolver; return this; } }
public static class CertificateConfig { private String resource; @SingleValue private String file;
public static class DataSourceConfig { @SingleValue private boolean enabled = true; @NotNull private FlywayConfigOptions options = new FlywayConfigOptions(); public boolean isEnabled() { return enabled; } public DataSourceConfig setEnabled(boolean enabled) { this.enabled = enabled; return this; } public FlywayConfigOptions getOptions() { return options; } public DataSourceConfig setOptions(FlywayConfigOptions options) { this.options = options; return this; } } }
public static class PoolConfig { @SingleValue private boolean enabled = false; private int coreSize = 1;
@Config("sessions") public static class SessionsConfig { private static final int DEFAULT_SESSION_TIMEOUT = 1000 * 60 * 15; @SingleValue private int timeout = DEFAULT_SESSION_TIMEOUT; public int getTimeout() { return timeout; } public SessionsConfig setTimeout(int timeout) { this.timeout = timeout; return this; } } }
@Config("cors") public static class CORSConfig { @SingleValue private boolean enabled; private String path = "/*"; private Map<String, String> properties = new HashMap<>(); public boolean isEnabled() { return enabled; } public String getPath() { return path; } public Map<String, String> getProperties() { return properties; } }
@Config("metrics") public static class MetricsConfig { @SingleValue private boolean enabled = true; private String servletPath = "/hystrix.stream"; public boolean isEnabled() { return enabled; } public MetricsConfig setEnabled(boolean enabled) { this.enabled = enabled; return this; } public String getServletPath() { return servletPath; } public MetricsConfig setServletPath(String servletPath) { this.servletPath = servletPath; return this; } } }
@Config("jta") public static class JtaConfig { private static final String DEFAULT_USER_TRANSACTION_NAME = "java:comp/UserTransaction"; @SingleValue private String txManagerName; private String userTxName = DEFAULT_USER_TRANSACTION_NAME; public String getTxManagerName() { return txManagerName; } public JtaConfig setTxManagerName(String txManagerName) { this.txManagerName = txManagerName; return this; } public String getUserTxName() { return userTxName; } public JtaConfig setUserTxName(String userTxName) { this.userTxName = userTxName; return this; } } }
@Config("authentication") public static class AuthenticationConfig { @SingleValue private Class<? extends AuthenticationStrategy> strategy = AtLeastOneSuccessfulStrategy.class; private Class<? extends Authenticator> authenticator = ModularRealmAuthenticator.class; private Class<? extends CredentialsMatcher> credentialsMatcher = SimpleCredentialsMatcher.class; public Class<? extends Authenticator> getAuthenticator() { return authenticator; } public AuthenticationConfig setAuthenticator(Class<? extends Authenticator> authenticator) { this.authenticator = authenticator; return this; } public Class<? extends AuthenticationStrategy> getStrategy() { return strategy; } public AuthenticationConfig setStrategy( Class<? extends AuthenticationStrategy> strategy) { this.strategy = strategy; return this; } public Class<? extends CredentialsMatcher> getCredentialsMatcher() { return credentialsMatcher; } public AuthenticationConfig setCredentialsMatcher(Class<? extends CredentialsMatcher> credentialsMatcher) { this.credentialsMatcher = credentialsMatcher; return this; } }
@NotNull private ProxyMode mode = ProxyMode.AUTO; @SingleValue private String httpProxy; private String httpsProxy;
@Config("transaction") public class TransactionConfig { @SingleValue private Class<? extends TransactionManager> manager; private Class<? extends TransactionHandler<?>> defaultHandler;
@Config("sessions") public static class SessionConfig { @SingleValue private boolean enabled = true; private long timeout = 60 * 15;
private static final int DEFAULT_BUFFER_SIZE = 65535; @SingleValue private boolean enabled = true; private int bufferSize = DEFAULT_BUFFER_SIZE;
@Config("cache") public static class CacheConfig { @SingleValue private boolean enabled = true; private ItemCacheConfig authentication = new ItemCacheConfig();
@Config("logging") public class LoggingConfig { @SingleValue @NotNull private Level level = Level.INFO;