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
 
15
@SpringBootApplication
16
@EnableCaching
17
@EnableScheduling
18
@ComponentScan("com.smartdukaan.cron.*")
19
@ComponentScan("com.spice.profitmandi.common.*")
20
public class Application {
21
 
22
	private static final Logger LOGGER=LogManager.getLogger(Application.class);
23
 
24
	public static void main(String[] args) throws Throwable {
25
		new SpringApplicationBuilder(ScheduledTasks.class, NagiosMonitorTasks.class).web(WebApplicationType.NONE).run(args);
26
	}
27
 
28
	/*@Bean
29
	ServletWebServerFactory servletWebServerFactory() {
30
		return new TomcatServletWebServerFactory();
31
	}*/
32
 
33
	@Bean
34
	public PropertySourcesPlaceholderConfigurer propertyConfigurer1() {
35
		PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer =  new PropertySourcesPlaceholderConfigurer();
36
		propertySourcesPlaceholderConfigurer.setLocation(new ClassPathResource("/META-INF/env.properties"));
37
		return propertySourcesPlaceholderConfigurer;
38
	}
39
 
40
}