We propose a new efficient strategy to construct exact solutions of Einstein-scalar gravities. We find that with some given metric Ansatz the EOMs (equations of motion) are invariant under a rescaling operation along the radial direction, which makes the function of the scalar field scale invariant. Our strategy is to use the symmetry of the EOMs to give a scale invariant Ansatz for scalar field first, then derive the metric and the corresponding scalar potential later. We construct large classes of exact solutions with two kinds of spherical metric, which include many new scalar hairy black holes in different dimensions and some three-dimensional solitons and conical defects. We also discuss the thermodynamics of these solutions in general with Wald's formula.