China is spending more to maintain internal security than to defend the country from external enemies.