bug and thinking ferrero 2 project

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() {}

 

Guess you like

Origin www.cnblogs.com/lyon91/p/11301215.html