当我添加以下Java选项以启用调试时:
JAVA_OPTS="$JAVA_OPTS -noverify -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
Run Code Online (Sandbox Code Playgroud)
每当我尝试关闭tomcat时,我都会收到以下错误:
ERROR: transport error 202: bind failed: Address already in use ["transport.c",L41]
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) ["debugInit.c",L500]
JDWP exit error JVMTI_ERROR_INTERNAL(113): No transports initializedFATAL ERROR in native method: JDWP No transports initialized, jvmtiError=JVMTI_ERROR_INTERNAL(113)
Run Code Online (Sandbox Code Playgroud) 我想为带有方法注释的方法设置AspectJ切入点@Scheduled
。尝试了不同的方法,但没有任何效果。
1.)
@Pointcut("execution(@org.springframework.scheduling.annotation.Scheduled * * (..))")
public void scheduledJobs() {}
@Around("scheduledJobs()")
public Object profileScheduledJobs(ProceedingJoinPoint joinPoint) throws Throwable {
LOG.info("testing")
}
Run Code Online (Sandbox Code Playgroud)
2.)
@Pointcut("within(@org.springframework.scheduling.annotation.Scheduled *)")
public void scheduledJobs() {}
@Pointcut("execution(public * *(..))")
public void publicMethod() {}
@Around("scheduledJobs() && publicMethod()")
public Object profileScheduledJobs(ProceedingJoinPoint joinPoint) throws Throwable {
LOG.info("testing")
}
Run Code Online (Sandbox Code Playgroud)
任何人都可以提出任何其他方式都around
/ before
上建议@Scheduled
注解的方法?