Optical and near-infrared survey of the stellar contents associated with the star-forming complex Sh2-252