| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.web.config;
|
1 |
package com.spice.profitmandi.web.config;
|
| 2 |
|
2 |
|
| - |
|
3 |
import org.apache.logging.log4j.LogManager;
|
| - |
|
4 |
import org.apache.logging.log4j.Logger;
|
| 3 |
import org.springframework.beans.propertyeditors.StringTrimmerEditor;
|
5 |
import org.springframework.beans.propertyeditors.StringTrimmerEditor;
|
| 4 |
import org.springframework.web.bind.WebDataBinder;
|
6 |
import org.springframework.web.bind.WebDataBinder;
|
| 5 |
import org.springframework.web.bind.annotation.ControllerAdvice;
|
7 |
import org.springframework.web.bind.annotation.ControllerAdvice;
|
| 6 |
import org.springframework.web.bind.annotation.InitBinder;
|
8 |
import org.springframework.web.bind.annotation.InitBinder;
|
| 7 |
|
9 |
|
| 8 |
@ControllerAdvice(basePackages="com.profitmandi.*")
|
10 |
@ControllerAdvice(basePackages = "com.spice.profitmandi")
|
| - |
|
11 |
|
| 9 |
public class ControllerSetup
|
12 |
public class ControllerSetup
|
| 10 |
{
|
13 |
{
|
| - |
|
14 |
private static final Logger LOGGER = LogManager.getLogger(ControllerSetup.class);
|
| 11 |
@InitBinder
|
15 |
@InitBinder
|
| 12 |
public void initBinder ( WebDataBinder binder )
|
16 |
public void initBinder ( WebDataBinder binder )
|
| 13 |
{
|
17 |
{
|
| 14 |
StringTrimmerEditor stringtrimmer = new StringTrimmerEditor(true);
|
18 |
StringTrimmerEditor stringtrimmer = new StringTrimmerEditor(true);
|
| 15 |
binder.registerCustomEditor(String.class, stringtrimmer);
|
19 |
binder.registerCustomEditor(String.class, stringtrimmer);
|