Spring Boot ibatis 注解中 动态传入表名

Java ibatis @Select注解中 动态传入表名

举例

@Select(“select card_number cardNumber,name from ${tableName} where card_number=#{cardNumber}”)

public IdCard getIdCardByCardNumber(@Param(“cardNumber”) String cardNumber, @Param(“tableName”) String tableName);

 

分表分库时有用