Perhaps Confucius' most famous teaching was the Golden Rule stated in the negative form, often called the silver rule:
子貢問曰、有一言、而可以終身行之者乎。子曰、其恕乎、己所 不欲、勿施於人。
zǐ gòng wèn yuē, yǒu yī yán, ér kěyǐ zhōngshēn xíng zhī zhě hū. zǐyuē,
qí shù hū, jǐ suǒ bù yù, wù shī wū rén.
Adept Kung asked: "Is there any one word that could guide a person throughout life?"
The Master replied: "How about 'shu' [reciprocity]: never impose on others what you would not choose for yourself?"

I found a great
collection of World religions that share this belief.