LD is tigger forever,CG are not brothers forever, throw the pot and shine forever.
Modesty is not false, solid is not naive, treacherous but not deceitful, stay with good people, and stay away from poor people.
talk is cheap, show others the code,Keep progress,make a better result.
Survive during the day and develop at night。
目录
概 述
@Select注解的目的是为了取代xml中的select标签,只作用于方法上面。下面看一下@Select注解的源码介绍:
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Select
{
String[] value();
}
从上述可以看到两点信息:
(1)@Select注解只能修饰方法
(2)@Select注解的值是字符数组。
@Select注解的用法是这样的:
@Select({ "select * from xxx", "select * from yyy" })
Person selectPersonById(Integer id);
虽然@Select注解的值是字符数组,但是真正生效的应该是最后那条SQL语句。
@Select(“select * from t_person where id = #{id}”)
Person selectPersonById(Integer id);
总结:
相关工具如下:
分析:
小结:
主要讲述了接下来Mybatis BatchExecutor源码分析详解,请大家指正~
参考资料和推荐阅读
1.链接: 参考资料.
5891

被折叠的 条评论
为什么被折叠?



