There's a typo in the replacement. It's spring.web.resources.cache.cachecontrol.stale-while-revaliate but it should be spring.web.resources.cache.cachecontrol.stale-while-revalidate.