|
@@ -2,11 +2,11 @@ package com.qmth.boot.api.config;
|
|
|
|
|
|
import com.qmth.boot.api.constant.ApiConstant;
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
|
+import org.springframework.lang.Nullable;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
|
import javax.validation.constraints.NotBlank;
|
|
|
-import javax.validation.constraints.NotNull;
|
|
|
|
|
|
@Component
|
|
|
@ConfigurationProperties(prefix = ApiConstant.CONFIG_PREFIX)
|
|
@@ -22,10 +22,10 @@ public class ApiProperties implements ApiConstant {
|
|
|
|
|
|
private boolean globalAuth = false;
|
|
|
|
|
|
- private boolean httpTrace = false;
|
|
|
+ @Nullable
|
|
|
+ private String[] globalRateLimit = null;
|
|
|
|
|
|
- @NotNull
|
|
|
- private ActuatorProperties actuator = new ActuatorProperties();
|
|
|
+ private boolean httpTrace = false;
|
|
|
|
|
|
public String getUriPrefix() {
|
|
|
return uriPrefix;
|
|
@@ -55,6 +55,15 @@ public class ApiProperties implements ApiConstant {
|
|
|
return globalAuth;
|
|
|
}
|
|
|
|
|
|
+ @Nullable
|
|
|
+ public String[] getGlobalRateLimit() {
|
|
|
+ return globalRateLimit;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setGlobalRateLimit(@Nullable String[] globalRateLimit) {
|
|
|
+ this.globalRateLimit = globalRateLimit;
|
|
|
+ }
|
|
|
+
|
|
|
public void setGlobalAuth(boolean globalAuth) {
|
|
|
this.globalAuth = globalAuth;
|
|
|
}
|
|
@@ -67,11 +76,4 @@ public class ApiProperties implements ApiConstant {
|
|
|
this.httpTrace = httpTrace;
|
|
|
}
|
|
|
|
|
|
- public ActuatorProperties getActuator() {
|
|
|
- return actuator;
|
|
|
- }
|
|
|
-
|
|
|
- public void setActuator(ActuatorProperties actuator) {
|
|
|
- this.actuator = actuator;
|
|
|
- }
|
|
|
}
|