1. 程式人生 > >SpringBoot Mybatis 執行自定義SQL

SpringBoot Mybatis 執行自定義SQL

1.XML中執行自定義SQL、

https://blog.csdn.net/u012427355/article/details/80654806

2.註解執行自定義SQL

   @Select("${_parameter}")
    @Results({
            @Result(column = "id", property = "id"),
            @Result(column = "name", property = "name"),
    })
    public List<User> executeDefineSql(String sql);

其實就是把sql改成