Why were warriors despised in China but glorified in Japan despite both being Confucian societies?

同為儒家社會,為什么中國鄙視武士而日本贊美武士?