diff --git a/blade-service/blade-demo/src/main/java/com/example/demo/controller/DemoController.java b/blade-service/blade-demo/src/main/java/com/example/demo/controller/DemoController.java index 0129a6a76..2f3f5bea3 100644 --- a/blade-service/blade-demo/src/main/java/com/example/demo/controller/DemoController.java +++ b/blade-service/blade-demo/src/main/java/com/example/demo/controller/DemoController.java @@ -18,6 +18,7 @@ package com.example.demo.controller; import com.example.demo.props.DemoProperties; import io.swagger.annotations.Api; +import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Value; import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.web.bind.annotation.GetMapping; @@ -32,6 +33,7 @@ import org.springframework.web.bind.annotation.RestController; @RefreshScope @RestController @RequestMapping("demo") +@RequiredArgsConstructor @Api(value = "配置接口", tags = "即时刷新配置") public class DemoController { @@ -40,10 +42,6 @@ public class DemoController { private final DemoProperties properties; - public DemoController(DemoProperties properties) { - this.properties = properties; - } - @GetMapping("name") public String getName() {