xmlns:xsi=\ xmlns:aop=\
xsi:schemaLocation=\
xmlns:context=\ xmlns:tx=\
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd\ default-autowire=\ default-lazy-init=\>
class=\>
class=\>
05. 用到了spring的aop,因此我们把spring的aop的jar包aspectjrt.jar和aspectjweaver.jar
加入到lib目录。spring没有开发自己的aop的jar包,它也是利用别人已经开发好的jar包aspectjrt.jar和aspectjweaver.jar。
06. 新建com.oa.model,如图所示。
新建Package
07. 在com.oa.model下新建一个Person的类,如图所示。
Name写入Person
08. 配置Person.java,如图所示。 Java代码
package com.oa.model; public class Person { private int id; private String name; private String sex; private String address;
private String duty; private String phone; private String description; public int getId() { return id; }
public void setId(int id) { this.id = id; }
public String getName() { return name; }
public void setName(String name) { this.name = name; }
public String getSex() { return sex; }
public void setSex(String sex) { this.sex = sex; }
public String getAddress() { return address; }
public void setAddress(String address) { this.address = address; }
public String getDuty() { return duty; }
public void setDuty(String duty) { this.duty = duty; }
public String getPhone() { return phone; }
public void setPhone(String phone) { this.phone = phone; }
public String getDescription() { return description; }
public void setDescription(String description) { this.description = description; } }
09. 在com.oa.model包下新建Person.hbm.xm映射文件,如图所示。