Sanko
V2EX  ›  问与答

SpringBoot 开发中使用 Dao 还是使用 Mapper

  •  
  •   Sanko · Feb 6, 2019 · 9994 views
    This topic created in 2828 days ago, the information mentioned may be changed or developed.
    10 replies  •  2019-02-07 18:04:06 +08:00
    fanfpy
    fanfpy
    Feb 6, 2019 via Android
    1
    你说的包名吗?
    Foxkeh
    Foxkeh
    Feb 6, 2019 via Android
    2
    你是直指的 JPA or MyBatis 吗?
    maxiujun
    maxiujun
    Feb 6, 2019
    3
    Dao 是念“倒”, “刀”,“道”, 还是“捯”?有标准读法吗?
    kqz901002
    kqz901002
    Feb 6, 2019
    4
    问题问的莫名其妙
    sdijeenx
    sdijeenx
    Feb 6, 2019
    5
    @maxiujun 字典说 Dao 就是 Tao 的别名。
    Dao | BrE daʊ | AmE |
    noun uncountable
    = Tao
    Tao | daʊ, taʊ | (also Dao)
    noun
    (in Chinese philosophy) the absolute principle underlying the universe, combining within itself the principles of yin and yang and signifying the way, or code of behavior, that is in harmony with the natural order. The interpretation of Tao in the Tao-te-Ching developed into the philosophical religion of Taoism.
    Sanko
    Sanko
    OP
    Feb 6, 2019
    6
    @fanfpy 对,包名
    @Foxkeh MyBatis,不过项目结构和这个有关系吗
    @kqz901002 刚接触 springboot 请见谅,网上看了很多项目结构什么样的都有,所以前来请教
    CFO
    CFO
    Feb 7, 2019 via Android
    7
    我的 dao 文件夹里放的是 mapper …
    gejun123456
    gejun123456
    Feb 7, 2019 via iPhone
    8
    mybatis 的话 mapper 就行罗
    WispZhan
    WispZhan
    Feb 7, 2019 via Android
    9
    不同场景,用不同东西。混用又不是不行,不明白有什么好纠结的。这种帖子隔段时间就有人发
    WispZhan
    WispZhan
    Feb 7, 2019 via Android
    10
    @WispZhan 我错了,都行。统一命名,定制规范就行。
    类以 mapper 结尾更好。

    包名都行,dao 范围更大,mapper 有局限
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1556 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 23:04 · PVG 07:04 · LAX 15:04 · JFK 18:04
    ♥ Do have faith in what you're doing.