ApplicationContext context = new ClassPathXmlApplicationContext(new String[]{
"/spring/mbm-context.xml"
});
// Configure authenticator
HmacServerAuthenticator hmacAuthenticator = context.getBean(HmacServerAuthenticator.class);
CachingAuthenticator<HmacServerCredentials, User> cachingAuthenticator = CachingAuthenticator
.wrap(hmacAuthenticator, CacheBuilderSpec.parse(configuration.getAuthenticationCachePolicy()));
// Configure environment accordingly
// Resources - admin (needs ROLE_ADMIN)