I have an application.properties file with the following content.
server.name
server.id
server.ipadd
and I am using the following annotation to read in configProperties.java
@ConfigurationProperties(prefix = "server")
private String name;
private String ipadd;
Now I have included extra properties.
server.client.type
server.client.location
and want to read these new properties. How can I read these in the same configProperties.java file? Looking for something like the following formats which includes multiple prefixes, I know these are invalid.
@ConfigurationProperties(prefix = "server", prefix = "server.client")
or
@ConfigurationProperties(prefix = "server")
@ConfigurationProperties(prefix = "server.client")