Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

Commit 3de97eb

Browse files
committed
Fix repro project with root context
1 parent aefa982 commit 3de97eb

File tree

3 files changed

+10
-35
lines changed

3 files changed

+10
-35
lines changed

SPR-13978/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,14 @@
172172
</container>
173173
</configuration>
174174
</plugin>
175+
<plugin>
176+
<groupId>org.apache.maven.plugins</groupId>
177+
<artifactId>maven-war-plugin</artifactId>
178+
<version>2.6</version>
179+
<configuration>
180+
<failOnMissingWebXml>false</failOnMissingWebXml>
181+
</configuration>
182+
</plugin>
175183
</plugins>
176184
</build>
177185

SPR-13978/src/main/java/org/springframework/issues/config/BootstrapSpringUsingInitializer.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,16 @@ public class BootstrapSpringUsingInitializer extends AbstractAnnotationConfigDis
1818
private static final Logger logger = LoggerFactory.getLogger(BootstrapSpringUsingInitializer.class);
1919

2020

21-
@Override protected WebApplicationContext createServletApplicationContext() {
22-
return new AnnotationConfigWebApplicationContext();
23-
}
24-
2521
@Override protected String[] getServletMappings() {
2622
return new String[]{ "/" };
2723
}
2824

2925
@Override protected Class<?>[] getRootConfigClasses() {
30-
return null;
31-
// XXX this causes an IllegalStateException when WebApplicationContextUtils.getRequiredWebApplicationContext() is called from StartupListener
26+
return new Class<?>[]{ WebConfig.class };
3227
}
3328

3429
@Override protected Class<?>[] getServletConfigClasses() {
35-
return new Class<?>[]{ WebConfig.class };
30+
return null;
3631
}
3732

3833
@Override protected FrameworkServlet createDispatcherServlet(WebApplicationContext servletAppContext) {

SPR-13978/src/main/webapp/WEB-INF/web.xml

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)