The second one.
WithThe second one.
With this layout you are protecting the microcontroller from damage, and also protecting the input signal from shorting to ground via the TVS when it is clamping a transient.
Edit:
@Puffafish is right. You will get the best protection putting the TVS at the signal input. So the first layout is better.
Anyway, putting a resistor before the TVS has the benefit of protecting the input singal (and the TVS itself).