On a sunny day at Navy-Marine Corps Memorial Stadium in Annapolis last week, President Reagan was in a happy mood and effective form as he celebrated the virtues of military preparedness before the 1985 graduating class of the U.S. Naval Academy.

Warming up a friendly crowd, Reagan told a joke about John Paul Jones' weary gunner's mate, who was loading cannon during a pitched battle while Jones was changing uniforms below deck. Jones, reappearing in time to hear the British captain demand that he strike his colors, gave his historic reply, "I have not yet begun to fight."

"And the gunner's mate said, 'There's always somebody who didn't get the word,' " Reagan concluded.

Reagan then gave a glowing account of the military buildup during his first term and promised that, "as long as I'm president," the nation would never let down its defenses. But recent events suggest that he and Defense Secretary Caspar W. Weinberger have failed to get the word about what has happened to the national consensus on spending.

Two weeks ago, as the Senate prepared to mark up the defense authorization bill, Weinberger cut his last frayed ties of credibility with Capitol Hill by miraculously discovering $4 billion in Pentagon accounts that could be applied to the defense budget. This legerdemain outraged loyal Republicans, including Senate Armed Services Committee Chairman Barry Goldwater (R-Ariz.), who called the defense secretary a "goddam fool" and said Weinberger should have made the notification much sooner.

The day before Reagan's Annapolis speech, the Navy suspended major defense contracts with General Dynamics Corp. and questioned "the integrity and responsibility of the corporation." The day after the speech, the House passed a budget eliminating even inflationary increases in defense spending and the Senate drastically curtailed Reagan's MX missile request.

Predictably, the White House is blaming Congress while Reagan is claiming, as he did at Annapolis, that reports about "outrageously expensive hammers and bolts" are really "success stories" that illustrate administration "efforts to make the best use of our defense dollar."

The president may believe this excuse, but a search of Reagan speeches during the early part of his administration shows that he usually assailed "waste, fraud and abuse" in domestic programs and described the defense budget in terms more appropriate for a starved child.

Reagan came to office having forged strong public support for "rebuilding America's defenses." In five years, he nearly doubled U.S. spending for defense. But he also ignored signals from military-minded members of Congress and his budget director that this pace could not be sustained and that the mood of the country was shifting on defense spending. During preparation of the budget, it became apparent to everyone except Weinberger that the federal deficit and Reagan's refusal to increase taxes required belt-tightening on defense.

In December, congressional advocates of military spending became incensed by Weinberger's contempt for their arguments. House Republican Policy Committee Chairman Dick Cheney (Wyo.) said that if Reagan did not cut defense, "he becomes the No. 1 special pleader in town."

About the time that Cheney and Sen. Paul Laxalt (R-Nev.) were issuing such warnings, budget director David A. Stockman prepared an unpublished "standstill" budget that would have sharply braked Pentagon expansion. Reagan brushed it aside.

Since that time, disclosed wrongdoing in defense contracts has further undermined public support and made the once sacrosanct military budget a favorite target for those of every political hue in Congress.

"The skepticism goes beyond concern for expensive toilet seats and hammers," Cheney said last week. "The public now believes that there are deliberate efforts to bilk the taxpayers by contractors, and it has been reflected in the votes up here."

Cheney believes that the consensus for a buildup could have been maintained if the administration had led the charge against defense waste.

Salvaging even a remnant of this consensus would require a defense secretary who showed decent respect for opinions of congressional supporters. It would also require that the president view scandals undermining his defense budget as something other than "success stories."

Reaganism of the Week: In Annapolis Wednesday, Reagan recalled playing a naval officer in "Hellcats of the Navy" and added, ". . . If they would send me another script, it probably would be for 'Old Man and the Sea.' "