@NoArgsConstructor
public class APIUtil<T> {

    private static ObjectMapper objectMapper;
    private static Map parameters;
    private WebClient webClient;

    @Autowired
    public APIUtil(WebClient webClient){
        this.webClient = webClient;
    }

    public Mono<T> post(Object obj, String URL, Class toValueType){
        objectMapper = new ObjectMapper();
        parameters = new HashMap<String, String>();
        parameters = objectMapper.convertValue(obj, Map.class);

        Mono<T> t = webClient.post()
                .uri(uriBuilder -> uriBuilder.path(URL)
                        .build())
                .contentType(MediaType.APPLICATION_JSON)
                .accept(MediaType.APPLICATION_JSON)
                .bodyValue(parameters) //body (MultiValueMap 사용시 500 Error)
                .retrieve()
                .bodyToMono(toValueType);
        return t;
    }
}