Adding SessionFactory bean to rest config