Expanded from an earlier answer of mine
The military of the Weimar Republic, the Reichswehr, provided much of the backbone for the German Wehrmacht of the Second World War. Although Versailles restricted its size, the planners of the Reichswehr created a highly efficient small army. The instability of the Republic in the 1920s meant that many Weimar leaders actually turned a blind eye to this contravention of the spirit of the Versailles Treaty as having a strong professional army could disband any insurrectionists. The danger of course was that as an established institution within the state, the Reichswehr could through its weight behind anti-democratic forces.
The Reichswehr's plan for expansion and rearmament centered around ensuring that the 100000 man army was fully trained and that Germany exploited any loopholes or lax enforcement of the Versailles Treaty. Given its small size, the interwar Reichswehr could afford to be highly selective in its recruits. Although the Versailles Treaty limited the number of officers, the Truppenamt (a shadow general staff) ensured that the ranks had a massive number of NCOs, which the Treaty did not prohibit. It operated under the aegis of Hans von Seeckt for most of the Weimar period. Von Seeckt instituted a training regime which incorporated many of the lessons of the last war. For example, the Reichswehr built many of its infantry formations around portable machine gun troops, the same type that found success in the late war Stoßtruppen. Officers and NCOs in the Reichswehr often thought and trained for the duties and responsibilities one or two grades above them, so that when expansion came, the German army would not lack for trained officers.
The Reichswehr also used a variety of means to evade the strictures of the Versailles Treaty. They fostered and maintained a Security Police of about 70000 men, often recruited from the paramilitary Freikorps. In order to develop experience with equipment forbidden by Versailles (namely aircraft and tanks), Reichswehr officers forged a clandestine relationship with the USSR. The state airline Lufthansa was also something of a shadow organization to get officers experienced with flying and cultivate air-mindedness. Officers would resign from the service for a "civilian" job in the airline. Although Lufthansa's main mission was air freight and passenger services, such activities had a dual-use by familiarizing personnel with issues of navigation, night flying, weather conditions, and other details that could be put to use for an air force. Planes were also put into Lufthansa use that could be converted into bombers. Finally, German military advisers were active in China aiding the Nationalist government in the 1920s to gain direct experience with military operations and put theory into practice. Such men resigned their Reichswehr commissions and visited China as private businessmen, but this was a paper cover as many who returned to Germany could resume military service. This tactic was again repeated during the Spanish Civil War with the Condor Legion where the personnel went to Spain as private individuals, not as officers and enlisted soldiers of the Reich.
In the end, the Weimar-era Reichswehr thus developed a solid foundation for a quick expansion. They kept this state of readiness throughout the entirety of the Republic. Hitler however expanded the Germany army far beyond anything von Seeckt or the Reichswehr planned. There is a peculiar irony in this. The Reichswehr at its inception had two competing answers to how it would respond to Versailles. Competing with von Seeckt's vision of a professional shadow army was a vast national Volksarmee of militias and paramilitaries entertained by Rohm and the SA. Eventually the professionals won out, but Hitler's expansion rekindled ideas of a national army based on conscription. The number of men under arms was far in excess for what von Seeckt and the Truppenamt planned for and one of the tensions within the early phases of rearmament was between the old guard of the Rechswehr and a newer breed of aggressive, younger officers promoted under the auspices of National Socialism.
Rearmament did not only breed dissension in the upper levels of the military. Although the preparation of the Reichswehr paid dividends, the swift expansion often meant the Wehrmacht still suffered from a shortage of officers and its training regime suffered accordingly. Higher-level strategy and logistics tended to be downplayed in von Seeckt's formulas since he was so focused upon expansion. The interference of Hitler and the politicization of the army only compounded such poverty of thinking on logistics and strategy. Aggressive officers like Rommel had a much more open career path under the new order than managerial types as the former thinking was far more in line with the tenets of National Socialism. Moreover, the new military was quite short of equipment despite the heaps of Reichsmarks poured into rearmament. Interim or training models like the Panzer II and I found themselves operating in frontline formations. The acquisition of Czech war industries proved a godsend to the equipment starved Wehrmacht, but the Czech equipment was approaching obsolesce in 1938 but the Germans kept things like Skoda's Panzer 38 on the frontlines well into 1941.
Both the Reichswehr's evasions of Versailles and Hitler's open abrogation of it underscores the innate weaknesses of the Treaty. An Achilles heel of Versailles was that there was no real mechanism to enforce its strictures. Although the League of Nations existed, it had very little power to regulate the international system. The Allies did create the Interallied Military Control Commission (IMCC), an inspectorate of Allied military officers that ensured Germany and other Central Powers' compliance with the terms of surrender. In theory, IMCC inspectors had the power to enforce the Treaty and hold the threat of occupation as a lever to ensure compliance. Practice showed this to be a relatively toothless threat. The French occupation of the Ruhr was a political disaster that underscored both the fragility of the Versailles system and the lack of consensus among the Allies over enforcing the Treaty. The IMCC found that its Japanese contingents were more than willing to turn a blind eye towards covert military experiments if Japan was privy to technical information, while the British tended to be aloof from the whole process and were more suspicious of the French hardline towards Germany than evidence that Germany was evading the Treaty.
This lax attitude towards Versailles was reinforced both by a wide-spread sentiment among a number of public intellectuals that Versailles was a Carthaginian Peace as well as skilled diplomacy by Weimar's leadership. As Foreign Minister, Gustav Stresseman was adept at a type of diplomatic jujitsu in which he used Germany's weakness and Allied disunity to strip the Versailles system of some of its powers. The cumulative result of this was that the Versailles system was moribund bordering on irrelevance by 1933. Short of war or threatening war, there was little either the UK or France could do to arrest Hitler's abrogation of the Treaty. While this looks intelligent in hindsight, the situation in the mid-thirties was not so clear. Invading Germany opened up the question of what to do with Germany afterwards. For all of Hitler's invective that Versailles was a national humiliation and placed fetters on Germany, he was arguably its biggest beneficiary. The weaknesses of interwar international system gave Hitler a remarkable amount of initiative to accomplish his aims with regards to rearmament. Moreover, the threat of the Versailles also caused a good deal of false optimism among those Germans leery of rearmament and reckless foreign policy that other countries would reign in Hitler. This helped stifle domestic opposition as a good many Germans expected that Hitler would soon be forced to back down from his policies by foreign pressure. Unbeknownst to them, Versailles was a paper tiger with no real bite.
Sources
Citino, Robert Michael. The German Way of War: From the Thirty Years' War to the Third Reich. Lawrence, Kan: University Press of Kansas, 2005.
Corum, James S. The Roots of Blitzkrieg: Hans Von Seeckt and German Military Reform. Lawrence, Kan: University Press of Kansas, 1992.
Murray, Williamson, and Allan Reed Millett. A War to Be Won: Fighting the Second World War. Cambridge, Mass: Belknap Press of Harvard University Press, 2000.