Could not resolve placeholder 'cupszie' in value "cupsize: ${cupszie},age: ${age}"
报错如下:
Error creating bean with name 'helloController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'cupszie' in value "cupsize: ${cupszie},age: ${age}"
代码如下:
application.yml代码
server:
  port: 8081
  context-path: /girl
cupsize: B
age: 20
content: "cupsize: ${cupszie},age: ${age}"
HelloController.class代码
@RestController
public class HelloController {
    @Value("${cupsize}")
    private String cupsize;
    @Value("${age}")
    private Integer age;
    @Value("${content}")
    private String content;
    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    public String say(){
        return content;
    }
}
代码跟老师的一样,请教老师这是为什么呢

 
                             
                             
                             
                             
                             
                             
                             
                             
                             
                            