feat: 3.1.0
1.废除SecurityManagerCaller
This commit is contained in:
parent
1601b6e64d
commit
28c4a8a49c
@ -83,7 +83,7 @@ public class LogCaller {
|
|||||||
private static Caller tryCreateCaller() {
|
private static Caller tryCreateCaller() {
|
||||||
Caller caller;
|
Caller caller;
|
||||||
try {
|
try {
|
||||||
caller = new SecurityManagerCaller();
|
caller = new StackWalkerCaller();
|
||||||
if (null != caller.getCaller() && null != caller.getCallerCaller()) {
|
if (null != caller.getCaller() && null != caller.getCallerCaller()) {
|
||||||
return caller;
|
return caller;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import java.io.Serializable;
|
|||||||
*
|
*
|
||||||
* @author wodeyangzipingpingwuqi
|
* @author wodeyangzipingpingwuqi
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public class SecurityManagerCaller extends SecurityManager implements Caller, Serializable {
|
public class SecurityManagerCaller extends SecurityManager implements Caller, Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ -0,0 +1,34 @@
|
|||||||
|
package com.aizuda.easy.retry.common.log.lang;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xiaowoniu
|
||||||
|
* @date 2024-01-31 23:32:15
|
||||||
|
* @since 2.6.0
|
||||||
|
*/
|
||||||
|
public class StackWalkerCaller implements Caller, Serializable {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<?> getCaller() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<?> getCallerCaller() {
|
||||||
|
|
||||||
|
StackWalker instance = StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE);
|
||||||
|
Class<?> callerClass = instance.getCallerClass();
|
||||||
|
return callerClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<?> getCaller(int depth) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCalledBy(Class<?> clazz) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
@ -3,6 +3,8 @@ package com.aizuda.easy.retry.server.job.task.support.callback;
|
|||||||
import akka.actor.ActorRef;
|
import akka.actor.ActorRef;
|
||||||
import com.aizuda.easy.retry.common.core.enums.JobTaskStatusEnum;
|
import com.aizuda.easy.retry.common.core.enums.JobTaskStatusEnum;
|
||||||
import com.aizuda.easy.retry.common.log.EasyRetryLog;
|
import com.aizuda.easy.retry.common.log.EasyRetryLog;
|
||||||
|
import com.aizuda.easy.retry.common.log.lang.StackTraceCaller;
|
||||||
|
import com.aizuda.easy.retry.common.log.lang.StackWalkerCaller;
|
||||||
import com.aizuda.easy.retry.server.common.akka.ActorGenerator;
|
import com.aizuda.easy.retry.server.common.akka.ActorGenerator;
|
||||||
import com.aizuda.easy.retry.server.common.util.ClientInfoUtils;
|
import com.aizuda.easy.retry.server.common.util.ClientInfoUtils;
|
||||||
import com.aizuda.easy.retry.server.job.task.dto.LogMetaDTO;
|
import com.aizuda.easy.retry.server.job.task.dto.LogMetaDTO;
|
||||||
@ -28,6 +30,14 @@ import org.springframework.stereotype.Component;
|
|||||||
@Component
|
@Component
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class BroadcastClientCallbackHandler extends AbstractClientCallbackHandler {
|
public class BroadcastClientCallbackHandler extends AbstractClientCallbackHandler {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
StackTraceCaller securityManagerCaller = new StackTraceCaller();
|
||||||
|
StackWalkerCaller stackWalkerCaller = new StackWalkerCaller();
|
||||||
|
Class<?> callerCaller = stackWalkerCaller.getCallerCaller();
|
||||||
|
EasyRetryLog.LOCAL.info("aaa");
|
||||||
|
System.out.println(callerCaller);
|
||||||
|
System.out.println(securityManagerCaller.getCallerCaller());
|
||||||
|
}
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private JobTaskMapper jobTaskMapper;
|
private JobTaskMapper jobTaskMapper;
|
||||||
|
2
pom.xml
2
pom.xml
@ -24,7 +24,7 @@
|
|||||||
<revision>3.1.0-SNAPSHOT</revision>
|
<revision>3.1.0-SNAPSHOT</revision>
|
||||||
<dingding-talk.version>1.0.0</dingding-talk.version>
|
<dingding-talk.version>1.0.0</dingding-talk.version>
|
||||||
<netty-all.version>4.1.94.Final</netty-all.version>
|
<netty-all.version>4.1.94.Final</netty-all.version>
|
||||||
<hutool-all.version>5.8.19</hutool-all.version>
|
<hutool-all.version>5.8.25</hutool-all.version>
|
||||||
<mybatis-plus.version>3.5.5</mybatis-plus.version>
|
<mybatis-plus.version>3.5.5</mybatis-plus.version>
|
||||||
<alibaba-dingtalk.version>2.0.0</alibaba-dingtalk.version>
|
<alibaba-dingtalk.version>2.0.0</alibaba-dingtalk.version>
|
||||||
<guava-retrying.version>2.0.0</guava-retrying.version>
|
<guava-retrying.version>2.0.0</guava-retrying.version>
|
||||||
|
Loading…
Reference in New Issue
Block a user