Check out example codes for "org.hibernate.HibernateException: No CurrentSessionContext configured! hibernate spring". It will help you in understanding the concepts better.
Code Example 1
<!-- For Properties File -->
spring.jpa.properties.hibernate.current_session_context_class=org.springframework.orm.hibernate4.SpringSessionContext
<!-- For XML Config -->
<property name="hibernate.current_session_context_class">thread</property>
Learn ReactJs, React Native from akashmittal.com