diff options
author | 2018-07-10 14:20:54 +0300 | |
---|---|---|
committer | 2018-07-10 14:20:54 +0300 | |
commit | c72d565bb58226b20625b2bce5f0019046bee649 (patch) | |
tree | 8658e49595705b02e47ddc14afa20d6bb7123547 /epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java | |
parent | ef8a6b47847012fd59ea20da21d8d3d7c4a301ed (diff) |
Merge 1806 code of vid-common
Change-Id: I75d52abed4a24dfe3827d79edc4a2938726aa87a
Issue-ID: VID-208
Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
Diffstat (limited to 'epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java')
-rw-r--r-- | epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java | 21 |
1 files changed, 20 insertions, 1 deletions
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 2d222f0dc..9cf5df548 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 @@ -63,6 +63,8 @@ import org.springframework.context.annotation.PropertySource; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.quartz.SchedulerFactoryBean; +import org.springframework.scheduling.quartz.SpringBeanJobFactory; +import org.springframework.web.multipart.commons.CommonsMultipartResolver; import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; @@ -176,13 +178,14 @@ public class ExternalAppConfig extends AppConfig implements Configurable { * @return New instance of {@link SchedulerFactoryBean} * @throws Exception */ - // @Bean // ANNOTATION COMMENTED OUT + @Bean // ANNOTATION COMMENTED OUT // APPLICATIONS REQUIRING QUARTZ SHOULD RESTORE ANNOTATION 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; } @@ -218,6 +221,14 @@ public class ExternalAppConfig extends AppConfig implements Configurable { return populator; } + + /*@Bean + public SpringLiquibase liquibaseBean(DataSource dataSource) { + SpringLiquibase springLiquibase = new SpringLiquibase(); + springLiquibase.setDataSource(dataSource); + springLiquibase.setChangeLog("classpath:db-master-changelog.xml"); + return springLiquibase; + }*/ /** * Sets the scheduler registry adapter. @@ -233,4 +244,12 @@ public class ExternalAppConfig extends AppConfig implements Configurable { public LoginStrategy loginStrategy() { return new LoginStrategyImpl(); } + + @Bean + public CommonsMultipartResolver multipartResolver() { + CommonsMultipartResolver resolver=new CommonsMultipartResolver(); + resolver.setDefaultEncoding("utf-8"); + return resolver; + } + } |