Nitpick: using GeoServerExtensions.bean(GeoServerResourceLoader.class) makes it refactor safe and avoids the cast. I believe we'll have a single GeoServerResourceLoader in GS anyways (or not?)