Japan dominated the world economy with minimal military spending (defensive in nature), because it didn't intend to start a war.
In contrast, Hitler did not mass produce vegetable oils, VWs, Mercedes, railroad engines, freighters or Condors in order to export them and grow economically (like Schacht, his economist wanted), but put his money on thousands of planes, tanks, the Bismarck, expensive synthetic fuel, etc, and attacked Europe in a few years.
China is both exporting unprecedented amounts of goods (like Japan did) and using much of its income to grow militarily (like Hitler did, but at a slower pace). No country that is not threatened would be foolish enough to spend fortunes expanding and modernizing rapidly its military for offensive operations if it does not intend to use it.
China is upgrading it's miltary. It is now chosing for quality instead of quantity. A lot of their military stuff is still outdated. It is quite normal for a country that gets rich to augment their miltary and they desperately need a bigger and better armed navy to protect their supply lines. Nothing wrong with that.