Subversion Repositories SmartDukaan

Rev

Rev 23738 | Rev 23898 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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