MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    想问问如何在 mirai-core 中使用 Myabtis-plus

    开发交流
    2
    3
    51
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      Corybyte last edited by

      想问问如何在 mirai-core 中使用 Myabtis-plus? 看了几个帖子好像说不建议使用spring 作为依赖环境

      1 Reply Last reply Reply Quote 0
      • wssy001
        wssy001 ⭐2021⭐ last edited by

        关于spring环境的建议,个人看法是:
        认清mirai机器人在项目中的角色。如果你的项目简单、业务围绕机器人展开,不太建议使用spring;但如果mirai在你的项目中仅充当一个用户交互方式(例:消息通知、消息传递等),建议使用spring环境。当然,如果你熟悉spring或springboot,那为啥不用spring或springboot反而去用mirai的依赖环境?

        mybatis-plus使用了spring的AOP、事务等内容,导致它与非spring(或非springboot)项目不能完美兼容。当你使用mybatis-plus作为ORM时,你的项目注定是spring(或springboot)的!

        C 1 Reply Last reply Reply Quote 0
        • C
          Corybyte @wssy001 last edited by

          @wssy001 不太熟悉spring 但是需要实现与数据库交互

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact