-1

> *while mapping there are two approaches,XML based approach and Annotation based approach?

which is good approach among them?*

  • 2
    Possible duplicate of [Hibernate annotation or XML configuration](https://stackoverflow.com/questions/7147018/hibernate-annotation-or-xml-configuration) – Ubercool Mar 03 '18 at 08:48

1 Answers1

1

Xml based configuration was past, annotation is present. Advantages are less code, number of files, automatic processing, integration with IDE, more information in single file, less error pron, maintainable and many more.

Ubercool
  • 1,029
  • 2
  • 14
  • 29