摘要: //2.配置监听器 @Bean public ServletListenerRegistrationBean getDataInitializeListenerBean(){ ServletListenerRegistrationBean listenerRegistrationBean=new ServletListenerRegistrationBean(... 阅读全文
posted @ 2019-07-08 21:05 vietaKo 阅读(779) 评论(0) 推荐(0) 编辑
摘要: springboot 不存在web.xml 那么如何配置过滤器呢 springboot提供了一种方式 通过spring容器配置 阅读全文
posted @ 2019-07-08 20:46 vietaKo 阅读(562) 评论(0) 推荐(0) 编辑
摘要: <fmt:formatDate value="${dateTime}" pattern="yyyy/MM/dd HH:mm:ss"/> 阅读全文
posted @ 2019-07-08 16:32 vietaKo 阅读(199) 评论(0) 推荐(0) 编辑
摘要: JSTL1.1函数标签库(functions) 1 2 具体使用方法请参见下表: 函数描述 fn:contains(string, substring) 如果参数string中包含参数substring,返回true fn:containsIgnoreCase(string, substring) 阅读全文
posted @ 2019-07-08 16:15 vietaKo 阅读(250) 评论(0) 推荐(0) 编辑
摘要: import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.springframework.web.servlet.HandlerInterceptor; import ... 阅读全文
posted @ 2019-07-08 13:35 vietaKo 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 需求: 所有的字段要将空字符串转成null; 问题: 我们知道表单如果不写值的时候,传递到后台的不是null,而且是空字符串。那么怎么改成null呢? 解决: 使用过滤器,将请求的参数修改过后继续,再传递下去。 Request请求对象是无法修改它本身数据(通过getXXX方法获得的数据)的!!而Se 阅读全文
posted @ 2019-07-08 10:44 vietaKo 阅读(1027) 评论(0) 推荐(0) 编辑