> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/iv.-spring-boot-features/47.-kotlin-support/47.5-configurationproperties.md).

# 47.5 @ConfigurationProperties

`@ConfigurationProperties`目前只对`lateinit`或者可为空的`var`属性（推荐前者）生效。由于不可变类由构造器初始化，所以[还不被支持](https://github.com/spring-projects/spring-boot/issues/8762)。

```java
@ConfigurationProperties("example.kotlin")
class KotlinExampleProperties {

    lateinit var foo1: String

    lateinit var foo2: String

    lateinit val bar = Bar()

    class Bar {

        lateinit var bar1: String

        lateinit var bar2: String

    }

}
```
