When a compressed spring dissolves in an acid, the acid molecules leave the sold lattice of the spring faster than the uncompressed spring. This in turn increases the kinetic energy of the solution. As a result, the temperature of the acid also increases. However, this temperature increase will be very small because the mechanical energy content in the spring is lesser than its chemical energy content.