java - Alternative locations for Hibernate mapping files? -


i read introductory tutorial on hibernate had mapping files inside same source directory of entities represented:

testproject/     src/main/java/         com.hibernate.tutorial.entities             student.java             student.hbm.xml              course.java             course.hbm.xml 

etc. normally, place config files under src/main/config, , ideally i'd have following project directory structure:

testproject/     src/main/java/         com.hibernate.tutorial.entities             student.java             course.java     src/main/config         hibernate/             student.hbm.xml             course.hbm.xml 

is there way this, , if so, how? in advance!

there 2 ways map pojo class hibernate entity:

  1. xml mapping
  2. using annotations

annotations becomes more prevalent last years. examples find here:

example1

example2


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -