package com.sf.mapperTest;


import com.sf.entity.Person;
import com.sf.mapper.PersonMapper;
import com.sf.util.SqlSessionFactoryUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

/**
 * @author WanJl
 * @version 1.0
 * @title PersonMapperTest
 * @description
 * @create 2025/11/2
 */
public class PersonMapperTest {
    @Test
    public void testSelectAll(){
        SqlSession sqlSession = SqlSessionFactoryUtils.getSqlSession();
        PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
        List<Person> persons = personMapper.selectAll();
        persons.forEach(System.out::println);
    }
}
