Java.libraries.feign.ParamExpander.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stackgen Show documentation
Show all versions of stackgen Show documentation
Starter StackGen CORE Service Generator
package {{invokerPackage}};
import feign.Param;
import java.text.DateFormat;
import java.util.Date;
/**
* Param Expander to convert {@link Date} to RFC3339
*/
public class ParamExpander implements Param.Expander {
private static final DateFormat dateformat = new RFC3339DateFormat();
@Override
public String expand(Object value) {
if (value instanceof Date) {
return dateformat.format(value);
}
return value.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy