springboot使用yml格式报错
Error creating bean with name 'helloWorldController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'user2' in value "${user2}"
需要加上注释
@PropertySource(value = "classpath:application.yml")