java - Trim spaces before database inserts -
i have web application wherein need insert data database using hibernate several functionalities.
however forgot trim spaces while inserting want future database inserts should done after trimming spaces. best way across controller classes(i using spring mvc).
i need understand approach.
thanks
have @ stringtrimmereditor mentioned @ spring validation, data binding , type conversion , add controller code this:
@initbinder public void initbinder(webdatabinder binder) { binder.registercustomeditor(string.class, new stringtrimmereditor(true)); }
Comments
Post a Comment