Spring-loaded thermocouple