|
|
@@ -12,6 +12,8 @@ import javax.annotation.Resource;
|
|
|
import javax.mail.MessagingException;
|
|
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
@@ -30,8 +32,8 @@ import com.goafanti.patent.service.PatentNewService;
|
|
|
|
|
|
|
|
|
|
|
|
-//@Component
|
|
|
-@Controller
|
|
|
+@Component
|
|
|
+//@Controller
|
|
|
public class PatentTask {
|
|
|
@Resource
|
|
|
private PatentNewService patentNewService;
|
|
|
@@ -53,8 +55,8 @@ public class PatentTask {
|
|
|
|
|
|
|
|
|
|
|
|
- //@Scheduled(cron = "0 0 0 * * ?")
|
|
|
- @RequestMapping(value = "/open/patentRemind", method = RequestMethod.GET)
|
|
|
+ @Scheduled(cron = "0 0 0 * * ?")
|
|
|
+// @RequestMapping(value = "/open/patentRemind", method = RequestMethod.GET)
|
|
|
public void patentRemind() {
|
|
|
LoggerUtils.debug(getClass(), "开始检查专利提醒");
|
|
|
List<PatentNew> l=patentNewService.AllselectStartPatentNew();
|