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

Popular posts from this blog

qt - Using float or double for own QML classes -

json - ORA-06502: PL/SQL: numeric or value error: character string buffer too small - Convert Clob to varchar2 -

ios - Swift Array Resetting Itself -