The underlying cause is that PersistentEntitiesResourceMappings.exportsTopLevelResourceFor iterates over the cache. ConcurrentReferenceHashMap evicts both, keys and values. Since iteration over the value set does not trigger any lazy computation, exportsTopLevelResourceFor returns always false. We should switch to ConcurrentHashMap to avoid this effect and avoid re-computation of paths since repositories/entity types cannot be removed during runtime
So good to hear this solution, Mark! This issue kept my team and me busy for the last 4 days since we've upgraded to Boot 2.2.6 and we were really racked with self-doubt due to the intermittent behavior of DATAREST-1489.
Glad you could solve this that fast. Keep up this excellent work!