- 浏览: 50441 次
最新评论
-
zhangchengtest:
顶。。。。。。。
SpringMVC自定义日期类型的数据转换器
文章列表
public class SpringContext implements ApplicationContextAware {
中
public static String getMessage(String code, HttpServletRequest request) {
Locale locale = RequestContextUtils.getLocaleResolver(request).resolveLocale(request);
return applicationContext.getMessage(code, null, locale);
}
...
var controlDiv = '';
$("#controlDiv").html("");
var jsonObj = JSON.parse(data.channelParamKeys);
for(var key in jsonObj)
{
controlDiv +='<div class="form-group"> <label class="col-lg-3 ...
AbstractView:createMergedOutputModel
真实的对象是RequestContext
The main Bean Validation class. This is the core processing class of Hibernate Validator.
ValidatorImpl:validateConstraintsForDefaultGroup
ValidatorFactoryImpl(constraintHelper)
constraintHelper中添加了各种默认的验证器
public ValidatorFactoryImpl(ConfigurationState configurationState) {
this.messageInter ...
它加了一种状态叫做对话 也叫流(flow)
之前只有请求 会话 和 应用程序
它的生命周期介于请求和会话之间
Dispatcher:
Controller HandlerRequest ModelAndView
ViewResoler resolverViewName View
View render
看看他的策略模式是怎么玩的
就不断循环
ViewResolvers就在DispatcherServlet中初始化
如何防止客户端重复提交按钮呢
那就是重定向了
response.sendReirect();
策咯模式解决的是什么问题呢
能够解决if else的问题
每一个分支都需要建立一个类
condition还是要暴露给客户端的
引用@Order(1)
public class WebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
@Override
protected Class<?>[] getRootConfigClasses() {
return new Class<?>[] { 。。。};
}
@Override
protected Class<?>[] getServletConfigClasses() {
return new Class< ...
从哪里加载的validator呢
默认就是用下面的这个validator
/**
* {@link LocalValidatorFactoryBean} subclass that simply turns
* {@link org.springframework.validation.Validator} calls into no-ops
* in case of no Bean Validation provider being available.
*
* <p>This is the actual class used by Spring's MVC ...
spring4零配置
一般通过WebMvcConfigurationSupport加载默认对象
要用extends 才能得到默认加载converters
不要用configure
@Override
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
super.extendMessageConverters(converters);
for(HttpMessageConverter<?> httpMessageConve ...
http://www.datatables.net/examples/api/counter_columns.html
bServerSide index就会失灵
T tooltops
t table
p pagination
i information
aLengthMenu 每页显示数量
_fnInitialise
_fnAddOptionsHtml
_fnFeatureHtmlFilter
_fnFilterComplete
_fnFilter
_fnFilterCreateSearch
_fnFilterCustom