The German economy grew by a less than expected 2.2 percent in 2017, the strongest rate in six years.