com.github.fieldintercept.springboot.FieldinterceptProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of field-intercept Show documentation
Show all versions of field-intercept Show documentation
Field intercept project for Spring
The newest version!
package com.github.fieldintercept.springboot;
import com.github.fieldintercept.ReturnFieldDispatchAop;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import java.lang.annotation.Annotation;
import java.util.Map;
import java.util.function.BiConsumer;
@ConfigurationProperties(prefix = FieldinterceptProperties.PREFIX, ignoreUnknownFields = true)
public class FieldinterceptProperties {
public static final String PREFIX = "spring.fieldintercept";
private static final long serialVersionUID = 1L;
/**
* 集群配置
*/
@NestedConfigurationProperty
private final Cluster cluster = new Cluster();
/**
* 聚合策略
*/
@NestedConfigurationProperty
private final BatchAggregation batchAggregation = new BatchAggregation();
/**
* 线程策略
*/
@NestedConfigurationProperty
private final ThreadPool threadPool = new ThreadPool();
/**
* 是否开启字段拦截
*/
private boolean enabled = true;
/**
* 业务实体类的包路径
* 用于快速判断是否是业务实体类 ,如果是业务实体类,则会深度遍历访问内部字段
* 包路径. 例如 {"com.ig", "com.xx"}
*/
private String[] beanBasePackages = {};
/**
* 如果超过这个数量,就会阻塞调用方(业务代码)继续生产自动注入任务。阻塞创建AutowiredRunnable,创建不出来就提交不到线程池里
*/
private int maxRunnableConcurrentCount = Integer.MAX_VALUE;
/**
* 自动注入同步调用时的超时时间
*/
private int blockGetterTimeoutMilliseconds = 30_000;
/**
* 切面对象
*/
private Class extends ReturnFieldDispatchAop> aopClass = AspectjReturnFieldDispatchAop.class;
/**
* 异步完毕监听
*/
private Class extends BiConsumer