China's inflation rate rose slightly in May amid concern about the strength of the country's economic recovery.

Consumer prices rose 2.1 percent over a year earlier, according to data from the National Bureau of Statistics on Sunday. That is down from April's 2.4 percent gain and well below the government's target of 3.5 percent for the year.

Inflation is forecast to rise gradually as a shaky economic recovery boosts consumer demand. But mixed signals about factory activity, which slowed in April, and doubts about the strength of trade have raised questions about whether the recovery is gaining traction.

The world's second-largest economy is limping out of its deepest slump since the 2008 global crisis. Growth unexpectedly declined to 7.7 percent in the first three months of this year from 7.9 percent the previous quarter. Analysts say the economy is being shored up by state-led investment and bank lending, and could be vulnerable if trade or investment weakens.