I would like to avoid generalizations, but it seems that there was a major change in the general approach of the German nation after the WWII towards the neighbor countries.
What were the factors that ensured such transformation?
Why was it different than after WWI?
After WWI Germany lost a big part of their lands, people were expelled from their homeland, the country suffered huge losses, was splitted into two parts and was controlled by other countries for the next 40 years.
Somehow the nation did not grow angry, but became an example of peaceful people.
Was it because of the sense of guilt after WWII? Or because of the close control by other countries? Or there was just a lack of major crisis which would antagonize people?
Let's start with the institutional reasons: after WW2 Germany was divided but both parts underwent institutional changes that prevented another war. East Germany became a soviet puppet, with little autonomy in foreign policy, and thus was prevented by the USSR to start another war. On the other side of the wall the federal republic underwent a complete political revolution; in fact the new leadership of western Germany was made up of people that suffered under Hitler and so they did everything possible to avoid another fascist dictator to come to power; a new consitutution was drafted that severely limited the power of the executive (and in particular the presidential powers) and increasing the power of the courts and in particular created the german constitutional court. The new consitutional thus made it hard for dictators to take power and instead proved instrumental to uphold democratic insitutions, which in turn tend to be more peaceful (The democratic peace theory states that democracies don't go at war with other democracies, and empirically this is relatively true). The army was also completely rebuilt (when the western allied allowed it in 1955) with an emphasis of the soldier as "citizen in arms" and the army as defence force controlled by civil and democratic forces, instead of soldiers considering themselves above citizens and germany being "an army with a state".
Internationally we observe three critical changes:
For centuries Europe, and the world, had a multipolar arrangement with several players (the british empire, Austro-hungary, France, Germany, Russia, Japan, ...) and none capable of establishing complete dominance. This world order started to collapse with WW1, but still a handful of major players proved to be still active (Japan, USSR, Germany, the Entente and the USA). This system collapsed completely after WW2 leaving mostly two players with significant political power while the rest had at best limited freedom of action and means to pursue this action. In particular Germany had a very limited space of action since it was at the center of the conflict and any wrong move might have caused a nuclear war.
After the end of WW2 understood that it would have to abandon isolationism and instead take a more active role in the preservation of free trade. In particular this meant reinforcing democratic forces in Europe and a commitment to peace, upholding the UN resolutions and decolonization. In particular for Germany what proved critical was the Marschall plan for three reason: it provided funds to rebuild swiftly Germany avoiding the failures of the waimar republic, it reinforced centrist democratic parties that campaigned on accepting american support (while far right and left were opposed to american influence) and allowed trade to restart as the elimination of rationing and the most severe protectionist policies were a condition to have access to the funds and because it provided dollars to buy resources on the international market (otherwise next to impossible to do with the worthless german mark).
After WW2 all european leaders understood that political and economical isolation caused the war and instead decided that if the economies of the various nations became interdependent war would not only be costly but impossible; thus they started by creating a common trade area for steel and coal and committed themselves to build a "ever closer union" (treaty of Rome - 1957). This alligned European political interests, created an period of prosperity never seen before and brought peace.
Finally there are ideological reasons: Germany after WW2 was completely destroyed, with milions of people dead and city in crubles. After the war the people understood that war would only bring death and destruction and politicians swore to avoid war (article 26 of the constitution) and took responsibility for the war and nazi atrocities (despite the fact that they were not nazis).
With time Germany prospered and the people got used to peace and diplomacy and the goverment understood how soft power was way more efficient as a tool to influence the nations around.