File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
grails-databinding/src/main/groovy/org/grails/databinding/converters Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,11 @@ ValueConverter instantValueConverter() {
177177 return jsr310ConvertersConfiguration .instantValueConverter ();
178178 }
179179
180+ @ Bean ("instantStructuredBindingEditor" )
181+ TypedStructuredBindingEditor instantStructuredBindingEditor () {
182+ return jsr310ConvertersConfiguration .instantStructuredBindingEditor ();
183+ }
184+
180185 @ Bean ("defaultUUIDConverter" )
181186 protected UUIDConverter defaultuuidConverter () {
182187 return new UUIDConverter ();
Original file line number Diff line number Diff line change @@ -388,6 +388,21 @@ class Jsr310ConvertersConfiguration {
388388 }
389389 }
390390
391+ @Bean
392+ TypedStructuredBindingEditor instantStructuredBindingEditor () {
393+ new CustomDateBindingEditor<Instant > () {
394+ @Override
395+ Instant getDate (Calendar c ) {
396+ c. toInstant()
397+ }
398+
399+ @Override
400+ Class<?> getTargetType () {
401+ Instant
402+ }
403+ }
404+ }
405+
391406 abstract class Jsr310DateValueConverter <T> implements ValueConverter {
392407
393408 @Override
You can’t perform that action at this time.
0 commit comments