 <p>Constructor taking classes to register refreshes context internally - try to set class and refresh manually after setting parent context.</p> <pre><code>private void createChildContext() { final AnnotationConfigEmbeddedWebApplicationContext childContext = new AnnotationConfigEmbeddedWebApplicationContext(); childContext.setParent(this.applicationContext); childContext.setId(this.applicationContext.getId() + ":child"); childContext.register(ChildConfiguration.class); childContext.refresh(); } </code></pre>