这一杯,敬我的粗心大意…
详细错误信息如下:
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2021-04-08 10:10:18.129 ERROR 8820 — [restartedMain] o.s.boot.SpringApplication: Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘commentController’: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder ‘comment.avatar’ in value “${comment.avatar}”
要显示头像,需要添加图片配置
解决方法:
在application.yml中添加如下配置:
comment.avatar: /images/avatar.png
欢迎访问我的小站: 心随笔~