code format

pull/237/head
fangjian0423 6 years ago
parent 1db45e85c4
commit 40f6290184

@ -4,7 +4,6 @@ import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import org.springframework.cloud.alibaba.sentinel.datasource.RuleType; 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.datasource.AbstractDataSource;
import com.alibaba.csp.sentinel.slots.block.authority.AuthorityRuleManager; import com.alibaba.csp.sentinel.slots.block.authority.AuthorityRuleManager;
@ -22,7 +21,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
*/ */
public class AbstractDataSourceProperties { public class AbstractDataSourceProperties {
@NotEmpty @NotEmpty
private String dataType = "json"; private String dataType = "json";
@NotNull @NotNull
private RuleType ruleType; private RuleType ruleType;

@ -12,9 +12,9 @@ import org.springframework.cloud.alibaba.sentinel.datasource.factorybean.ApolloD
*/ */
public class ApolloDataSourceProperties extends AbstractDataSourceProperties { public class ApolloDataSourceProperties extends AbstractDataSourceProperties {
@NotEmpty @NotEmpty
private String namespaceName; private String namespaceName;
@NotEmpty @NotEmpty
private String flowRulesKey; private String flowRulesKey;
private String defaultFlowRuleValue; private String defaultFlowRuleValue;

@ -16,7 +16,7 @@ import org.springframework.util.StringUtils;
*/ */
public class FileDataSourceProperties extends AbstractDataSourceProperties { public class FileDataSourceProperties extends AbstractDataSourceProperties {
@NotEmpty @NotEmpty
private String file; private String file;
private String charset = "utf-8"; private String charset = "utf-8";
private long recommendRefreshMs = 3000L; private long recommendRefreshMs = 3000L;

@ -18,10 +18,10 @@ public class NacosDataSourceProperties extends AbstractDataSourceProperties {
private String serverAddr; private String serverAddr;
@NotEmpty @NotEmpty
private String groupId; private String groupId;
@NotEmpty @NotEmpty
private String dataId; private String dataId;
// commercialized usage // commercialized usage

Loading…
Cancel
Save