I have created a spring-boot based java application that uses spring's tasks. This is a console based java application that also uses hibernate to access database. This application is based on a spring sample for tasks and uses annotations instead of configuration files. For hibernate, I am actually using hibernate.cfg.xml and am initializing the hibernate session factory myself.
I wanted to use Spring's declaration transaction management but they are not working because I have not been able to find sample of how to initialize spring session factory through annotations. All samples show configuration through a configuration files. Can anybody point to how to initialize hibernate session factory through spring using annotations and code so that spring's declarative transactions would work.
Thanks in advance.
Waqar