package com.ruoyi.ucp.util;

import org.springframework.stereotype.Component;

/**
 * 定时任务调度测试
 *
 * @author ruoyi
 */
@Component("myTask")
public class MyTask {
    //@Resource
    //private ScriptEngine engine;

    public void myParams(String params) {
        try {
            //String javaCode = GlueFactory.getJavaGlue().replace("//此处加运行方法", "jobHandler." + params + "();");
            //IJobHandler jobHandler = GlueFactory.getInstance().loadNewInstance(javaCode);
            //jobHandler.setFunctionHandler(MyJobHandler.jobHandler);
            //jobHandler.execute();
            System.out.println("执行有参方法：" + params);
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("执行有参方法：" + params + "失败！");
        }
    }
}
