Replacing xml configuration for java based configuration.