Skip to content

Instantly share code, notes, and snippets.

Created January 8, 2018 11:19
Show Gist options
  • Save anonymous/abf07b149497f0ff97437ea9627003a1 to your computer and use it in GitHub Desktop.
Save anonymous/abf07b149497f0ff97437ea9627003a1 to your computer and use it in GitHub Desktop.
@Data
@Component
@ConfigurationProperties(prefix = "sample")
@Validated
public class SampleProperties {
@NotNull
private String sample1;
}
@Data
@Component
@ConfigurationProperties(prefix = "sample")
@Validated
@Profile("more")
public class MoreProperties {
@NotNull
private String sample2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment