<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                Minidao SQL注解寫法 === ### 第一步: 定義接口 EmployeeDao.java (不需要實現) ``` @Repository public interface EmployeeDao { @Sql("select * from employee where id = :id") Employee get(@Param("id") String id); @ResultType(Employee.class) public MiniDaoPage<Employee> getAll(@Param("employee") Employee employee,@Param("page") int page,@Param("rows") int rows); @Sql("delete from employee where id = :id") public void delete(@Param("id") String id); } ``` minidao 代理機制會自動實現接口,將實現bean注入到spring容器里面,這個比mybatis要簡易很多。 ### 第二步: 在接口上方使用@Sql 編寫SQL ``` @Sql("select * from employee where id = :id") Employee get(@Param("id") String id); ``` 其他注解說明: 注解標簽 | 說明 | 示例 | ---|---|---| @Sql | 定義SQL內容 | @Sql("select * from employee where id = :id") | @Param | 定義Sql傳入參數名稱 | Employee get(@Param("id") String id); | @ResultType | 定義SQL返回結果類型 說明:單結構對象類或者弱類型返回類型,可以不設置 | @ResultType(Employee.class) public MiniDaoPage<Employee> getAll |
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看