摘要:
【转】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 阅读全文
摘要:
自Spring3.1开始,JdbcTemplate 和 NamedParameterJdbcTemplate 已经能够实现SimpleJdbcTemplate 的 所有功能。 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
阅读全文
摘要:
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... 阅读全文
摘要:
//定义切入点@Pointcut("execution (* *..WelcomeService.*(..))");public void performPoint(){ /* 空实现 */ }//使用方式@Before("performPoint()")@After("performPoint()") 阅读全文
摘要:
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... 阅读全文
摘要:
say* aop.service.WelcomeService beforeAdvisor 阅读全文