In Spring Boot 2.0.0 to 2.1.4, the property spring.resources.cache.period has no effect and no Cache-Control header is sent.
Boot always passes a non-null (but empty) CacheControl object to the resource handler registration, and Spring ignores the plain cache period when a CacheControl object is present. This was reported as Spring Boot issue #16488 and fixed in 2.1.5.RELEASE.
Workaround for 2.0.0 to 2.1.4:
spring.resources.cache.cachecontrol.max-age=10s
Property names by version:
1.5.x: spring.resources.cache-period=10
2.0.0 - 2.1.4: spring.resources.cache.cachecontrol.max-age=10s (cache.period is ignored)