我有一个具有进行异步调用功能的服务类。下面提供了代码
@Service
public class EllaService {
@Async
public void invokeEllaAsync( final IrisBo irisBo ) throws EllaGatewayUnsuccessfulResponseException {
if( !isTrafficIgnored( irisBo ) ) {
try {
callEllaService( irisBo );
}
catch( EllaGatewayUnsuccessfulResponseException ex ) {
throw new EllaGatewayUnsuccessfulResponseException( ex.getMessage(), ex.getCause() );
}
}
}
}
我需要在班级使用@EnableScheduling
进行注释吗?
答案 0 :(得分:1)