This commit is contained in:
redkale
2024-06-29 12:16:50 +08:00
parent f9d762534d
commit def85ca1ac
4 changed files with 93 additions and 87 deletions

View File

@@ -139,7 +139,7 @@ public class CachedManagerService implements CachedManager, CachedActionFunc, Se
* 检查name是否含特殊字符
*
* @param value 参数
* @return
* @return value
*/
protected String checkSchema(String value) {
if (value != null && !value.isEmpty()) {

View File

@@ -8,7 +8,7 @@ import java.util.concurrent.TimeUnit;
import org.redkale.service.LoadMode;
/**
* 定时任务标记只能作用于Service的无参数或者单一ScheduleEvent参数的菲static方法上, 功能类似Spring里的Scheduled注解
* 定时任务标记只能作用于Service的无参数或者单一{@link org.redkale.scheduled.ScheduledEvent}参数的菲static方法上, 功能类似Spring里的Scheduled注解
*
* <p>详情见: https://redkale.org
*

View File

@@ -36,7 +36,13 @@ public final class ScheduledEvent {
public <T> T getJson(String name, Type type) {
Object obj = get(name);
return obj == null ? null : JsonConvert.root().convertFrom(type, obj.toString());
if (obj == null) {
return null;
} else if (type instanceof Class && ((Class) type).isAssignableFrom(obj.getClass())) {
return (T) obj;
} else {
return JsonConvert.root().convertFrom(type, obj.toString());
}
}
public String getString(String name) {