单项选择题

设f(x)=x 3 +ax 2 +bx.在x=1处有极小值-2,则( ).

A.a=1,b=2
B.a=-1,b=-2
C.a=0,b=-3
D.a=0,b=3