当前位置: 首页>>代码示例>>Java>>正文


Java Recover类代码示例

本文整理汇总了Java中org.springframework.retry.annotation.Recover的典型用法代码示例。如果您正苦于以下问题:Java Recover类的具体用法?Java Recover怎么用?Java Recover使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Recover类属于org.springframework.retry.annotation包,在下文中一共展示了Recover类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: logNotificationFailure

import org.springframework.retry.annotation.Recover; //导入依赖的package包/类
@Recover
public void logNotificationFailure(
    NotificationException exception,
    String targetEmail,
    String emailTemplateId,
    Map<String, String> parameters,
    String reference
) {
    String errorMessage = String.format(
        "Failure: failed to send notification (%s to %s) due to %s",
        reference,
        targetEmail,
        exception.getMessage()
    );

    logger.info(errorMessage, exception);
}
 
开发者ID:hmcts,项目名称:cmc-claim-store,代码行数:18,代码来源:MoreTimeRequestedNotificationService.java

示例2: logNotificationFailure

import org.springframework.retry.annotation.Recover; //导入依赖的package包/类
@Recover
public void logNotificationFailure(
    NotificationException exception,
    Claim claim,
    String targetEmail,
    String pin,
    String emailTemplateId,
    String reference,
    String submitterName
) {
    String errorMessage = "Failure: "
        + " failed to send notification (" + reference
        + " to " + targetEmail + ") "
        + " due to " + exception.getMessage();

    logger.info(errorMessage, exception);
}
 
开发者ID:hmcts,项目名称:cmc-claim-store,代码行数:18,代码来源:ClaimIssuedNotificationService.java

示例3: logNotificationFailure

import org.springframework.retry.annotation.Recover; //导入依赖的package包/类
@Recover
public void logNotificationFailure(
    NotificationException exception,
    String targetEmail,
    String emailTemplate,
    Map<String, String> parameters,
    String reference
) {
    String errorMessage = String.format(
        "Failure: failed to send notification ( %s to %s ) due to %s",
        reference, targetEmail, exception.getMessage()
    );

    logger.info(errorMessage, exception);
}
 
开发者ID:hmcts,项目名称:cmc-claim-store,代码行数:16,代码来源:OfferMadeNotificationService.java

示例4: logNotificationFailure

import org.springframework.retry.annotation.Recover; //导入依赖的package包/类
@Recover
public void logNotificationFailure(
    NotificationException exception,
    Claim claim,
    String targetEmail,
    String emailTemplate,
    String reference
) {
    String errorMessage = String.format(
        "Failure: failed to send notification ( %s to %s ) due to %s",
        reference, targetEmail, exception.getMessage()
    );

    logger.info(errorMessage, exception);
}
 
开发者ID:hmcts,项目名称:cmc-claim-store,代码行数:16,代码来源:CCJRequestedNotificationService.java

示例5: logSendMessageWithAttachmentFailure

import org.springframework.retry.annotation.Recover; //导入依赖的package包/类
@Recover
public void logSendMessageWithAttachmentFailure(RuntimeException exception, EmailData emailData) {
    String errorMessage = String.format(
        "sendEmail failure:  failed to send email with details: %s due to %s",
        emailData.toString(), exception.getMessage()
    );
    logger.error(errorMessage, exception);
}
 
开发者ID:hmcts,项目名称:cmc-claim-store,代码行数:9,代码来源:EmailService.java

示例6: revocer

import org.springframework.retry.annotation.Recover; //导入依赖的package包/类
@Recover
public void revocer(RemoteAccessException e) {
    System.err.println("------ 最终处理 ------:" + e.getMessage());
}
 
开发者ID:yangdd1205,项目名称:spring-cloud-master,代码行数:5,代码来源:RetryService.java

示例7: fallbackForCall

import org.springframework.retry.annotation.Recover; //导入依赖的package包/类
/**
  * The recover method needs to have same return type and parameters.
  *
  * @return
  */
@Recover
 private boolean fallbackForCall() {
     logger.error("Fallback for mail service call invoked, mail service is NOT reachable");
     return false;
 }
 
开发者ID:Romeh,项目名称:spring-boot-ignite,代码行数:11,代码来源:MailService.java

示例8: recover

import org.springframework.retry.annotation.Recover; //导入依赖的package包/类
@Recover
public void recover(TccCoordinatorException e) {
	System.out.println(e.getMessage());
}
 
开发者ID:zhaoqilong3031,项目名称:spring-cloud-samples,代码行数:5,代码来源:CoordinatorManager.java

示例9: recover1

import org.springframework.retry.annotation.Recover; //导入依赖的package包/类
@Recover
public void recover1(RemoteAccessException e) {
    System.out.println(e.getMessage());
    System.out.println("do recover operation1");
}
 
开发者ID:rollenholt-showcase,项目名称:spring-retry-showcase,代码行数:6,代码来源:Service1.java

示例10: recover2

import org.springframework.retry.annotation.Recover; //导入依赖的package包/类
@Recover
public void recover2(RuntimeException e) {
    System.out.println(e.getMessage());
    System.out.println("do recover operation2");
}
 
开发者ID:rollenholt-showcase,项目名称:spring-retry-showcase,代码行数:6,代码来源:Service1.java

示例11: recover3

import org.springframework.retry.annotation.Recover; //导入依赖的package包/类
@Recover
public void recover3(RemoteAccessException e) {
    System.out.println(e.getMessage());
    System.out.println("do recover operation3");
}
 
开发者ID:rollenholt-showcase,项目名称:spring-retry-showcase,代码行数:6,代码来源:Service1.java

示例12: logException

import org.springframework.retry.annotation.Recover; //导入依赖的package包/类
/**
 * 重试继续失败
 * @param e e
 * @param <T> T
 * @return error
 * @throws ValidateException exception
 */
@Recover
public <T> T logException(ValidateException e) throws ValidateException {
    LOGGER.error(e.getMessage(), e);
    throw e;
}
 
开发者ID:piggsoft,项目名称:wx_api,代码行数:13,代码来源:Action.java


注:本文中的org.springframework.retry.annotation.Recover类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。