Skip to content

Commit

Permalink
Add kms parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
realJackSun committed Aug 9, 2022
1 parent 20ff421 commit 5533d08
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public class AliyunConfigFilter extends AbstractConfigFilter {
private static final String CONTENT = "content";

private static final String REGION_ID = "regionId";

private static final String KMS_REGION_ID = "kms_region_id";

private static final String KEY_ID = "keyId";

Expand Down Expand Up @@ -64,7 +66,11 @@ public void init(Properties properties) {
String accessKey = properties.getProperty(PropertyKeyConst.ACCESS_KEY);
String secretKey = properties.getProperty(PropertyKeyConst.SECRET_KEY);
String kmsEndpoint = properties.getProperty(AliyunConst.KMS_ENDPOINT);


if(StringUtils.isEmpty(regionId)){
regionId = System.getProperty(KMS_REGION_ID, System.getenv(KMS_REGION_ID));
}

if (System.getProperties().containsKey(AliyunConst.KMS_ENDPOINT)) {
kmsEndpoint = System.getProperty(AliyunConst.KMS_ENDPOINT);
}
Expand Down

0 comments on commit 5533d08

Please sign in to comment.