From b9e6751d60d4415dfabc986ee444e079bcac17c3 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 28 Feb 2018 13:59:29 +0100 Subject: activate postgresql solution as default for unofficial moa-id-3.3.2_postgresql release --- .../moa/id/configuration/config/ConfigurationProvider.java | 7 +++++++ .../at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java | 8 ++++++++ pom.xml | 8 ++++---- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java index abde2089d..1ca5bcc2c 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/ConfigurationProvider.java @@ -138,6 +138,13 @@ public class ConfigurationProvider { fis = new FileInputStream(propertiesFile); props.load(fis); fis.close(); + + //Workaround -> can be removed in next version + if (MiscUtil.isEmpty(System.getProperty("spring.profiles.active"))) { + log.info("Set System-Property to activate 'byteBased' config values"); + System.setProperty("spring.profiles.active", "byteBasedConfig"); + + } //initialize generic SpringContext to set profiles GenericApplicationContext rootContext = new GenericApplicationContext(); diff --git a/id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java b/id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java index bf0273898..8ed654692 100644 --- a/id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java +++ b/id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java @@ -26,6 +26,7 @@ import at.gv.egiz.components.spring.api.SpringLoader; import at.gv.egovernment.moa.id.commons.api.ConfigurationProvider; import at.gv.egovernment.moa.id.commons.utils.MOAIDMessageProvider; import at.gv.egovernment.moa.logging.Logger; +import at.gv.egovernment.moa.util.MiscUtil; /** * Web application initializer @@ -57,6 +58,13 @@ public class MOAIDAuthSpringInitializer implements WebApplicationInitializer { @Override public void onStartup(ServletContext servletContext) throws ServletException { try { + //Workaround -> can be removed in next version + if (MiscUtil.isEmpty(System.getProperty("spring.profiles.active"))) { + Logger.info("Set System-Property to activate 'byteBased' config values"); + System.setProperty("spring.profiles.active", "byteBasedConfig"); + + } + Logger.info("=============== Loading Config Root Context! ==============="); ApplicationContext cfgRootContext = new ClassPathXmlApplicationContext(new String[] { diff --git a/pom.xml b/pom.xml index 3716d4382..4b02d786f 100644 --- a/pom.xml +++ b/pom.xml @@ -22,14 +22,14 @@ --> - 3.3.3-Snapshot + 3.3.2_postgresql - 3.3.3-Snapshot - 3.3.3-Snapshot + 3.3.2_postgresql + 3.3.2_postgresql 2.0.1 - 2.4.2-Snapshot + 2.4.1_postgresql 2.0.6 1.3 -- cgit v1.2.3