已知 package cn.edu.huel.mapper 下有 CustomerMapper.java 和 CustomerMapper.xml 两个文件 ;src 的根目录下有一个 myBatis-config.xml 文件。该程序要完成按 id 查询的功能。请给把程序补写完整。 (1) CustomerMapper.java import cn.edu.huel.po.Customer; public interface CustomerMapper { // 根据 id 查询客户 public Customer findCustomerById( int id ); } (2) CustomerMapper.xml < mapper namespace = " 1 " > < select id = "findCustomerById" parameterType = " int " resultType = " 2 " > select * from t_customer where id = #{value} select > (3) myBatis-config.xml < configuration > < typeAliases > < typeAlias type = "cn.edu.huel.po.Customer" alias = "customer" /> typeAliases > < environments default = "mysql" > ... ... environments > < mappers > < mapper class = "cn.edu.huel.mapper.CustomerMapper" /> mappers > configuration > ( 4 )测试方法: @Test public void findCustomerByIdTest() throws IOException { //SqlSessionTools 为一个工具类 SqlSession sqlSession = SqlSessionTools. getSession (); CustomerMapper customerMapper = sqlSession .getMapper( 3 ); Customer customer = customerMapper . 4 (3); sqlSession .close(); System. out .println( customer ); }