Browse Source

🎉 优化配置

test
smallchill 4 years ago
parent
commit
9120ae0579
  1. 6
      blade-service/blade-demo/src/main/java/com/example/demo/controller/DemoController.java

6
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() {

Loading…
Cancel
Save