LONDON (AP) _ It is a success story that repeats itself from city to city across Britain: derelict docklands being transformed into business, leisure and housing complexes for the millions who have prospered from the Thatcher revolution.

The docks, Britain's powerhouses when it was a maritime colossus, are winning a new lease on life as a former empire-builder metamorphoses into something akin to a nation of shopkeepers.

It is the ''feel-good factor'' generated by these millions of the newly prosperous on which Margaret Thatcher is banking as she bids for an unprecedented third consecutive term as prime minister in the June 11 general election. It is the counterpoint to a stubbornly high 10.9-percent unemployment rate.

The resuscitation of the London docklands, in the East End along the River Thames, is the largest redevelopment project in Europe, and it is happening on a smaller scale across the country, from Scotland and Liverpool in the north to Belfast in Northern Ireland, Swansea in Wales, Bristol in the southwest and Chatham in the southeast.

Chatham, whose dockyard once built the royal warships, is typical. Shut in 1982 for lack of orders, the 450-year-old dockyard is being turned into a museum, light-industry park and housing complex for the affluent overspill from London, 35 miles to the northwest.

Chatham's closure cost up to 7,000 shipbuilding jobs, and the area's unemployment rate shot to 18.5 percent. But it is now down to 13 percent as new businesses pour in at the rate of 150 a year.

Most experts agree that the transformation was inevitable, whoever was in power. But many of them ascribe its speed and success to the entrepreneurial spirit preached by Mrs. Thatcher and the Tories who dominate town councils in the Chatham area.

''It would have happened anyway, but the government and local councils have made it happen a lot faster,'' says David Homewood, economic consultant to the Medway district, which includes Chatham.

''You have families who have been working in the shipyards for 450 years. For them it's a tremendous wrench,'' Homewood said in an interview.

''The changes have been very dramatic,'' he said. ''Chatham could have remained a dockyard garrison town. The government provided the impetus to get us into the 20th century.''

As Mrs. Thatcher put it on a campaign trip to Chatham's docks, ''You can't resist change, you know. Otherwise we'd still be in the hansom cab age.''

The London Dockland Development Corp. had an occasional rough ride transforming an area steeped in working-class traditions into a haven for the yuppies who service London's financial district, run the burgeoning newspaper industry, sell real estate and manage advertising agencies.

The Thatcher government gave the developers sweeping powers to cut through red tape and override local objections to redevelopment.

Sharing the prosperity, the developers also offer local people free job- training, and some of the housing is set aside for native East Enders. But some socialists grumble that the East End heritage is being destroyed for the benefit of that portion of society that has prospered under Thatcherism.

A poem by East Ender Bernie Steer, appearing in a socialist pamphlet, concludes:

''Gone now, this way of life,

''Testimony to the power of those few,

''Whose decisions carry far and wide,

''Eroding, encroaching, changing the

''Character of our riverside.''

Mrs. Thatcher's sink-or-swim attitude to industry has severely eroded the old manufacturing base while benefiting the small businessmen whom this grocer's daughter sees as kindred spirits.

This creates a seeming paradox in cities like Newcastle or Belfast, where industrial dereliction contrasts with booming shopping malls, packed restaurants and rising house prices.

Unemployment may be stubbornly high, people who have work are doing well. The overall economy is expected to grow by 3 percent this year, one of the highest rates in the West. Productivity is growing by 3.5 percent this year, on a par with the United States and not far behind Japan's 4 percent.

Gordon Ramsay, a Porsche distributor in Newcastle, says he sold 150 of his 30,000-pound ($50,000) cars in the northeast England city last year.

''I seem to spend my life explaining how we do it. My standard answer is that 80 percent of the people up here are in work, and that between them they are creating a lot of wealth,'' he said in an interview.

''Our typical customer is someone involved in a business partnership, or a small individual entrepreneur, and there are a lot of them about, and doing very well.''

Ramsay sees ''a huge amount of business out there, sitting on the sidelines waiting for a Thatcher government to be re-elected. And they're not going to come if you have socialist government or a stalemated Parliament.''

Privatization, the selling-off of state-owned industries, has cut the nationalized sector by one-third, and the flotation of these companies has trebled the number of shareholders to one in five.

The Tories' support of business has enabled people like Sophie Mirman, a former secretary, to turn a single London socks shop into a 43-store chain in just four years. She says she could not have raised the original capital without a government small-business loan.

George Davies, who built up a prosperous chain of leisurewear stores during the Thatcher years, remarks: ''If someone like myself who is basically a working-class lad can start as I did and do things that I always dreamed of, one's got to say that something is going right.''

It is that sense of something going right - falling unemployment figures and interest rates, inflation down from 20 percent in 1980 to 4 percent today - that prompted Mrs. Thatcher to call an election now, one year ahead of schedule.