Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 1.01 KB

IssueReport组件使用.md

File metadata and controls

35 lines (28 loc) · 1.01 KB
date draft lastmod publishdate tags title
2018-01-01
false
2018-01-01
2018-01-01
git-doc
IssueReport组件使用

线上问题报告组件IssueReport使用说明

一、组件基本使用(基于spring)

  1. 在项目的pom中引入zkj-micro-foundation (组件在该微服务中)

  2. 在要进行问题报告的java类中将该类引入作为类属性,并使用spring进行实例注入

    @Component
    public class xxx{
        @Autowired
        private IssueReporter issueReporter;
    
        public void methodXXX{
                Message message = Message.build()
                .header("title")
                .body("detail message"
    
                issueReporter.report(message);
        }
    }

二、建议问题报告处理方式

在业务处理结果层面调用汇总业务问题,如在controller层面进行而非底层如service/dao层反应细节问题。详细使用可参照 zkj-micro-paymentPaymentResponseExceptionHandler中的使用。