in my applicationContext.xml, this is how I map xml to POJO. how to map directory to class file without required to create xml?
You can use annotations on your class, though for Hibernate I'm not sure there's something built in (for use in Spring). This thread should help if yo want to avoid yet more technology, but you could also use Java Persistence Annotations (JPA) in concert with Hibernate to accomplish the same goal.
Here's a good tutorial for using JPA + Hibernate + Spring.