摘要:
Spring 的AOP实现技术之JDK的动态代理技术实例: 接口:IUserService (Spring的AOP是动态AOP,实现技术:JDK提供的动态代理和cglib代理,cglib它可以为没有实现接口的类做代理,也可以为接口类做代理.如果有接口,使用JDK动态代理,如果没有,使用cglib动态 阅读全文
摘要:
SQL多表操作分类; 1.交叉连接:select*from t_customer cross Join t_order; 2.显示内连接: select*from t_customer c inner join t_order o on c.id=o.c_customer_id; 隐示内连接:sel 阅读全文
摘要:
恢复内容开始 Hibernate的检索方式分为五种: 1.对象导航检索.根据已加载的对象,调用方法.导航到其他对象 Customer c=session.get(Customer.class,2); c.getOrders().size() 2.OID检索:按照对象的OID检索对象:通过get/lo 阅读全文
摘要:
在hibernate.cfg.xml配置<mapping class="oneToOne.IDCard" />,以及实体类的get和set方法省略了. User类 IDCard类 Test类 阅读全文
摘要:
customer @Entity /实体@Table(name="t_customer") //数据库表的名称,public class Customer { @Id 主键 @GeneratedValue(strategy=GenerationType.IDENTITY) //主键生成策略,自动增长 阅读全文
摘要:
jsp <title>查看所有商品</title><script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.3.js"></script><script type="text/javasc 阅读全文
摘要:
jsp <script type="text/javascript" src="/struts2.0/js/jquery-1.11.3.min.js"></script><script type="text/javascript"> function checkUsername(){ //获取文本框 阅读全文
摘要:
jsp <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.3.js"></script><script type="text/javascript"> $(function(){ 阅读全文
摘要:
public class jackson { @Test public void text(){ Product p1 = new Product(); p1.setId(1); p1.setName("电视机"); p1.setPrice(2000); p1.setRelease(new Date 阅读全文
摘要:
public class FastJsonText { @Test public void text(){ User user1 = new User(); user1.setName("健康"); user1.setAge(18); user1.setId(1); user1.setBirthda 阅读全文