2015年12月30日

摘要: forEach : items=page.results var="store" varStatus="st"${(st.index+1)+((page.pageNo-1)*page.pageSize)} 阅读全文
posted @ 2015-12-30 14:12 james-roger 阅读(916) 评论(0) 推荐(0) 编辑

2015年12月27日

摘要: 1.hibernate的校验框架validation所需要jar包:2 在applicationContext.xml中配置校验器: ... 阅读全文
posted @ 2015-12-27 18:24 james-roger 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 需求:成绩录入(录入多门课成绩,批量提交)使用List接收页面提交的批量数据,通过包装pojo接收,在包装pojo中定义list属性public class ItemsQueryVo { //商品信息 private Items items; //为了系统 可扩展性... 阅读全文
posted @ 2015-12-27 18:08 james-roger 阅读(1867) 评论(0) 推荐(0) 编辑
摘要: 需求:商品批量删除,用户在页面选择多个商品,批量删除。关键:将页面选择(多选)的商品id,传到controller方法的形参,方法形参使用数组接收页面请求的多个商品id// 批量删除 商品信息 @RequestMapping("/deleteItems") public String d... 阅读全文
posted @ 2015-12-27 18:01 james-roger 阅读(374) 评论(0) 推荐(0) 编辑
摘要: package cn.itcast.ssm.controller.converter;import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Date;import org.springfr... 阅读全文
posted @ 2015-12-27 14:45 james-roger 阅读(2215) 评论(0) 推荐(0) 编辑
摘要: post 在web.xml中添加CharacterEncodingFilterorg.springframework.web.filter.CharacterEncodingFilterencodingutf-8CharacterEncodingFilter/*get修改tomcat配置文件添加编码... 阅读全文
posted @ 2015-12-27 14:41 james-roger 阅读(202) 评论(0) 推荐(0) 编辑

2015年12月16日

摘要: 在web.xml的Struts2的配置上面加上 OpenSessionInViewFilter org.springframework.orm.hibernate4.support.OpenSessionInViewFilter ... 阅读全文
posted @ 2015-12-16 09:41 james-roger 阅读(377) 评论(0) 推荐(0) 编辑

2015年12月11日

摘要: ①. 正常加入 Struts2②. 在 Spring 的 IOC 容器中配置 Struts2 的 Action注意: 在 IOC 容器中配置 Struts2 的 Action 时, 需要配置 scope 属性, 其值必须为 prototype ③. 配置 Struts2 的配置文件: action... 阅读全文
posted @ 2015-12-11 10:07 james-roger 阅读(154) 评论(0) 推荐(0) 编辑

2015年12月9日

摘要: 1 在配置文件中加入: 2 在方法名上添加注解:@Transactional( propagation=Propagation.REQUIRES_NEW, isolation=Isolation.READ_COMMITTED, readOnly=false, timeout=3 ) //1.使用 p 阅读全文
posted @ 2015-12-09 17:50 james-roger 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 1 把一个类声明为一个切面:①需要把该类放入到IOC中,②再声明为一个切面(@Aspect @Component)@Order(1):指定顺序2 在配置文件中添加如下配置:package com.atguigu.aop;import java.util.Arrays;import org.aspec... 阅读全文
posted @ 2015-12-09 12:29 james-roger 阅读(268) 评论(0) 推荐(0) 编辑