Fixed : Spring Hibernate – could not obtain transaction-synchronized Session for current thread

If you ever run into this exception in your spring-hibernate setup then just do following things.

1 – Annotate all your @Repository classes with @Transactional attribute
2 – Add @EnableTransactionManagement to your config class which is generating sessionFactory & hibernateTransactionManager. That’s it 🙂

Leave a comment

Your comment

*