I'm trying to generate spring-configuration-metadata.json file for my Spring Boot based project. If I use Java @ConfigurationProperties class it is generated correctly and automatically:
@ConfigurationProperties("myprops")
public class MyProps {
private String hello;
public String getHello() {
return hello;
}
public void setHello(String hello) {
this.hello = hello;
}
}
But if I use Kotlin class the spring-configuration-metadata.json file is not generated (I've tried both gradle build and Idea Rebuild Project).
@ConfigurationProperties("myprops")
class MyProps {
var hello: String? = null
}
AFAIK Kotlin generates the same class with constructor, getters and setters and should act as regular Java bean.
Any ideas why spring-boot-configuration-processor doesn't work with Kotlin classes?