Skip to content

PoC of a spring boot application that uses validation rules from external service

Notifications You must be signed in to change notification settings

bduisenov/validation-as-a-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

validation-as-a-service

PoC of a spring boot application that uses validation rules from external service.

This project is based on Spring Cloud Function project.

IMPORTANT: Execution of a lambda is done inside of a sandbox. The template is as follows:

import java.util.*;
import java.util.function.*;
import reactor.core.publisher.Flux;

public class %s implements CompilationResultFactory<%s> {
    public %s<%s> getResult() {
        %s
    }
};

The rules can be specified in yml property file or any other mechanism. It might contain the in/out parameters as well as the body of validation.

Using org.springframework.cloud.function.compiler.java.SimpleClassLoader the rules are loadeded and compiled only during runtime.

HOW TO RUN:

$ mvn spring-boot:run

NOTE: The functionality might be extended to use js nashorn to provide js functions.

About

PoC of a spring boot application that uses validation rules from external service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages