//add a processor to handle extended web.xml format
context.getMetaData().addDescriptorProcessor(new QuickStartDescriptorProcessor());
//add a decorator that will find introspectable annotations
context.addDecorator(new AnnotationDecorator(context)); //this must be the last Decorator because they are run in reverse order!
//add a context bean that will run ServletContainerInitializers as the context starts
ServletContainerInitializersStarter starter = (ServletContainerInitializersStarter)context.getAttribute(AnnotationConfiguration.CONTAINER_INITIALIZER_STARTER);
if (starter != null)
throw new IllegalStateException("ServletContainerInitializersStarter already exists");