Skip to content
Permalink
Browse files
change to constructor autowiring mode for MetricsCollectController.ja…
…va (#622)
  • Loading branch information
chenlongxing112 committed Jul 3, 2020
1 parent 33cb785 commit c67832ed8473274cebc65c00d4cbe7f0dbe41213
Showing 1 changed file with 6 additions and 4 deletions.
@@ -49,14 +49,16 @@
@RequestMapping("/api/{env}/metrics")
public class MetricsCollectController {

@Autowired
private ProviderService providerService;

@Autowired
private ConsumerService consumerService;
private MetricsService metricsService;

@Autowired
private MetricsService metricsService;
public MetricsCollectController(ProviderService providerService, ConsumerService consumerService, MetricsService metricsService) {
this.providerService = providerService;
this.consumerService = consumerService;
this.metricsService = metricsService;
}

@RequestMapping(method = RequestMethod.POST)
public String metricsCollect(@RequestParam String group, @PathVariable String env) {

0 comments on commit c67832e

Please sign in to comment.