java - How can I trim whitespace from request parameters in Spring MVC -
i'm struggling believe need trim leading , trailing whitespace request parameters not common requirement, , yet can't seem find has answer solving it.
surely there simple way configure, say, spring webdatabinder
trim whitespace parameter values before mapping them target object?
i'd keen know how other people have tackled this.
you can try registering custom propertyeditor
in webdatabinder
registercustomeditor(string.class, propertyeditor)
either create 1 or use stringtrimmereditor
, , instantiate set of whitespaces.
Comments
Post a Comment