Added configparam to choose between config and annotation based loading