You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by se...@apache.org on 2021/03/04 07:51:40 UTC

[openmeetings] 03/03: OPENMEETINGS-2585 Fix issue for Bean initialisation.

This is an automated email from the ASF dual-hosted git repository.

sebawagner pushed a commit to branch feature/OPENMEETINGS-2585-IKurentoHandler-class
in repository https://gitbox.apache.org/repos/asf/openmeetings.git

commit 0d40b2b23bdf557864e1078481b5c2ba91aecf2b
Author: Sebastian Wagner <se...@gmail.com>
AuthorDate: Thu Mar 4 20:51:13 2021 +1300

    OPENMEETINGS-2585 Fix issue for Bean initialisation.
---
 .../org/apache/openmeetings/db/dao/basic/ConfigurationDao.java   | 6 ++----
 .../src/main/webapp/WEB-INF/classes/applicationContext.xml       | 9 +++++----
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java b/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java
index 3bcc3a8..a0e238f 100644
--- a/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java
+++ b/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/basic/ConfigurationDao.java
@@ -19,6 +19,7 @@
 package org.apache.openmeetings.db.dao.basic;
 
 import static org.apache.commons.lang3.math.NumberUtils.toInt;
+import static org.apache.openmeetings.db.util.ApplicationHelper.ensureApplication;
 import static org.apache.openmeetings.db.util.DaoHelper.setLimits;
 import static org.apache.openmeetings.util.OpenmeetingsVariables.*;
 import static org.apache.openmeetings.util.Version.getLine;
@@ -41,7 +42,6 @@ import org.apache.openjpa.event.RemoteCommitProvider;
 import org.apache.openjpa.event.TCPRemoteCommitProvider;
 import org.apache.openjpa.persistence.OpenJPAEntityManagerSPI;
 import org.apache.openjpa.persistence.OpenJPAPersistence;
-import org.apache.openmeetings.IApplication;
 import org.apache.openmeetings.db.dao.IDataProviderDao;
 import org.apache.openmeetings.db.dao.server.OAuth2Dao;
 import org.apache.openmeetings.db.dao.user.UserDao;
@@ -88,8 +88,6 @@ public class ConfigurationDao implements IDataProviderDao<Configuration> {
 	private UserDao userDao;
 	@Autowired
 	private OAuth2Dao oauthDao;
-	@Autowired
-	private IApplication app;
 
 	public void updateClusterAddresses(String addresses) throws UnknownHostException {
 		OpenJPAConfiguration cfg = ((OpenJPAEntityManagerSPI)OpenJPAPersistence.cast(em)).getConfiguration();
@@ -606,7 +604,7 @@ public class ConfigurationDao implements IDataProviderDao<Configuration> {
 			addCspRule(cspConfig, CSPDirective.MEDIA_SRC, getCspMediaSrc());
 			addCspRule(cspConfig, CSPDirective.SCRIPT_SRC, getCspScriptSrc());
 			addCspRule(cspConfig, CSPDirective.STYLE_SRC, getCspStyleSrc());
-			app.getWsUrls().forEach(wsUrl -> addCspRule(cspConfig, CSPDirective.CONNECT_SRC, wsUrl, false)); // special code for Safari browser
+			ensureApplication().getWsUrls().forEach(wsUrl -> addCspRule(cspConfig, CSPDirective.CONNECT_SRC, wsUrl, false)); // special code for Safari browser
 			if (!Strings.isEmpty(getGaCode())) {
 				// https://developers.google.com/tag-manager/web/csp#universal_analytics_google_analytics
 				addCspRule(cspConfig, CSPDirective.IMG_SRC, "https://www.google-analytics.com");
diff --git a/openmeetings-web/src/main/webapp/WEB-INF/classes/applicationContext.xml b/openmeetings-web/src/main/webapp/WEB-INF/classes/applicationContext.xml
index c9eb5e6..cf9702c 100644
--- a/openmeetings-web/src/main/webapp/WEB-INF/classes/applicationContext.xml
+++ b/openmeetings-web/src/main/webapp/WEB-INF/classes/applicationContext.xml
@@ -45,10 +45,6 @@
 	End annotation -->
 	<context:component-scan base-package="org.apache.openmeetings" />
 	
-	<!--  Kurento Handlers -->
-	<bean id="kHandler" class="org.apache.openmeetings.core.remote.KurentoHandler" />
-	<bean id="streamProcessor" class="org.apache.openmeetings.core.remote.StreamProcessorr" />
-
 	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
 		p:location="classpath:openmeetings.properties" />
 
@@ -135,4 +131,9 @@
 		<property name="maxPoolSize" value="10" />
 		<property name="queueCapacity" value="25" />
 	</bean>
+
+	<!--  Kurento Handlers -->
+	<bean id="kHandler" class="org.apache.openmeetings.core.remote.KurentoHandler" />
+	<bean id="streamProcessor" class="org.apache.openmeetings.core.remote.StreamProcessor" />
+
 </beans>