Start structural port from Spring Boot to Undertow
This commit is contained in:
@@ -24,14 +24,13 @@ import io.kamax.mxisd.util.GsonUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public abstract class SqlConfig {
|
||||
|
||||
private transient Logger log = LoggerFactory.getLogger(SqlConfig.class);
|
||||
private transient final Logger log = LoggerFactory.getLogger(SqlConfig.class);
|
||||
|
||||
public static class Query {
|
||||
|
||||
@@ -283,7 +282,6 @@ public abstract class SqlConfig {
|
||||
|
||||
protected abstract String getProviderName();
|
||||
|
||||
@PostConstruct
|
||||
public void build() {
|
||||
if (getAuth().isEnabled() == null) {
|
||||
getAuth().setEnabled(isEnabled());
|
||||
|
||||
@@ -21,13 +21,7 @@
|
||||
package io.kamax.mxisd.config.sql.generic;
|
||||
|
||||
import io.kamax.mxisd.config.sql.SqlConfig;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
|
||||
@Configuration
|
||||
@ConfigurationProperties("sql")
|
||||
@Primary
|
||||
public class GenericSqlProviderConfig extends SqlConfig {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,13 +23,7 @@ package io.kamax.mxisd.config.sql.synapse;
|
||||
import io.kamax.mxisd.backend.sql.synapse.SynapseQueries;
|
||||
import io.kamax.mxisd.config.sql.SqlConfig;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
@Configuration
|
||||
@ConfigurationProperties("synapseSql")
|
||||
public class SynapseSqlProviderConfig extends SqlConfig {
|
||||
|
||||
@Override
|
||||
@@ -37,8 +31,9 @@ public class SynapseSqlProviderConfig extends SqlConfig {
|
||||
return "Synapse SQL";
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
public void doBuild() {
|
||||
public void build() {
|
||||
super.build();
|
||||
|
||||
getAuth().setEnabled(false); // Synapse does the auth, we only act as a directory/identity service.
|
||||
|
||||
// FIXME check that the DB is not the mxisd one
|
||||
|
||||
Reference in New Issue
Block a user