not registered via @EnableConfigurationProperties or marked as spring compoent
回到自定义的bean Person中,添加注解@Component,声明将这个组件添加至容器中,这样才可以被使用?
“只有这个组件是容器中的组件,才能使用容器提供的@ConfigurationProperties功能,”
@Configurable
@Component
@ConfigurationProperties(prefix="com")
public class Resource {