Skip to content

Instantly share code, notes, and snippets.

Last active Mar 14, 2018
What would you like to do?
Simple Field Injection w/ @value
public class AppConfig {
// Using SpEL
@Value("#{ ?: 'bar'}")
private String providerName;
// Injecting a Duration w/ a default
private Duration timeout;
public class ProviderInfo {
private String name;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment