SystemApplication启动失败

来源:1-2 课程介绍及学习指导

雨洋_prtINZ

2025-04-18

在启动SystemApplication时出现了下面的错误,老师能帮忙看一下是怎么回事吗?另外,数据库的连接没有问题

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
09.523 ERROR o.s.boot.SpringApplication    :826  Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.testController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'system.test' in value "${system.test}"
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:405)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$1(AbstractBeanFactory.java:359)
at org.springframework.cloud.context.scope.GenericScope$BeanLifecycleWrapper.getBean(GenericScope.java:389)
at org.springframework.cloud.context.scope.GenericScope.get(GenericScope.java:186)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:356)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1108)
at org.springframework.cloud.context.scope.refresh.RefreshScope.eagerlyInitialize(RefreshScope.java:134)
at org.springframework.cloud.context.scope.refresh.RefreshScope.start(RefreshScope.java:125)
at org.springframework.cloud.context.scope.refresh.RefreshScope.onApplicationEvent(RefreshScope.java:119)
at o
写回答

1回答

甲蛙

2025-04-23

提示:system.test这个找不到,在application.properties里随便加个配置。

这个是后面的章节加的,同学在拷代码的时候,不要拷最终的代码,而是找到每一小节的提交

0
0

Spring Cloud+ Vue前后端分离开发企业级在线视频系统

全网稀缺课程 市场热门项目+主流框架 一课掌握前后端技术

1746 学习 · 1708 问题

查看课程