http://java.dzone.com/articles/ibatis-mybatis-handling-joins
http://mybatis.github.io/spring/mappers.html
If the UserMapper has a corresponding MyBatis XML mapper file in the same classpath location as the mapper interface, it will be parsed automatically by the MapperFactoryBean. There is no need to specify the mapper in a MyBatis configuration file unless the mapper XML files are in a different classpath location. See the SqlSessionFactoryBean's configLocation property for more information.
用mybatis-spring的时候找了好就配置文件和mapper文件怎么放,其实放接口同一目录就行,不用担心人家会自动找到。
annotation遇到many的时候说啥也不行,建议不要用。
mybatis最重要的就是mapping了,nested select会带来n+1的问题,用nested mapper