Spring Scheduled定时任务报错 java.lang.IllegalStateException: Encountered invalid @Scheduled method 'xxx': For input string: "2S"
报错信息如下:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dingTalkMessagePump' defined in file [F:\workspace\NEWSRC\WebContent\WEB-INF\classes\artifacts\ERP_Web_exploded\WEB-INF\classes\com\xxx\softprojectmanage\utils\DingTalkMessagePump.class]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: Encountered invalid @Scheduled method 'gzyqtjList': For input string: "2S"
错误代码
/***
* 每周2-6早上上班前(08:00)统计任务有延期的员工,并发送通知
*/
@Scheduled(cron = "0 0 8 ? * TUES-SAT")
public void gzyqtjList() {
正确代码
/***
* 每周2-6早上上班前(08:00)统计任务有延期的员工,并发送通知
*/
@Scheduled(cron = "0 0 8 ? * TUE-SAT")
public void gzyqtjList() {
周二用TUE而不是TUES
Spring Scheduled定时任务报错 java.lang.IllegalStateException: Encountered invalid @Scheduled method 'xxx': For input string: "2S"的更多相关文章
- Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]
1 报错描述 java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @Boot ...
- 云笔记项目- 上传文件报错"java.lang.IllegalStateException: File has been moved - cannot be read again"
在做文件上传时,当写入上传的文件到文件时,会报错“java.lang.IllegalStateException: File has been moved - cannot be read again ...
- eclipse启动报错java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' befo
报错: java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invo ...
- 解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level
解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level 学习了:https://blog.csdn. ...
- springboot测试启动报错java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test
springboot测试启动报错: java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you ne ...
- spring mvc处理http请求报错:java.lang.IllegalStateException: getInputStream() has already been called for this request
发送post请求到controller处理失败,报错日志如下: java.lang.IllegalStateException: getInputStream() has already been c ...
- springboot 启动报错 java.lang.IllegalStateException: Failed to introspect annotated methods on class org
. ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ...
- spring低版本报错:java.lang.IllegalStateException: Context namespace element ‘annotation-config’ and its parser class [*] are only available on
参考来源:http://blog.csdn.net/sunxiaoyu94/article/details/50492083 使用spring低版本(2.5.6),使用jre 8发现错误: Unexp ...
- Idea 的Test测试报错:java.lang.IllegalStateException: Failed to load ApplicationContext
因为在Test里面使用了注解@Autowired 引入来至bean.xml文件的内容 ,而在Test没有没有办法自动引入,需要在Test类上加上注解 @ContextConfiguration(loc ...
随机推荐
- gradle指定相应JDK编译
转载请注明出处: http://blog.csdn.net/sanyinchen/article/details/50901582 问题描述: 电脑中装有多个jdk版本,可能默认的jdk是1.6,但是 ...
- gentoo 画框架图,流程图
需要话框架图,流程图的时候,只需要安装 dia 软件就可以了.
- DBUtils工具类
import java.io.IOException; import java.io.InputStream; import java.sql.Connection; import java.sql. ...
- Java JTable列顺序和列宽度保存在用户本地
上周碰到了一个棘手的需求,就是要把用JTable的列顺序和列宽度保存下来,这次用户调整了列宽度,关闭程序,下次再打开时,这个列的宽还是要保持,因为SWing的特性,都是在程序启动时就确定了列顺序和列宽 ...
- DatakeyNames和datakey
DataKey 类用于表示数据绑定控件中某个记录的主键.记录的主键可以由数据源中的一个或多个字段组成.尽管 DataKey 类不是集合,但它可以存储多个键字段值.当调用 DataKey 类的某个构造函 ...
- [转]再识Cortex-M3之堆栈
原地址https://blog.csdn.net/liaoxu02/article/details/48107651 Cortex-M3拥有通用寄存器R0-R15以及一些特殊功能寄存器.R0-R12是 ...
- java高并发实战(三)——Java内存模型和线程安全
转自:https://blog.csdn.net/gududedabai/article/details/80816488
- POC iis短文件名
__author__ = '*'# -*- coding:utf-8 -*- from lib.httpparse import httpparse def verify(protocol,ip,po ...
- Java小白不走弯路学习Java流程以及学习误区
学习Java编程技术肯定是以就业拿到高薪工作为主要目的的,可是高薪不会那么轻易拿到,这是一个最简单的道理.没有付出就没有回报,在整个学习Java编程技术的过程中,你需要付出时间.精力.金钱.废话不多说 ...
- 44_redux_comment应用_redux版本_同步功能
项目结构: components里面的东西没变,将app.jsx移动至containers中 /* * 包含所有action的type名称常量 * */ //添加评论 export const ADD ...