diff options
author | Ittay Stern <ittay.stern@att.com> | 2019-01-10 12:42:59 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-01-10 12:42:59 +0000 |
commit | 659874df80409170e57b6dd6197eb3a81eb3468e (patch) | |
tree | 08e79fd57aa0ed299586fd88f69f87a5a2f5ded1 /epsdk-app-onap | |
parent | 143784a849ece4fc35cc290e33f829b72bf1fc79 (diff) | |
parent | 6ad41e3ccd398a2721f41ad61c80b7bb03f7d127 (diff) |
Merge "Merge from ECOMP's repository"
Diffstat (limited to 'epsdk-app-onap')
3 files changed, 18 insertions, 34 deletions
diff --git a/epsdk-app-onap/pom.xml b/epsdk-app-onap/pom.xml index fb80e2409..f2441b357 100755 --- a/epsdk-app-onap/pom.xml +++ b/epsdk-app-onap/pom.xml @@ -127,7 +127,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>2.19.1</version> + <version>2.22.1</version> <configuration> <includes> <include>**/Test*.java</include> @@ -205,7 +205,7 @@ </dependencies> </plugin> <plugin> - <groupId>org.sonarsource.scanner.maven</groupId> + <groupId>org.sonarsource.scanner.maven</groupId> <artifactId>sonar-maven-plugin</artifactId> <version>3.3.0.603</version> </plugin> diff --git a/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java b/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java index 0c6fba9a7..3fa083966 100644 --- a/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java +++ b/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java @@ -37,11 +37,6 @@ */ package org.onap.portalapp.conf; -import java.util.ArrayList; -import java.util.List; - -import javax.sql.DataSource; - import org.onap.portalapp.login.LoginStrategyImpl; import org.onap.portalapp.scheduler.RegistryAdapter; import org.onap.portalsdk.core.auth.LoginStrategy; @@ -54,13 +49,11 @@ import org.onap.portalsdk.core.util.CacheManager; import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.DependsOn; -import org.springframework.context.annotation.Import; -import org.springframework.context.annotation.Profile; -import org.springframework.context.annotation.PropertySource; +import org.springframework.context.annotation.*; +import org.springframework.core.io.Resource; +import org.springframework.jdbc.datasource.init.DataSourceInitializer; +import org.springframework.jdbc.datasource.init.DatabasePopulator; +import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.quartz.SchedulerFactoryBean; @@ -70,10 +63,10 @@ import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; -import org.springframework.core.io.Resource; -import org.springframework.jdbc.datasource.init.DataSourceInitializer; -import org.springframework.jdbc.datasource.init.DatabasePopulator; -import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator; + +import javax.sql.DataSource; +import java.util.ArrayList; +import java.util.List; /** * ONAP Portal SDK sample application. Extends core AppConfig class to @@ -86,6 +79,7 @@ import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator; @Profile("src") @EnableAsync @EnableScheduling +@EnableAspectJAutoProxy(proxyTargetClass=true) public class ExternalAppConfig extends AppConfig implements Configurable { private RegistryAdapter schedulerRegistryAdapter; @@ -177,18 +171,12 @@ public class ExternalAppConfig extends AppConfig implements Configurable { * populates it with triggers. * * @return New instance of {@link SchedulerFactoryBean} - * @throws Exception */ - @Bean // ANNOTATION COMMENTED OUT - // APPLICATIONS REQUIRING QUARTZ SHOULD RESTORE ANNOTATION - @DependsOn("dataSourceInitializer") - public SchedulerFactoryBean schedulerFactoryBean() throws Exception { - SchedulerFactoryBean scheduler = new SchedulerFactoryBean(); - scheduler.setTriggers(schedulerRegistryAdapter.getTriggers()); - scheduler.setConfigLocation(appApplicationContext.getResource("WEB-INF/conf/quartz.properties")); - scheduler.setDataSource(dataSource()); - scheduler.setJobFactory(new SpringBeanJobFactory()); - return scheduler; + @Bean + public SchedulerFactoryBean schedulerFactoryBean() { + SchedulerFactoryBean schedulerFactory = new SchedulerFactoryBean(); + schedulerFactory.setJobFactory(new SpringBeanJobFactory()); + return schedulerFactory; } diff --git a/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java b/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java index 93e867d63..dc6973fef 100644 --- a/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java +++ b/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java @@ -37,12 +37,8 @@ */ package org.onap.portalapp.conf; -import org.onap.vid.controllers.ChangeManagementController; -import org.onap.vid.controllers.MaintenanceController; -import org.onap.vid.controllers.RoleGeneratorController; import org.onap.portalsdk.core.conf.AppInitializer; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; + import java.util.TimeZone; public class ExternalAppInitializer extends AppInitializer { |