Commit c4716526 by 郑冰晶

优化异常告警

parent 06d9b778
...@@ -2,6 +2,7 @@ package com.secoo.mall.datasource.security.algorithm.property; ...@@ -2,6 +2,7 @@ package com.secoo.mall.datasource.security.algorithm.property;
import com.ctrip.framework.apollo.Config; import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService; import com.ctrip.framework.apollo.ConfigService;
import com.google.common.base.CaseFormat;
import com.secoo.mall.common.util.colletion.CollectionUtil; import com.secoo.mall.common.util.colletion.CollectionUtil;
import com.secoo.mall.common.util.reflect.FieldUtil; import com.secoo.mall.common.util.reflect.FieldUtil;
import com.secoo.mall.common.util.string.StringUtil; import com.secoo.mall.common.util.string.StringUtil;
...@@ -109,7 +110,7 @@ public class ApolloPropertyProviderAlgorithm implements PropertyProviderAlgorith ...@@ -109,7 +110,7 @@ public class ApolloPropertyProviderAlgorithm implements PropertyProviderAlgorith
Object value = appConfig.getProperty(configPropertyFullPath, ""); Object value = appConfig.getProperty(configPropertyFullPath, "");
//得到实际类的字段 //得到实际类的字段
String beanFieldName = fieldSection[3]; String beanFieldName = CaseFormat.LOWER_HYPHEN.to(CaseFormat.LOWER_CAMEL,fieldSection[3]);
if (!fieldMap.containsKey(beanFieldName)) { if (!fieldMap.containsKey(beanFieldName)) {
notSupportPropertySet.add(beanFieldName); notSupportPropertySet.add(beanFieldName);
continue; continue;
...@@ -172,8 +173,10 @@ public class ApolloPropertyProviderAlgorithm implements PropertyProviderAlgorith ...@@ -172,8 +173,10 @@ public class ApolloPropertyProviderAlgorithm implements PropertyProviderAlgorith
public static void main(String[] args) { public static void main(String[] args) {
// String x = "a-b-c"; // String x = "a-b-c";
// System.out.println(JSON.toJSONString(x.split("-",2))); // System.out.println(JSON.toJSONString(x.split("-",2)));
String x = "spring.datasource.security.secooActivityDB.t_price_rule_task.creator.plainColumn"; // String x = "spring.datasource.security.secooActivityDB.t_price_rule_task.creator.plainColumn";
System.out.println(x.contains("spring.datasource.security\\.")); // System.out.println(x.contains("spring.datasource.security\\."));
// System.out.println(StringUtil.capitalize("beanFieldName"));
// System.out.println(CaseFormat.LOWER_HYPHEN.to(CaseFormat.LOWER_CAMEL,"set-" + "encrypt-type"));
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment