Gen. Chun Doo Hwan, who seized power in a December 1979 military coup, was sworn in as South Korea's new president today pledging to lay the foundation of a "just society" while maintaining the nation's military preparedness.

The former general took the oath at a cremony attended by 9,000 selected guests that included some 200 representatives from 70 countries. Sen. Charles Percy (R-Ill.), chairman of the Senate Foreign Relations Committee who represented President Reagan at the ceremony, called the occasion an "important milestone in a new bright and hopeful beginning."

Percy added, "The American people, the Congress and our government welcome the accelerating effort by President Chun to restore Korea to institutional civilian government."

In a move designed to coincide with his inauguration and calls for national conciliation, Chun announced that amnesty would be granted to 5,221 persons. But the number of political prisoners released was less than 1,000.

Despite the festive arches, portraits of the president and national flags on streets and major intersections, all roads leading from the Blue Horse, the presidential mansion, to the ceremonial site were heavily guarded by armed soldiers and police officers.

In his address, Chun vowed that his administration would fight against poverty, political repression and abuses of power.

He also repeated an earlier invitation to North Korean President Kim II Sung to visit Seoul, adding, "Although indications of a negative response from the North Korean side have been reported, I do not consider it a formal rejection. It is my expectation that they will some day accept this opportunity."

Since taking over as interim president last September, Chun has ruled the country in the style of the late dictator Park Chung Hee. In a massive "purification" drive, thousands of dissidents and corrupt officials were rounded up together with hooligans, racketeers and gamblers, and political parties were dissolved.

Two months ago, political activities were allowed to resume, and Chun was elected as president of the republic Feb. 25 by an overwhelming vote in the electoral college. Prior to the presidential electoral college election, Chun lifted martial law and commuted the death sentence of major opposition leader Kim Dae Jung to life imprisonment.

But more than 500 prominent politicians have been banned from running for any election for many years to come.

Since Chun is also heading the newly formed Democratic Justice Party, his political leadership will be tested in parliamentary elections later this month, when a total of 276 legislators will be chosen for a new National Assembly. At present the assembly functions are carried out by a legislative council composed of 81 appointed members.