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