EL表达式拼接字符串1
EL表达式拼接字符串
<c:set var="types" value="${','}${resMap['vo'].lineType }${','}" ></c:set>
<c:if test="${fn:contains(types,',0,') }" >ok</c:if>
EL表达式拼接字符串
<c:set var="types" value="${','}${resMap['vo'].lineType }${','}" ></c:set>
<c:if test="${fn:contains(types,',0,') }" >ok</c:if>
使用Spring mvc接收整个url地址及参数时注意事项:
url= http://baidu?oid=9525c1f2b2cd45019b30a37bead6ebbb&td=2015-08-22&ot=a31f30c7905b4c8cb663e4d93de285c8
@RequestMapping(value="/aa",method=RequestMethod.GET)
public ModelAndView aa(HttpServletRequest request,String url){
ModelAndView mav = new ModelAndView("redirect:"+url);
return mav;
}
这样到controller里面后,url中&符号后面的参数会都丢失。
使用encodeURIComponent(url); 在controller中就获得这个正确的地址。
document.getElementById("searchForm").submit is not a function
在用userForm.submit() 提交表单的时候,表单里面不能有name="submit"的元素,否则在提交的 时候,该对象会和submit();方法发生混淆造成该错误!! 切记,切记!
linux服务器查看redis版本:
redis-server-v
阿里巴巴的datasource:
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
结合使用spring的jdbcTemplate
@Autowired
DruidDataSource dataSource;
jdbcTemplate = new JdbcTemplate(dataSource);
int rowCount = this.jdbcTemplate.queryForObject("select count(*) from price_base", Integer.class);
当前也可以使用spring的JdbcDaoSupport
具体参考:http://www.mkyong.com/spring/spring-jdbctemplate-jdbcdaosupport-examples/