
package com.wzy.text;import com.baomidou.mybatisplus.plugins.Page;import com.wzy.mapper.EmployeeMapper;import com.wzy.pojo.Employee;import org.junit.Test;import org.springframework.context.ApplicationContext;import org.springframework.context.support.ClassPathXmlApplicationContext;import java.sql.SQLException;public class TestS { ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml"); EmployeeMapper employeeMapper = applicationContext.getBean("employeeMapper",EmployeeMapper.class); @Test public void test11() throws SQLException { //根据id删除数据 Integer result = employeeMapper.deleteById(21); System.out.println(result); }}