Skip to content

Instantly share code, notes, and snippets.

@bvulaj
Created March 14, 2018 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bvulaj/e19ce694383bc8d32d4bf5664f63eb5a to your computer and use it in GitHub Desktop.
Save bvulaj/e19ce694383bc8d32d4bf5664f63eb5a to your computer and use it in GitHub Desktop.
Basic Type Safe Injection
provider.name=foo
provider.enabled=true
provider.roles=user,admin,superadmin
@Component
@ConfigurationProperties("provider")
public class ProviderInfo {
private String name;
private boolean enabled;
private List<String> roles;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment