|
|
|
@ -1,6 +1,10 @@
|
|
|
|
|
package org.springframework.cloud.alibaba.sentinel.datasource.config;
|
|
|
|
|
|
|
|
|
|
import javax.validation.constraints.NotEmpty;
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
|
|
|
|
|
|
import org.springframework.cloud.alibaba.sentinel.datasource.RuleType;
|
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.csp.sentinel.datasource.AbstractDataSource;
|
|
|
|
|
import com.alibaba.csp.sentinel.slots.block.authority.AuthorityRuleManager;
|
|
|
|
@ -18,7 +22,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
|
|
|
*/
|
|
|
|
|
public class AbstractDataSourceProperties {
|
|
|
|
|
|
|
|
|
|
@NotEmpty
|
|
|
|
|
private String dataType = "json";
|
|
|
|
|
@NotNull
|
|
|
|
|
private RuleType ruleType;
|
|
|
|
|
private String converterClass;
|
|
|
|
|
@JsonIgnore
|
|
|
|
@ -61,6 +67,7 @@ public class AbstractDataSourceProperties {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void preCheck(String dataSourceName) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void postRegister(AbstractDataSource dataSource) {
|
|
|
|
|