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

php - Hide output during test execution -

javascript - Migrate custom AngularJS filter from 1.2.28 to 1.4.x -

Update Magento products with multiple images -