BEIJING—China’s economy steamed along in the second quarter, beating forecasts and matching the 6.9% expansion in the first, as Beijing balances its growth objectives against the need to rein in excessive credit and an overheating property market.

That there was no deceleration in growth is a powerful signal that Beijing will be able to maintain stability in the world’s second-largest economy ahead of a leadership shuffle this year….