用@Transactional注脚声明式地管理事务

用@Transactional注解声明式地管理事务@Transactionalpublic class EmployeeService implements EmployeeS

用@Transactional注解声明式地管理事务






@Transactionalpublic class EmployeeService implements EmployeeServiceInter {private SessionFactory sessionFactory;public void addEmployee(Employee employee) {// TODO Auto-generated method stubsessionFactory.getCurrentSession().save(employee);}}