小编Rah*_*hul的帖子

Tomcat无法关闭

当我添加以下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)

debugging tomcat

27
推荐指数
4
解决办法
3万
查看次数

不使用length()方法的String的长度

如何在不使用length()String类方法的情况下找到String的长度?

java string

9
推荐指数
6
解决办法
11万
查看次数

具有@Scheduled Spring批注的方法的切入点

我想为带有方法注释的方法设置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注解的方法?

java spring aspectj spring-scheduled

5
推荐指数
1
解决办法
2128
查看次数

标签 统计

java ×2

aspectj ×1

debugging ×1

spring ×1

spring-scheduled ×1

string ×1

tomcat ×1