我@Profiled
为公共和私有方法添加了注释。我可以看到公共方法的计时日志。但是私有方法没有计时日志。
我正确地进行了配置。
@Profiled
public BigInteger nextPrime() {
currentPrime = currentPrime.nextProbablePrime();
return currentPrime;
}
@Profiled
private void test()
{
try{
Thread.sleep(100);
}catch(Exception e)
{
e.printStackTrace();
}
}
@profiled 注解是否仅适用于公共方法?