企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
`@ConfigurationProperties`除了用在类上注解,也可以用在public修饰的`@Bean`方法,用来绑定属性到第三方组件上.如下所示: ~~~ @ConfigurationProperties(prefix = "another") @Bean public AnotherComponent anotherComponent() { ... } ~~~ 所有`another `开头的属性,将映射到`AnotherComponent`对象上.