1, duplication of code
Like this data Sku (code unique), we obtain from third parties can add a unique index to the code. This prevents duplication of code
2, projects in the job
If the job execution time is not changed frequently, the simplest is @Scheduled springboot the use of a job before the company's products group, feel very convenient
@Scheduled(fixedRate=4000) Executed once every four seconds, will perform at startup @Scheduled(cron="0 0 1 * * ?") When you start does not perform daily 1:00 execution
Start classes are added @EnableScheduling
job method void
@Scheduled(cron="0 0 1 * * ?") public void snpooltask() {}