Skip to content

Commit 119a565

Browse files
committed
Update SpringBootServletInitializer ref docs
Add a hint to show that the `configure` method is now optional. Fixes gh-2074
1 parent 400b664 commit 119a565

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spring-boot-docs/src/main/asciidoc/howto.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2092,7 +2092,10 @@ Example:
20922092
20932093
@Override
20942094
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
2095-
return application.sources(Application.class);
2095+
// Customize the application or call application.sources(...) to add sources
2096+
// Since our example is itself a @Configuration class we actually don't
2097+
// need to override this method.
2098+
return application;
20962099
}
20972100
20982101
}

0 commit comments

Comments
 (0)