Replaced XML config with JavaConfig