who was the james bond character based on
A number of elements had a real-life background, taken from people whom the author knew or events he was aware of. Some aspects of the character and tastes replicate those of the author himself.
Introduction
A number of real-life inspirations have been suggested for James Bond, the fictional character created in 1953 by British author, journalist and Naval Intelligence officer Ian Fleming; Bond appeared in twelve novels and nine short stories by Fleming, as well as a number of continuation novels and twenty-six films, with seven actors playing the role of Bond.

Although the stories and characters were fictional, a number of elements had a real-life background, taken from people whom Fleming knew or events he was aware of. These included the spy's name, which Fleming took from the American ornithologist James Bond, and the code number—007—which referred to the breaking of a World War I German diplomatic code. Some aspects of Bond's character and tastes replicate those of Fleming himself.
Fleming Ian Fleming John Godfrey
Inspirations for James Bond Inspirations for James Bond Inspirations for James Bond
Character inspirations Character inspirations Character inspirations
Fleming  . Many of Bond's tastes and traits were Fleming's own, including sharing the same golf handicap, the taste for scrambled eggs and using the same brand of toiletries. Bond's tastes are also often taken from Fleming's, as was his behaviour, with Bond's love of golf and gambling mirroring his creator's.  During the Second World War Fleming was the personal assistant to the director of the Naval Intelligence Division, Admiral John Godfrey. 
wiki:7141084
Inspirations for James Bond [SEP] Introduction
A number of real-life inspirations have been suggested for James Bond, the fictional character created in 1953 by British author, journalist and Naval Intelligence officer Ian Fleming; Bond appeared in twelve novels and nine short stories by Fleming, as well as a number of continuation novels and twenty-six films, with seven actors playing the role of Bond. Although the stories and characters were fictional, a number of elements had a real-life background, taken from people whom Fleming knew or events he was aware of. These included the spy's name, which Fleming took from the American ornithologist James Bond, and the code number—007—which referred to the breaking of a World War I German diplomatic code.