zoukankan      html  css  js  c++  java
  • Spring DATA JPA

    参考:《深入浅出学Spring Data JPA》

      http://www.open-open.com/doc/view/352ba403e821483b8f0ccb60bbefb904

    参考:http://www.cnblogs.com/chenying99/p/3143509.html

    1、findUserByLoginId(@Param("loginId") String loginId),将括号里的loginId参数化,@Query语句中,=号右边就是':loginId',

        @Query(value = "FROM UserInfo u WHERE u.loginId=:loginId")
        public UserInfo findUserByLoginId(@Param("loginId") String loginId);

    2、'?1' 就是getProjectById(String proId)里第一个参数proId,如果里面有两个参数,@Query语句里应该还有'?2' (和上面意思一样)

        @Query(value = "From Proinfo f where proId = ?1")
        public List<Proinfo> getProjectById(String proId);
  • 相关阅读:
    tty & pty & pts
    PageRank
    How to run a terminal inside of vim?
    vimdiff
    svn's tree conflict
    svn's diff command
    符号表分离
    gcc -D
    Options for Debugging Your Program or GCC
    invoking gdb
  • 原文地址:https://www.cnblogs.com/Donnnnnn/p/5852868.html
Copyright © 2011-2022 走看看