All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.k7g.alloy.expose.DefaultRestExceptionResponseHandler Maven / Gradle / Ivy

package cn.k7g.alloy.expose;

import lombok.extern.slf4j.Slf4j;

import java.util.HashMap;
import java.util.Map;

@Slf4j
public final class DefaultRestExceptionResponseHandler implements WebExceptionResponseHandler {
    @Override
    public Object handle(String msg, Exception e) {
        log.error(msg, e);
        Map ret = new HashMap<>();
        ret.put("msg", msg);
        ret.put("code", 500);
        return ret;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy