xkcoding / spring-boot-demo

🚀一个用来深入学习并实战 Spring Boot 的项目。
https://parg.co/UZM
MIT License
32.87k stars 10.82k forks source link

[BUG] demo-properties中PropertyController下的index()方法可以添加@ResponseBody注解 #213

Closed aaachuan closed 2 years ago

aaachuan commented 2 years ago

运行测试时输入localhost:8080/demo/property返回为空,因index()方法返回Hutool的Dict,可以添加@ResponseBody注解

    @GetMapping("/property")
    @ResponseBody
    public Dict index() {
        return Dict.create().set("applicationProperty", applicationProperty).set("developerProperty", developerProperty);
    }