I have a Spring Boot application that I want to deploy on a Spring Cloud Dataflow server. I am facing an issue with the application properties. For some reason, nested properties are not presented in the Dataflow UI. Why is this happening?
I have defined my properties in application.yml file. I have declared my properties in dataflow-configuration-metadata.properties I am registering my Spring Boot jar file into SDF from maven source, and then add it to a task. Inside the Task, the Options button does not fetch all of my properties.
My application includes Spring Batch, Spring Web, Hibernate, JaxB, mapstruct and lombok.
First of all, since you mention that you are using Lombok, you want to make sure that your dependencies in
pom.xmlare properly configured.As per Spring's documentation (Configuration Metadata)
Based on that, if you're using the
maven-compiler-plugin, you must declare the annotation processors in the following order:Moving on to the properties, let's assume that the
application.ymllooks like this:Then the configuration property class should be:
In order for Dataflow UI to present the properties correctly, the
META-INF/dataflow-configuration-metadata.propertieswould be:Important: Note how we declared the inner class in the
.propertiesfile.