Commit 76b0c021 by liyanlin

fix

parent d20c1637
package com.bailuntec.api.bailuntec.exceptionless;
import feign.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
/**
* @Author: li.yanlin
* @Description:
* @Date: Created in
* @Modified by:
*/
@FeignClient(name = "exceptionlessApi",url = "http://api.log.bailuntec.com/")
public interface ExceptionlessApi {
@PostMapping(value = "/api/v2/events", produces = MediaType.APPLICATION_JSON_VALUE)
Response events(@RequestHeader("Authorization") String bearerToken, ExceptionlessInput input);
}
package com.bailuntec.api.bailuntec.exceptionless;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Builder;
import lombok.Getter;
import java.util.List;
/**
* @Author: li.yanlin
* @Description:
* @Date: Created in
* @Modified by:
*/
@Getter
@Builder
public class ExceptionlessInput {
@Builder.Default
private String type = "log";
private String message;
@JsonInclude(JsonInclude.Include.NON_NULL)
private String source;
@JsonInclude(JsonInclude.Include.NON_NULL)
private List<String> tags;
@JsonInclude(JsonInclude.Include.NON_NULL)
private String data;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment