mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
test: TestFindByBeanNameProcessor
This commit is contained in:
parent
93d44ea07d
commit
81752dd26f
@ -0,0 +1,21 @@
|
||||
package tech.powerjob.samples.tester;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import tech.powerjob.worker.core.processor.ProcessResult;
|
||||
import tech.powerjob.worker.core.processor.TaskContext;
|
||||
import tech.powerjob.worker.core.processor.sdk.BasicProcessor;
|
||||
|
||||
/**
|
||||
* 测试直接使用 BeanName 获取处理器
|
||||
*
|
||||
* @author tjq
|
||||
* @since 2023/3/5
|
||||
*/
|
||||
@Component(value = "powerJobTestBeanNameProcessor")
|
||||
public class TestFindByBeanNameProcessor implements BasicProcessor {
|
||||
@Override
|
||||
public ProcessResult process(TaskContext context) throws Exception {
|
||||
System.out.println("======== IN =======");
|
||||
return new ProcessResult(true, "Welcome to use PowerJob~");
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user