Xi Jinping has asserted the government’s willingness to “defeat all invasions” despite its citizens loving peace.