thymeleaf-spring
thymeleaf-spring copied to clipboard
Allow use of custom SelectedValueComparator
We have been patching the Spring Framework for years due to an performance issue with exhaustive compare in select boxes. During exhaustive compare a database lookup is triggered because of spring's DomainClassConverter.
Since the code for SpringSelectedValueComparator has been taken over to the thymeleaf-spring repository for spring 5, I'd like to know if it would be possible to specify an own implementation of SelectedValueComparator for Thymeleaf to use so we can avoid patching frameworks.
I'm not too familiar with this part of the codebase, but I had a look and it seems the usage of SpringSelectedValueComparator is as a compile-time dependency, so not something that can be configured with your own one during runtime.
I'll leave the issue open though to see if the others would be open to making it configurable as a feature request.