| 22042 |
amit.gupta |
1 |
package com.spice.profitmandi.web.config;
|
|
|
2 |
|
|
|
3 |
import org.springframework.beans.propertyeditors.StringTrimmerEditor;
|
|
|
4 |
import org.springframework.web.bind.WebDataBinder;
|
|
|
5 |
import org.springframework.web.bind.annotation.ControllerAdvice;
|
|
|
6 |
import org.springframework.web.bind.annotation.InitBinder;
|
|
|
7 |
|
|
|
8 |
@ControllerAdvice
|
|
|
9 |
public class ControllerSetup
|
|
|
10 |
{
|
|
|
11 |
@InitBinder
|
|
|
12 |
public void initBinder ( WebDataBinder binder )
|
|
|
13 |
{
|
|
|
14 |
StringTrimmerEditor stringtrimmer = new StringTrimmerEditor(true);
|
|
|
15 |
binder.registerCustomEditor(String.class, stringtrimmer);
|
|
|
16 |
}
|
|
|
17 |
}
|