一、创建Student实体类
public class Student {
private Integer id ; // object identifier filed
private String name ; // student name
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
二、创建StudentDao实体类(数据链路层)
package com.itlaobing.aop.annotation.dao;
import com.itlaobing.aop.annotation.domain.Student;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;
// <bean id="studentDao" class="com.itlaobing.aop.annotation.dao.StudentDao" scope="singleton" />
@Repository
@Scope( "singleton" )
public class StudentDao {
public void persist(Student s ) {
System.out.p