Home > Back-end >  Mybatis generally use XML or annotations to write SQL
Mybatis generally use XML or annotations to write SQL

Time:10-10

Curious about is how to use in the company with mybatis tell me

CodePudding user response:

Simple to use annotations, actually, I almost all projects in the company is in XML, other companies are not clear,

CodePudding user response:

Use annotations, SQL is mixed together with the code, inconvenient maintenance, most still in XML

CodePudding user response:

Look at the specific demand, if it involves more information, you can use mybatis generator - these are automatically generated XML type, if only for one or two table with some simple query of what, with annotations directly,
  • Related