请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

启动报错Error creating bean with name 'trtcUtil'

相关的id输入的都没错呀老师
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2022/04/01 17:33:13 ERROR Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘trtcUtil’: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder ‘tencent.trtc.appId’ in value "tencent.trtc.appId"atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:405)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1413)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524)atorg.springframework.beans.factory.support.AbstractBeanFactory.lambda{tencent.trtc.appId}" at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:405) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1413) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524) at org.springframework.beans.factory.support.AbstractBeanFactory.lambdatencent.trtc.appId"atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:405)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1413)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524)atorg.springframework.beans.factory.support.AbstractBeanFactory.lambdadoGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
图片描述图片描述

正在回答

2回答

https://img1.sycdn.imooc.com//szimg/624716cc09789e1a05470028.jpg

报错写的很清楚,yml文件的毛病

0 回复 有任何疑惑可以回复我~
  • 谢谢老师,是我yml里面的格式出错了
    回复 有任何疑惑可以回复我~ 2022-04-02 10:21:01
神思者 2022-04-01 18:52:25

YML文件里面的值注入你没定义

0 回复 有任何疑惑可以回复我~
  • 老师,我把yml文件截图放上去了,仔细跟着视频看了一下,没有漏什么东西呀,麻烦您看一下
    回复 有任何疑惑可以回复我~ 2022-04-01 20:00:22
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信