class PropertyResolver implements ParameterResolver<Property> {

    @Override
    public Object resolve(Parameter parameter, ApplicationContext context) throws Exception {
        if (parameter.getParameterClass() != String.class) {
            throw new IllegalArgumentException("Only parameters and fields with string type may be annotated by @Property.");
        }
        String param = this.property.value();

        Object value = context.getInitialProperties().getProperties().get(param);
        if (value == null) {
            return parameter.getDefaultValue();
        }

        return value;
    }

      PropertyResolver(Property property);

}