package com.dxhy.common.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 调用外部接口参数配置
 *
 * @author Colin.hu
 * @date 4/16/2018
 */
@Data
@Component
public class DataConfig {

    @Value("${data.initialSize}")
    public int initialSize;
    @Value("${data.maxActive}")
    public int maxActive;
    @Value("${data.minIdle}")
    public int minIdle;
    @Value("${data.maxWait}")
    public long maxWait;
    @Value("${data.timeBetweenEvictionRunsMillis}")
    public long timeBetweenEvictionRunsMillis;
    @Value("${data.minEvictableIdleTimeMillis}")
    public long minEvictableIdleTimeMillis;
    @Value("${data.maxEvictableIdleTimeMillis}")
    public long maxEvictableIdleTimeMillis;
    @Value("${data.validationQuery}")
    public String validationQuery;
    @Value("${data.validationQueryTimeout}")
    public int validationQueryTimeout;
    @Value("${data.testOnBorrow}")
    public boolean testOnBorrow;
    @Value("${data.testOnReturn}")
    public boolean testOnReturn;
    @Value("${data.testWhileIdle}")
    public boolean testWhileIdle;
    @Value("${data.poolPreparedStatements}")
    public boolean poolPreparedStatements;
    @Value("${data.maxOpenPreparedStatements}")
    public int maxOpenPreparedStatements;
    @Value("${data.sharePreparedStatements}")
    public boolean sharePreparedStatements;

    public String filters = "stat,wall";

}
