Http request auto validation library for spring framework

Check-Point depends on Jackson Json Processor, Project Lombok, Apache POI

Check-Point is a library that automatically checks the integrity of request messages that developers are most likely to miss during the spring project development.

Null check, minimum, maximum value of message.. You do not need to code anymore, just only need to click the checkbox on the setting page.

I realized that I was born into a person who can not fully handle message exceptions and developed this library.

Are you a diligent person who can handle exceptions for every message?





  compile group: 'com.github.ckpoint', name: 'check-point', version: '0.1.2'

Check-Point Setting Guide


Table of Contents

Add Properties

Add Setting Controller

Add the controller to the project as shown below.

public class CheckPointController extends MsgSettingController { }

Add Annotation


    public UserModel findUser(@ValidationParam BaseModel findModel) {
        UserModel userModel = new UserModel();
        return userModel;


    public OrderModel createOrder(@ValidationBody OrderModel orderModel) {
        return orderModel;


Add Custom Validation Rule

import hsim.checkpoint.core.component.validationRule.type.BaseValidationCheck; import hsim.checkpoint.core.domain.ValidationData; import hsim.checkpoint.exception.ValidationLibException; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus;

@Slf4j public class EmptyValueCheck implements BaseValidationCheck {

public boolean check(Object receiveValue, Object standardValue) {

    if (receiveValue instanceof String) {
        return !((String) receiveValue).isEmpty();
    return false;

public Object replace(Object receiveValue, Object standardValue, ValidationData param) {

    if (receiveValue instanceof String && ((String) receiveValue).isEmpty()) {
        return standardValue;
    return receiveValue;

public void exception(ValidationData param, Object inputValue, Object standardValue) {
    throw new ValidationLibException("custom rule check error", HttpStatus.BAD_REQUEST);


- Then add the rule using CheckPointHelper as below and call flush at the end.

   CheckPointHelper checkPointHelper = new CheckPointHelper();
   checkPointHelper.addValidationRule("emptyValueCheck", StandardValueType.STRING, new EmptyValueCheck(), new AssistType().string());

Replace Validation Exception

public class MinSizeCallback implements ValidationInvalidCallback { @Override public void exception(ValidationData param, Object inputValue, Object standardValue) { throw new ValidationLibException(param.getName() + " value minimum is " + standardValue + " but, input " + inputValue, HttpStatus.NOT_ACCEPTABLE); } }

- Then replace the callback using CheckPointHelper as below.

public void replaceMinSizeCallback(){
    CheckPointHelper checkPointHelper = new CheckPointHelper();
    checkPointHelper.replaceExceptionCallback(BasicCheckRule.MinSize, new MinSizeCallback());

Replace Object Mapper

Client and Validation Setting