Affects Version/s: None
Fix Version/s: None
When an application with Spring Data Rest will be low on memory repository mappings will be cleared and never recreated. It will cause 404 on every data rest endpoint.
- Start app
- Consume memory, but not too much (before Out of memory exception)
- Observe when 404 will start to appear
PersistentEntitiesResourceMappings have a cache with ConcurrentReferenceHashMap with Soft References as default.
If GC will run out of memory those refs will be cleared without any notice and never recreated (until restart).
I think it is better to have in this place Out Of Memory exception than have disappearing endpoints and still working app.
Please see the sample project with fixed 64MB xmx.