2015年12月27日

摘要: 需求:商品批量删除,用户在页面选择多个商品,批量删除。关键:将页面选择(多选)的商品id,传到controller方法的形参,方法形参使用数组接收页面请求的多个商品id// 批量删除 商品信息 @RequestMapping("/deleteItems") public String d... 阅读全文
posted @ 2015-12-27 18:01 james-roger 阅读(380) 评论(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 阅读(2233) 评论(0) 推荐(0)
摘要: post 在web.xml中添加CharacterEncodingFilterorg.springframework.web.filter.CharacterEncodingFilterencodingutf-8CharacterEncodingFilter/*get修改tomcat配置文件添加编码... 阅读全文
posted @ 2015-12-27 14:41 james-roger 阅读(207) 评论(0) 推荐(0)

2015年12月16日

摘要: 在web.xml的Struts2的配置上面加上 OpenSessionInViewFilter org.springframework.orm.hibernate4.support.OpenSessionInViewFilter ... 阅读全文
posted @ 2015-12-16 09:41 james-roger 阅读(384) 评论(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 阅读(159) 评论(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 阅读(278) 评论(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 阅读(273) 评论(0) 推荐(0)

2015年11月23日

摘要: lhgdialog主调函数参数说明:主调函数: J.dialog.get( id, options );参数说明:1. id :窗口 id 号,必写项,不能省略 。每个窗口的 id 必须是唯一的不能重复。2. options : json 格式的 key /value 对象参数,它包括以下选项,都是... 阅读全文
posted @ 2015-11-23 14:50 james-roger 阅读(202) 评论(0) 推荐(0)

2015年11月22日

摘要: 例子:interface Fruit{ public void eat();}class Apple interface Fruit{ public void eat(){ System.out.println("**吃苹果"); }};class Orange in... 阅读全文
posted @ 2015-11-22 15:34 james-roger 阅读(146) 评论(0) 推荐(0)

2015年11月20日

摘要: public class BatchDownloadServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) thro... 阅读全文
posted @ 2015-11-20 17:51 james-roger 阅读(312) 评论(0) 推荐(0)