Adding support for xml and annotation config