Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
matrix
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mall
arch
matrix
Commits
c4716526
Commit
c4716526
authored
Aug 27, 2021
by
郑冰晶
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化异常告警
parent
06d9b778
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
ApolloPropertyProviderAlgorithm.java
matrix-datasource/matrix-datasource-security/matrix-datasource-security-druid/src/main/java/com/secoo/mall/datasource/security/algorithm/property/ApolloPropertyProviderAlgorithm.java
+6
-3
No files found.
matrix-datasource/matrix-datasource-security/matrix-datasource-security-druid/src/main/java/com/secoo/mall/datasource/security/algorithm/property/ApolloPropertyProviderAlgorithm.java
View file @
c4716526
...
@@ -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"));
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment