package com.mzl.flower.config.exception; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.mzl.flower.config.Auth2ExceptionSerializer; import lombok.Getter; import org.springframework.security.oauth2.common.exceptions.OAuth2Exception; @JsonSerialize(using = Auth2ExceptionSerializer.class) public class SelfAuth2Exception extends OAuth2Exception { @Getter private String errorCode; public SelfAuth2Exception(String msg, Throwable t) { super(msg, t); } public SelfAuth2Exception(String msg, String errorCode) { super(msg); this.errorCode = errorCode; } }