Stochastic maximum principle for optimal control of a class of nonlinear SPDEs with dissipative drift.