Republican Rome is the example I know best, and...it sorta fits?
Rome fought a lot of wars, and they were usually pretty extractive: sometimes total wars in which the entire losing side was killed or enslaved, other times wars of conquest in which the losing states were basically left intact but made to give tribute (usually money and/or soldiers for the legions). They definitely relied on captured foreigners to work their farms, especially in Sicily where it was hard to escape, and they got so rich from tribute that they eliminated most taxes on citizens in the 160s BC.
It’s not clear that Rome was short of food and slaves when it started those wars, though. If anything, they sometimes had the opposite problem: around 50 BC so many farmers and farmers’ sons were being recruited into the legions that Italian farmland wasn’t being used well. I think the popular consensus is that a lot of warfare and especially enslavement was a principal-agent issue: Roman generals were required by custom to split any captured booty with their soldiers, but were allowed to keep all the profits from slave-trading for themselves. Enslaving a tribe of defeated Gauls was a great way to get rich, and you needed to be rich to advance in Roman politics.
To summarize, Roman warfare during the republic was definitely essential to Roman food security, but they got into a lot more wars than you’d predict from that factor alone.
Clear exceptions to the rule include the Social war (basically an Italian civil war), the third Punic war (eliminating the existential threat of Carthage), and some of Caesar’s post-dictatorship adventures (civil war again).
Republican Rome is the example I know best, and...it sorta fits?
Rome fought a lot of wars, and they were usually pretty extractive: sometimes total wars in which the entire losing side was killed or enslaved, other times wars of conquest in which the losing states were basically left intact but made to give tribute (usually money and/or soldiers for the legions). They definitely relied on captured foreigners to work their farms, especially in Sicily where it was hard to escape, and they got so rich from tribute that they eliminated most taxes on citizens in the 160s BC.
It’s not clear that Rome was short of food and slaves when it started those wars, though. If anything, they sometimes had the opposite problem: around 50 BC so many farmers and farmers’ sons were being recruited into the legions that Italian farmland wasn’t being used well. I think the popular consensus is that a lot of warfare and especially enslavement was a principal-agent issue: Roman generals were required by custom to split any captured booty with their soldiers, but were allowed to keep all the profits from slave-trading for themselves. Enslaving a tribe of defeated Gauls was a great way to get rich, and you needed to be rich to advance in Roman politics.
To summarize, Roman warfare during the republic was definitely essential to Roman food security, but they got into a lot more wars than you’d predict from that factor alone.
Clear exceptions to the rule include the Social war (basically an Italian civil war), the third Punic war (eliminating the existential threat of Carthage), and some of Caesar’s post-dictatorship adventures (civil war again).