mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-08 04:39:00 +08:00
✨ Introducing new features.add RestTaskDemo
This commit is contained in:
1 parent
66fe8edc6f
commit
3c4a3a5164
3 files changed
+34
-2
No files matched your search
@@ -9,7 +9,7 @@ security:
|
||||
ignore-urls:
|
||||
- /actuator/**
|
||||
- /v2/api-docs
|
||||
- /innerjob/**
|
||||
- /inner-job/**
|
||||
|
||||
# 数据源配置
|
||||
spring:
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.pig4cloud.pigx.daemon.quartz.task;
|
||||
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
import com.pig4cloud.pigx.daemon.quartz.constant.enums.PigxQuartzEnum;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 用于测试REST风格调用的demo
|
||||
*
|
||||
* @author lishangbu
|
||||
* @date 2019/3/25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/inner-job")
|
||||
@Slf4j
|
||||
public class RestTaskDemo {
|
||||
/**
|
||||
* 测试REST风格调用定时任务的演示方法
|
||||
*/
|
||||
@GetMapping("/{param}")
|
||||
public R demoMethod(@PathVariable("param") String param) {
|
||||
log.info("测试于:{},传入参数{}", LocalDateTime.now(), param);
|
||||
return R.builder().build();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -30,7 +30,7 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
@Slf4j
|
||||
@Component("demo")
|
||||
public class Demo {
|
||||
public class SpringBeanTaskDemo {
|
||||
/**
|
||||
* 测试Spring Bean的演示方法
|
||||
*/
|
||||
Reference in new issue
Block a user