Just War theory is the attempt to distinguish between justifiable and unjustifiable uses of organized armed forces. Just War theories attempt to conceive of how the use of arms might be restrained, made more humane, and ultimately directed towards the aim of establishing lasting peace and justice. (Source: JustWarTheory.com)
Just War tradition addresses the morality of the use of force in two parts: when it is right to resort to armed force (the concern of jus ad bellum) and what it is right to do in using such force (the concern of jus in bello). (Source:  Just Cause Revisited])
In more recent years, a third category - Jus post bellum - has been added, which governs the justice of war termination and peace agreements, as well as the trying of war criminals.
Just War theory has ancient roots. The so-called Song of Deborah in the 5th chapter of the Hebrew Bible's Book of Judges discusses late Bronze Age conceptions of what distinguishes a "just" holy war. Cicero discussed this idea and its applications. Augustine of Hippo, Thomas Aquinas and Hugo Grotius later codified a set of rules for a just war, which today still encompass the points commonly debated, with some modifications.
So, there is the answer to the first bit - the principle of "Just War" does go back a long way. Korea was not the first by a long shot.
WW2 - Definitely.
WW1 - Hmm, probable though not certain.
Boer - No
Crimea - Probable no.
Maori Wars - Definite no.
That is as far back as I go...