anderx %!s(int64=6) %!d(string=hai) anos
pai
achega
b3458ae3fb
Modificáronse 1 ficheiros con 6 adicións e 4 borrados
  1. 6 4
      src/main/java/com/goafanti/common/task/PatentTask.java

+ 6 - 4
src/main/java/com/goafanti/common/task/PatentTask.java

@@ -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();