typeAliasesThere are many built-in type aliases for common Java types. They are all case insensitive, note the
special handling of primitives due to the overloaded names.
typeAlias:为某个java类型起别名
type:指定要起别名的类型全类名;默认别名就是类名小写;employeealias:指定新的别名 起别名
配置文件:
映射文件:
select id,last_name,email,gender from tb1_employee where id = #{id}
配置文件:
映射文件:
批量起别名
package:为某个包下的所有类批量起别名
name:指定包名(为当前包以及下面所有的后代包的每一个类都起一个默认别名(类名小写))
注:别名不区分大小写
Alias
批量起别名的情况下,使用@Alias注解为某个类型指定新的别名


![[mybatis]Configuration XML [mybatis]Configuration XML](http://www.mshxw.com/aiimages/31/710631.png)
