【发布时间】:2014-05-28 09:12:40
【问题描述】:
我为公共和私有方法添加了@Profiled 注释。我可以看到公共方法的计时日志。但是私有方法没有计时日志。
我做了正确的配置。
@Profiled
public BigInteger nextPrime() {
currentPrime = currentPrime.nextProbablePrime();
return currentPrime;
}
@Profiled
private void test()
{
try{
Thread.sleep(100);
}catch(Exception e)
{
e.printStackTrace();
}
}
@profiled 注解是否仅适用于公共方法?
【问题讨论】: