[spring] refactor entitymanagerfactory