@Configuration public class SpringletsWebMvcConfiguration extends Object
StringTrimmerAdvice.
* JsonpAdvice.
* ValidatorAdvice.| Constructor and Description |
|---|
SpringletsWebMvcConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
JsonpAdvice |
jsonpAdvice()
Create and register a
JsonpAdvice bean configured with mvcProperties. |
StringTrimmerAdvice |
stringTrimmerAdvice()
Create and register a
StringTrimmerAdvice bean configured with mvcProperties. |
ValidatorAdvice |
validatorAdvice()
Create and register a
ValidatorAdvice bean configured with localValidator. |
@Bean public StringTrimmerAdvice stringTrimmerAdvice()
StringTrimmerAdvice bean configured with mvcProperties.
Note that mvcProperties is null when the property `springlets.mvc.advices.enabled`
is false, in that case this method return null.
By returning null causes that the method AbstractApplicationContext.getBean(Class)
returns null in spite of throwing the BeansException exception.@Bean public JsonpAdvice jsonpAdvice()
JsonpAdvice bean configured with mvcProperties.
Note that mvcProperties is null when the property `springlets.mvc.advices.enabled`
is false, in that case this method return null.
By returning null causes that the method AbstractApplicationContext.getBean(Class)
returns null in spite of throwing the BeansException exception.@Bean public ValidatorAdvice validatorAdvice()
ValidatorAdvice bean configured with localValidator.
Note that localValidator has been annotated with `@Autowired` and
marked as not required so if the LocalValidatorFactoryBean has not been registered in the
Spring context a new instance of LocalValidatorFactoryBean will be used.Copyright © 2018 DISID Corporation. All rights reserved.