Join Slack
Powered by
I just expected it to also work with `Boolean` but...
# spring
p
poohbar
04/19/2018, 1:14 PM
I just expected it to also work with
Boolean
but that would be too much magic
c
Czar
04/19/2018, 1:35 PM
Not really, you can implement that yourself, it's simple enough. Check out this example:
http://www.baeldung.com/spring-mvc-custom-data-binder
p
poohbar
04/19/2018, 1:45 PM
That is rather nifty, thanks for the tip. In this case I won't bother since it's just in one controller method but good to know.
simple smile
1
t
tmg
04/19/2018, 5:52 PM
I believe in Spring Boot 2, it infers if it is mandatory by checking if it's a var or a val. At least some annotations do.
Open in Slack
Previous
Next