Rev 23723 | Rev 23738 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.smartdukaan.cron.config;import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger;import org.springframework.boot.WebApplicationType;import org.springframework.boot.autoconfigure.SpringBootApplication;import org.springframework.boot.builder.SpringApplicationBuilder;import org.springframework.cache.annotation.EnableCaching;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.ComponentScan;import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;import org.springframework.core.io.ClassPathResource;import org.springframework.scheduling.annotation.EnableScheduling;import com.smartdukaan.cron.monitored.NagiosMonitorTasks;import com.smartdukaan.cron.scheduled.ScheduledTasks;@SpringBootApplication@EnableCaching@EnableScheduling@ComponentScan("com.smartdukaan.cron.*")@ComponentScan("com.spice.profitmandi.common.*")public class Application {private static final Logger LOGGER=LogManager.getLogger(Application.class);public static void main(String[] args) throws Throwable {new SpringApplicationBuilder(ScheduledTasks.class, NagiosMonitorTasks.class).web(WebApplicationType.NONE).run(args);}/*@BeanServletWebServerFactory servletWebServerFactory() {return new TomcatServletWebServerFactory();}*/@Beanpublic PropertySourcesPlaceholderConfigurer propertyConfigurer1() {PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();propertySourcesPlaceholderConfigurer.setLocation(new ClassPathResource("/META-INF/env.properties"));return propertySourcesPlaceholderConfigurer;}}