ruanwenjun commented on code in PR #10505:
URL: https://github.com/apache/dolphinscheduler/pull/10505#discussion_r901273667
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/TrafficConfiguration.java:
##########
@@ -25,15 +25,15 @@
@Configuration
public class TrafficConfiguration {
- @Value("${traffic.control.global.switch:false}")
+ @Value("${traffic.control.global-switch:false}")
Review Comment:
Can we use `@ConfigurationProperties` to simplify this?
```java
@Data
@Configuration
@ConfigurationProperties(prefix = "traffic.control")
public class TrafficConfiguration {
private boolean globalSwitch;
private Integer maxGlobalQpsRate = 300;
private boolean tenantSwitch;
private Integer defaultTenantQpsRate = 10;
private Map<String, Integer> customizeTenantQpsRate = new HashMap<>();
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]