为了账号安全,请及时绑定邮箱和手机立即绑定

启动springboot是报错

启动springboot是报错

qq_半宛清愁_1 2017-12-12 23:53:39
yml文件girl:cupSize: Bage: 18GirlProperties 类@ConfigurationProperties(prefix = "girl",locations = "application.yml")public class GirlProperties {    private  String cupSize;    private  Integer age;    public String getCupSize() {        return cupSize;    }    public void setCupSize(String cupSize) {        this.cupSize = cupSize;    }    public Integer getAge() {        return age;    }    public void setAge(Integer age) {        this.age = age;    }错误信息Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.2017-12-12 23:35:53.086 ERROR 4108 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : ***************************APPLICATION FAILED TO START***************************Description:Field GirlProperties in cn.bdqn.girl.HelloController required a bean of type 'cn.bdqn.girl.GirlProperties' that could not be found.Action:Consider defining a bean of type 'cn.bdqn.girl.GirlProperties' in your configuration.
查看完整描述

2 回答

?
慕粉2109029135

TA贡献2条经验 获得超0个赞

应该是目录结构没有对

查看完整回答
反对 回复 2018-10-08
?
拖鞋_

TA贡献453条经验 获得超223个赞

你发一下你的项目结构我看看 我感觉是你项目结构的问题

查看完整回答
反对 回复 2017-12-13
  • 2 回答
  • 0 关注
  • 1213 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号