Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
23723 amit.gupta 1
package com.smartdukaan.cron.config;
2
 
3
import org.apache.logging.log4j.LogManager;
4
import org.apache.logging.log4j.Logger;
5
import org.springframework.boot.WebApplicationType;
6
import org.springframework.boot.autoconfigure.SpringBootApplication;
7
import org.springframework.boot.builder.SpringApplicationBuilder;
8
import org.springframework.cache.annotation.EnableCaching;
9
import org.springframework.context.annotation.Bean;
10
import org.springframework.context.annotation.ComponentScan;
11
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
12
import org.springframework.core.io.ClassPathResource;
13
import org.springframework.scheduling.annotation.EnableScheduling;
14
 
23724 amit.gupta 15
import com.smartdukaan.cron.monitored.NagiosMonitorTasks;
16
import com.smartdukaan.cron.scheduled.ScheduledTasks;
17
 
23723 amit.gupta 18
@SpringBootApplication
19
@EnableCaching
20
@EnableScheduling
21
@ComponentScan("com.smartdukaan.cron.*")
23738 amit.gupta 22
@ComponentScan("com.spice.profitmandi.*")
23723 amit.gupta 23
public class Application {
24
 
25
	private static final Logger LOGGER=LogManager.getLogger(Application.class);
26
 
27
	public static void main(String[] args) throws Throwable {
23738 amit.gupta 28
		new SpringApplicationBuilder(Application.class).web(WebApplicationType.NONE).run(args);
23723 amit.gupta 29
	}
30
 
31
	/*@Bean
32
	ServletWebServerFactory servletWebServerFactory() {
33
		return new TomcatServletWebServerFactory();
34
	}*/
35
 
36
	@Bean
23738 amit.gupta 37
	public static PropertySourcesPlaceholderConfigurer propertyConfigurer1() {
23723 amit.gupta 38
		PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer =  new PropertySourcesPlaceholderConfigurer();
39
		propertySourcesPlaceholderConfigurer.setLocation(new ClassPathResource("/META-INF/env.properties"));
40
		return propertySourcesPlaceholderConfigurer;
41
	}
42
 
43
}