For most of this century, Germany racked up one economic success after another, dominating global markets for high-end products like luxury cars and industrial machinery, selling so much to the rest of the world that half the economy ran on exports.

Jobs were plentiful, the government’s financial coffers grew as other European countries drowned in debt, and books were written about what other countries could learn from Germany.

No longer. Now, Germany is the world’s worst-performing major developed economy, with both the International Monetary Fund and European Union expecting it to shrink this year.