Xanthippe - Confucius and others introduced the Golden Rule (treat others as you would be treated) at around the same time.
Actually, the Golden Rule goes waaaaay back—even before Confucius.
The Eloquent Peasant from Ancient Egypt is the first story to ever record this rule. The story dates back to ca. 19th century BCE (Middle Kingdom of Ancient Egypt.) That's around 14 centuries before Confucius. You can find this story here. The rule appears on page 174: "This is the precept: Do to the doer to make him do."
There's also a papyrus from the Late Period of Egypt, which contains a similar rule: "That which you hate to be done to you, do not do it to another." The papyrus is damaged, so we don't have all of the text, but there's enough to see the rule itself. You can find the translation on page 95 of this document.