(A Ship of Peace by Preference, and War by Necessity. And highly capable at both).
Then again, we have had four different characters explicitly say "The Enterprise is not a ship of war."
And one of my favorite lines from TNG Season one has Worf telling his Klingon renegade friends: "When relieved of its bulk,
the Enterprise becomes an exceptional weapon."
IMO, the Enterprise is actually the perfect avatar of what Starfleet really is: It's an exploration ship with a small, combative component. When faced with an enemy, it can detach its civilian/exploratory module and go into combat, in which case it totally kicks ass. But the Enterprise-D isn't a complete starship without the saucer section; it isn't a complete crew without its science officers or the civilian researchers. It isn't a complete mission without its science sensors and its non-combat capabilities are severely limited without the labs, computers and main shuttlebay all housed in the saucer section. Even the MAIN BRIDGE of the ship is in the saucer section, while the battle bridge is totally unused except during separation.
Now consider this: a military vessel dedicated to exploration would be built very differently. We would see a vessel primarily designed for combat to which a smaller, semi-expendable scientific component is attached. The main bridge and primary systems would all be in the main ship, while the scientific module would be an ancillary component, without which the ship would function perfectly well. A "military vessel on a mission of exploration" is exactly what it sounds like...
but the Enterprise-D is an exploration vessel that shed its tactical systems and send THEM into battle independently.
Which, finally, leads us to the very interesting fact that none of the Galaxy Class starships we saw in the Dominion War were actually separated and they all had their saucers attached. The real reason for this, we know, is a simple oversight by the FX team that hadn't remembered that starships could do this (although it's also very curious that USS Odyssey took the time to evacuate the non-essential personnel from the ship instead of simply leaving its saucer section in the Alpha Quadrant). But in-universe, we can conclude the galaxy class starships that participated in the Dominion War were as valuable as they were because they were able to add their scientific capabilities to the mission, despite the loss of agility and combat potential the extra bulk entailed. The same thing happens with the Enterprise-D fighting the Borg: rather than leave the Saucer out of the fight, they decide to use it as part of their strategy and take the Borg by surprise. This suggests to me, not only that the Dominion War is a special case for Starfleet (and could, given the occupation of Cardassia, very EASILY see the end of their non-military status) but that their scientific expertise is Starfleet's biggest advantage anyway.