首页 > 其他分享 >手动添加定时类手动测试

手动添加定时类手动测试

时间:2022-12-01 09:59:17浏览次数:34  
标签:String s2 s1 手动 添加 Inner import 定时 public

启动类加 @EnableScheduling 注释

package com.runshi.cloud.zhengxie.job;

import com.runshi.cloud.common.security.annotation.Inner;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("/textmessagejob" )
public class TextMessageJob {

//	@Scheduled(cron="0 */10 * * * ?")
//	@Scheduled(cron="0 */1 * * * ?")
//	@Scheduled(initialDelay = 20000, fixedDelay = 600000)
	@PostMapping("/timerMeetText")
	@Inner(false)
	public void timerMeetText(){
		String s = "1";
		String s1 = "s1";
		String s2 = "s2";
	}

	@PostMapping("/timerActionText")
	@Inner(false)
	public void timerActionText(){
		String s = "1";
		String s1 = "s1";
		String s2 = "s2";
	}

	@PostMapping("/timerNoticeText")
	@Inner(false)
	public void timerNoticeText(){
		String s = "1";
		String s1 = "s1";
		String s2 = "s2";
	}

}

标签:String,s2,s1,手动,添加,Inner,import,定时,public
From: https://www.cnblogs.com/linhan8888/p/16940510.html

相关文章

  • qtablewidget中添加按钮并信号槽
    需要在cell中增加按钮。主要代码(没写类名):voidInsertTableInfo(constQStringList&listInfo,boolbChecked){intnRowCount=ui->tableWidget->rowCount();......
  • Linux添加磁盘及如何使用
    一、系统添加磁盘步骤及命令服务器添加磁盘一共分为一下四步,我们将按以下步骤详细介绍如何在服务器上添加磁盘并使用。①添加硬件②磁盘分区③格式化磁盘④挂载磁盘1......
  • Teamcenter AWC6.2 添加分类管理模块支持
    1.安装AWC基本模块,配置搜索ConfiguretraditionalbasicclassificationIfyouhaveatraditionalbasicclasshierarchyanddatainrichclient,youcane......
  • ESXI系统盘制作及安装和添加虚拟机操作步骤
    一、先将VMware-VMvisor-Installer-7.0U2a-17867351.x86_64.iso做成系统盘1、双击打开UltraISO.exe  2、点击文件—>打开,找到EXSI镜像文件,鼠标选中,点击打开。  3......
  • Spring Boot中添加Thymeleaf模板
    SpringBoot中添加Thymeleaf模板前面我们讲解了SpringBoot项目的创建、SpringBoot结构信息,自动配置功能等,那么Springboot创建出来,我们最终是要做web开发的,所以我们这章讲......
  • Spring Boot中添加Thymeleaf模板
    SpringBoot中添加Thymeleaf模板前面我们讲解了SpringBoot项目的创建、SpringBoot结构信息,自动配置功能等,那么Springboot创建出来,我们最终是要做web开发的,所以我们这......
  • 淘淘商城商品类目展示添加缓存
    一、分析在不影响原有的逻辑上,添加缓存,分为两块,一块是执行结果后存储缓存,一块是在执行之前调用缓存二、缓存添加1.打开taotao-rest工程,找到商品类目展示的service(ItemCat......
  • 重构后台的django项目目录、配置开发环境、添加环境变量
    重构项目目录celery_task:logs:项目运行时/开发时日志目录包luffapi:项目同名文件夹apps:项目所有应用的集合文件夹libs:第三方类库的保存目录[第三方组件、模块]-包......
  • antd-design-vue的table中获取到其他列的数据,并添加样式
    获取其他列的数据{title:'价格(元)',align:"center",dataIndex:'',scopedSlots:{customRender:'price'},//customRender:(text,record)=>{......
  • springboot任务之定时任务
    1-service包下新建ScheduleService类packagecom.example.springboottask.service;importorg.springframework.scheduling.annotation.Scheduled;importorg.springf......