简单正确文件如下:
正确运行:
不同处空格错误
- Failed to load property source from ‘file:/F:/elementtest/springboot-parent/shop-apollo/target/classes/application.yml’ (classpath:/application.yml)(错误)解决措施:这种错误一般找本来应该顶满格的,但是前边多了个空格,仔细检查满格处是否顶满,或者是本来应该对其的,多了个空格,如果多了个空格,则删除空格即可(例如下边的app处则是多了个空格)
错别字错误
1.Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled或org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘helloConteoller’: Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder ‘name’ in value “${name}”.(错误)
解决措施:检查关键字是否写错,例如把下边的abp改成正确的app即可,如果报相同的错,而app没写错,则仔细观察其他字母是否误写,从而改正即可