| 23755 |
amit.gupta |
1 |
package com.smartdukaan.cron;
|
| 23723 |
amit.gupta |
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 |
|
| 23723 |
amit.gupta |
16 |
@SpringBootApplication
|
|
|
17 |
@EnableCaching
|
|
|
18 |
@EnableScheduling
|
| 23755 |
amit.gupta |
19 |
@ComponentScan("com.smartdukaan.cron.*, com.spice.profitmandi.common.*")
|
| 23723 |
amit.gupta |
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 {
|
| 23738 |
amit.gupta |
25 |
new SpringApplicationBuilder(Application.class).web(WebApplicationType.NONE).run(args);
|
| 23723 |
amit.gupta |
26 |
}
|
|
|
27 |
|
|
|
28 |
@Bean
|
| 23738 |
amit.gupta |
29 |
public static PropertySourcesPlaceholderConfigurer propertyConfigurer1() {
|
| 23755 |
amit.gupta |
30 |
LOGGER.info("Called Configuration");
|
| 23723 |
amit.gupta |
31 |
PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();
|
|
|
32 |
propertySourcesPlaceholderConfigurer.setLocation(new ClassPathResource("/META-INF/env.properties"));
|
|
|
33 |
return propertySourcesPlaceholderConfigurer;
|
|
|
34 |
}
|
|
|
35 |
|
|
|
36 |
}
|