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 ...
随机推荐
- MVC 5 调用存储过程参数配置方法-Procedure or function 'UP_***' expects parameter '@****', which was not supplied.
MVC 5 调用存储过程参数配置方法-Procedure or function 'UP_***' expects parameter '@****', which was not supplied. ...
- WebApp的自动测试工具: Jenkins
一.下载并安装(msi)https://jenkins.io/download/thank-you-downloading-windows-installer-stable/ 在安装过程这, 需要从p ...
- C语言解决约瑟夫问题详解的代码
将开发过程中比较重要的一些内容做个收藏,下面的内容是关于C语言解决约瑟夫问题详解的内容,希望能对码农有帮助. #pragma once #include<vector> class PRO ...
- CentOS安装MySQL的完整步骤
1.官方安装文档 http://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/ 2.下载 Mysql yum包 http://dev.mysql.co ...
- nginx访问统计
1).根据访问IP统计UV awk '{print $1}' access.log|sort | uniq -c |wc -l 2).统计访问URL统计PV awk '{print $7}' acc ...
- GIT教程的好文章
Git 教學(1):Git的基本使用 Git 教學(2):Git Branch 的操作與基本工作流程 Git 情境劇:告訴你使用 Git 時什麼情況該下什麼指令
- C++_注释、枚举、typedef
#include<iostream> //using namespace std; int main() { /* ************************************ ...
- IIS下uploadify上传大文件出现404错误(提示上传文件大小超过400M)
原因:由于IIS7下的默认设置限制了上传大小,所以Web.Config中的大小设置也就失效了. 解决步骤: 1.打开IIS管理器,找到Default Web Site(也就是你的发布站点),先进行停止 ...
- Mac系统如何显示隐藏文件?
显示全部文件 defaults write com.apple.finder AppleShowAllFiles -bool true osascript -e 'tell application & ...
- css样式的书写顺序及原理——很重要!
记得刚开始学习前端的时候,每次写css样式都是用到什么就在样式表后添加什么,完全没有考虑到样式属性的书写顺序对网页加载代码的影响.后来逐渐才知道正确的样式顺序不仅易于查看,并且也属于css样式优化的一 ...