Java config refactoring.