mybatis 的 sql允许写在 java 文件里头,也可以写在xml里头,如果同时写,会执行哪个?
@Select({""})
int getEo(@Param("id") Integer id);
select 2 from t_table where id=#{id}
会报错,启动失败。

mybatis 的 sql允许写在 java 文件里头,也可以写在xml里头,如果同时写,会执行哪个?
@Select({""})
int getEo(@Param("id") Integer id);
select 2 from t_table where id=#{id}
会报错,启动失败。