How did Confucius think that one should live?

according to the king's demands
according to the wishes of the family
according to government rules
according to a high ethical code