hqy309
不积跬步、无以致千里!
1
摘要: 1.要有继承2.要有重写3.父类引用指向子类对象 阅读全文
posted @ 2013-03-09 23:24 hqy309 阅读(89) 评论(0) 推荐(0)
摘要: personServiceImpl.javapackage tohibernate.annotation;import javax.annotation.Resource;import org.springframework.stereotype.Service;import org.springframework.transaction.annotation.Transactional;@Service(value = "personService")public class PersonServiceImpl implements PersonService { @Re 阅读全文
posted @ 2013-02-03 23:58 hqy309 阅读(163) 评论(0) 推荐(0)
摘要: Person.javapackage tohibernate.xml;public class Person { private long pid; private String pname; public long getPid() { return pid; } public void setPid(long pid) { this.pid = pid; } public String getPname() { return pname; } public void setPname(Strin... 阅读全文
posted @ 2013-02-03 15:36 hqy309 阅读(136) 评论(0) 推荐(0)
摘要: personServiceImpl.javapackage jdbc.transaction.annotation;import javax.annotation.Resource;import org.springframework.stereotype.Service;import org.springframework.transaction.annotation.Transactional;@Service(value="personService")public class PersonServiceImpl implements PersonService { 阅读全文
posted @ 2013-01-31 23:29 hqy309 阅读(340) 评论(0) 推荐(0)
摘要: 声明式事务处理: * 程序员声明 * sping容器来处理事务applicationContext.xml<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/ 阅读全文
posted @ 2013-01-30 21:51 hqy309 阅读(202) 评论(0) 推荐(0)
摘要: personDaoImpl.javapackage jdbc;import java.util.List;import org.springframework.jdbc.core.JdbcTemplate;import org.springframework.jdbc.core.support.JdbcDaoSupport;import org.springframework.stereotype.Repository;public class PersonDaoImpl extends JdbcDaoSupport implements PersonDao { @Override ... 阅读全文
posted @ 2013-01-30 21:37 hqy309 阅读(175) 评论(0) 推荐(0)
摘要: PersonDaoImpl.javapackage aop.annotation;import org.springframework.stereotype.Repository;@Repository("personDao")public class PersonDaoImpl implements PersonDao { @Override public void savePerson() { System.out.println("savePerson"); }}Transaction.javapackage aop.annotation;impo 阅读全文
posted @ 2013-01-29 23:23 hqy309 阅读(257) 评论(0) 推荐(0)
摘要: applicationContext.xml<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLoca 阅读全文
posted @ 2013-01-29 23:20 hqy309 阅读(239) 评论(0) 推荐(0)
摘要: 使用jboss 4.0.4GA 使用jstl无效,改web.xml的scheme为<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4" 阅读全文
posted @ 2013-01-04 14:27 hqy309 阅读(131) 评论(0) 推荐(0)
摘要: 创建对象三种方式:1.new 2.反射 3.对象的clone()方法spring创建对象:1.构造器实例化。2.静态工厂方法实例化。3实例工厂方法实例化 阅读全文
posted @ 2012-11-15 22:37 hqy309 阅读(101) 评论(0) 推荐(0)
1