consolidate spring and hibernate