摘要: 【转】error C2555: 'MPI::Intercomm::Clone' : overriding virtual function differs from 'MPI::C重载错误:d:\program files\mpich2\include\mpicxx.h(1536) : error C2555: 'MPI::Intercomm::Clone' : overriding virtual function differs from 'MPI::Comm::Clone' only by return type or callin 阅读全文
posted @ 2014-02-17 10:48 聆听自由 阅读(1421) 评论(0) 推荐(0) 编辑
摘要: 自Spring3.1开始,JdbcTemplate 和 NamedParameterJdbcTemplate 已经能够实现SimpleJdbcTemplate 的 所有功能。 阅读全文
posted @ 2013-12-17 21:24 聆听自由 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 1.【注入方式】Dao实现类【持有】NamedParameterJdbcTemplate/** * 客户Dao实现类 */public class CustomerDaoImpl implements CustomerDao{ private NamedParameterJdbcTemplate npjt; // 持有对象 //插入 public void saveCustomer(Customer c) { String sql = "insert into customers(name,age) values(:name,:age)"; Ma... 阅读全文
posted @ 2013-12-17 11:54 聆听自由 阅读(662) 评论(0) 推荐(0) 编辑
摘要: 1.继承/** * 客户Dao实现类 */public class CustomerDaoImpl extends JdbcDaoSupport implements CustomerDao{ //插入 public void saveCustomer(Customer c) { String sql = "insert into customers(name,age) values(?,?)"; //通过getJdbcTemplate()获取 jdbc模板. getJdbcTemplate().update(sql,new Object[]{c... 阅读全文
posted @ 2013-12-17 10:22 聆听自由 阅读(364) 评论(0) 推荐(0) 编辑
摘要: 1.Dao的实现类/** * 客户Dao实现类 */public class CustomerDaoImpl implements CustomerDao{ /* jdbc模板,封装样板代码 */ private JdbcTemplate jt; // 待【注入】 /* 注入模板 */ public void setJt(JdbcTemplate jt) { this.jt = jt; } //插入 public void saveCustomer(Customer c) { String sql = "ins... 阅读全文
posted @ 2013-12-17 10:04 聆听自由 阅读(822) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-12-17 00:39 聆听自由 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 1.新接口/** * 访问身高接口 */public interface IHeight { public void setHeight(Integer height); public Integer getHeight();}2.新接口的实现类/** * 身高接口的实现 */public class HeightImpl implements IHeight{ private Integer height; @Override public void setHeight(Integer height) { this.height = hei... 阅读全文
posted @ 2013-12-16 23:48 聆听自由 阅读(278) 评论(0) 推荐(0) 编辑
摘要: //定义切入点@Pointcut("execution (* *..WelcomeService.*(..))");public void performPoint(){ /* 空实现 */ }//使用方式@Before("performPoint()")@After("performPoint()") 阅读全文
posted @ 2013-12-16 23:11 聆听自由 阅读(327) 评论(0) 推荐(0) 编辑
摘要: 1.被监控的接口,及其实现类(0侵入)/** * 演员 * */public interface Performer { public void show();}public class Singer implements Performer { @Override public void show(){ System.out.println("我是个歌手!");// String s = null;// s.length(); }}View Code 2.切片类/** * 观众 */@Aspect //切片publi... 阅读全文
posted @ 2013-12-16 21:34 聆听自由 阅读(243) 评论(0) 推荐(0) 编辑
摘要: say* aop.service.WelcomeService beforeAdvisor 阅读全文
posted @ 2013-12-16 12:48 聆听自由 阅读(318) 评论(0) 推荐(0) 编辑