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

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - On Gitbash - Bower : ENOGIT git is not installed or not in the PATH -