Well, debatable. Last major war before WWI was in 1870, however there was an arms race and escalation of military preparation since the last years of the 1890s. So you really only had a couple of decades of peace, then people started preparing for war again.