| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.web.config;
|
1 |
package com.spice.profitmandi.web.config;
|
| 2 |
|
2 |
|
| - |
|
3 |
import com.spice.profitmandi.dao.entity.auth.AuthUser;
|
| - |
|
4 |
import com.spice.profitmandi.web.controller.AuthUserController;
|
| - |
|
5 |
import org.apache.logging.log4j.LogManager;
|
| - |
|
6 |
import org.apache.logging.log4j.Logger;
|
| 3 |
import org.springframework.beans.propertyeditors.StringTrimmerEditor;
|
7 |
import org.springframework.beans.propertyeditors.StringTrimmerEditor;
|
| - |
|
8 |
import org.springframework.stereotype.Controller;
|
| 4 |
import org.springframework.web.bind.WebDataBinder;
|
9 |
import org.springframework.web.bind.WebDataBinder;
|
| 5 |
import org.springframework.web.bind.annotation.ControllerAdvice;
|
10 |
import org.springframework.web.bind.annotation.ControllerAdvice;
|
| 6 |
import org.springframework.web.bind.annotation.InitBinder;
|
11 |
import org.springframework.web.bind.annotation.InitBinder;
|
| 7 |
|
12 |
|
| 8 |
@ControllerAdvice(basePackages="com.profitmandi.*")
|
13 |
@ControllerAdvice(basePackages="com.spice.profitmandi.*")
|
| - |
|
14 |
//@ControllerAdvice(basePackageClasses = AuthUser.class)
|
| - |
|
15 |
//@ControllerAdvice("com.spice.profitmandi.*")
|
| - |
|
16 |
//@Controller
|
| - |
|
17 |
//@ControllerAdvice(value = "com.spice.profitmandi.*")
|
| - |
|
18 |
//@ControllerAdvice(basePackages = {"com.spice.profitmandi.web.controller","com.spice.profitmandi.web.config","com.spice.profitmandi.*"})
|
| - |
|
19 |
//@ControllerAdvice(basePackages = {"com.spice.profitmandi.web.controller"})
|
| 9 |
public class ControllerSetup
|
20 |
public class ControllerSetup
|
| 10 |
{
|
21 |
{
|
| - |
|
22 |
|
| - |
|
23 |
//private static final Logger LOGGER = LogManager.getLogger(ControllerSetup.class);
|
| 11 |
@InitBinder
|
24 |
@InitBinder
|
| 12 |
public void initBinder ( WebDataBinder binder )
|
25 |
public void initBinder (WebDataBinder binder )
|
| 13 |
{
|
26 |
{
|
| - |
|
27 |
// LOGGER.info("trimming successfully");
|
| 14 |
StringTrimmerEditor stringtrimmer = new StringTrimmerEditor(true);
|
28 |
StringTrimmerEditor stringtrimmer = new StringTrimmerEditor(true);
|
| 15 |
binder.registerCustomEditor(String.class, stringtrimmer);
|
29 |
binder.registerCustomEditor(String.class, stringtrimmer);
|
| - |
|
30 |
|
| - |
|
31 |
// StringTrimmerEditor stringtrimmer = new StringTrimmerEditor(false);
|
| - |
|
32 |
// binder.registerCustomEditor(String.class,"last_name", stringtrimmer);
|
| - |
|
33 |
|
| 16 |
}
|
34 |
}
|
| 17 |
}
|
35 |
}
|