| Line 1... |
Line 1... |
| 1 |
package com.smartdukaan.cron;
|
1 |
package com.smartdukaan.cron;
|
| 2 |
|
2 |
|
| - |
|
3 |
import java.util.ArrayList;
|
| 3 |
import java.util.Formatter;
|
4 |
import java.util.Formatter;
|
| 4 |
import java.util.List;
|
5 |
import java.util.List;
|
| 5 |
import java.util.Properties;
|
6 |
import java.util.Properties;
|
| 6 |
|
7 |
|
| 7 |
import org.apache.logging.log4j.LogManager;
|
8 |
import org.apache.logging.log4j.LogManager;
|
| Line 16... |
Line 17... |
| 16 |
import org.springframework.context.annotation.Bean;
|
17 |
import org.springframework.context.annotation.Bean;
|
| 17 |
import org.springframework.context.annotation.ComponentScan;
|
18 |
import org.springframework.context.annotation.ComponentScan;
|
| 18 |
import org.springframework.context.annotation.Primary;
|
19 |
import org.springframework.context.annotation.Primary;
|
| 19 |
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
20 |
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
| 20 |
import org.springframework.core.io.ClassPathResource;
|
21 |
import org.springframework.core.io.ClassPathResource;
|
| - |
|
22 |
import org.springframework.http.converter.ByteArrayHttpMessageConverter;
|
| - |
|
23 |
import org.springframework.http.converter.HttpMessageConverter;
|
| 21 |
import org.springframework.mail.javamail.JavaMailSender;
|
24 |
import org.springframework.mail.javamail.JavaMailSender;
|
| 22 |
import org.springframework.mail.javamail.JavaMailSenderImpl;
|
25 |
import org.springframework.mail.javamail.JavaMailSenderImpl;
|
| 23 |
import org.springframework.scheduling.annotation.EnableScheduling;
|
26 |
import org.springframework.scheduling.annotation.EnableScheduling;
|
| - |
|
27 |
import org.springframework.web.client.RestTemplate;
|
| 24 |
|
28 |
|
| 25 |
import com.smartdukaan.cron.migrations.RunOnceTasks;
|
29 |
import com.smartdukaan.cron.migrations.RunOnceTasks;
|
| 26 |
import com.smartdukaan.cron.scheduled.ScheduledTasks;
|
30 |
import com.smartdukaan.cron.scheduled.ScheduledTasks;
|
| 27 |
import com.spice.profitmandi.dao.entity.fofo.SaleHeadDetails;
|
31 |
import com.spice.profitmandi.dao.entity.fofo.SaleHeadDetails;
|
| 28 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
32 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
| Line 87... |
Line 91... |
| 87 |
javaMailProperties.put("mail.transport.protocol", "smtp");
|
91 |
javaMailProperties.put("mail.transport.protocol", "smtp");
|
| 88 |
javaMailProperties.put("mail.debug", "true");// Prints out everything on screen
|
92 |
javaMailProperties.put("mail.debug", "true");// Prints out everything on screen
|
| 89 |
mailSender.setJavaMailProperties(javaMailProperties);
|
93 |
mailSender.setJavaMailProperties(javaMailProperties);
|
| 90 |
return mailSender;
|
94 |
return mailSender;
|
| 91 |
}
|
95 |
}
|
| - |
|
96 |
|
| - |
|
97 |
@Bean
|
| - |
|
98 |
public RestTemplate restTemplate() {
|
| - |
|
99 |
List<HttpMessageConverter<?>> messageConverters = new ArrayList<HttpMessageConverter<?>>();
|
| - |
|
100 |
messageConverters.add(new ByteArrayHttpMessageConverter());
|
| - |
|
101 |
|
| - |
|
102 |
return new RestTemplate(messageConverters);
|
| - |
|
103 |
}
|
| 92 |
|
104 |
|
| 93 |
@Autowired
|
105 |
@Autowired
|
| 94 |
private RunOnceTasks runOnceTasks;
|
106 |
private RunOnceTasks runOnceTasks;
|
| 95 |
|
107 |
|
| 96 |
@Autowired
|
108 |
@Autowired
|