should we use annotations?
程序员文章站
2022-06-08 09:01:51
...
should we use annotations?
If your answer is yes to the following questions then you can use annotations in your project.
1.Do you have the flexibility to use Java 5 Environment?
2.Do you have the knowledge of which production database you are going to use?
If yes, you can use annotations, this brings in strong coupling. Inorder to support multiple databases, it is better to have the mapping information in a seperate xml file rather than using annotations. You can easily have multiple xml files each specific for a particular database rather than having a different sets of source codes.
上一篇: 基于PHP遍历数组的方法汇总分析