Skip to content

Commit

Permalink
fix: Run LookupServletContainerInitializer logic in Spring Boot case (#…
Browse files Browse the repository at this point in the history
…726)

(cherry picked from commit 3a5b768)

Co-authored-by: Denis <denis@vaadin.com>
  • Loading branch information
mshabarov and Denis committed Mar 1, 2021
1 parent 7025b0f commit 60407ac
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,13 @@ public void failFastContextInitialized(ServletContextEvent event)
Set<Class<?>> classes = Stream.concat(
findByAnnotationOrSuperType(getLookupPackages(), appContext,
Collections.emptyList(), getServiceTypes()),
Stream.of(SpringLookupInitializer.class))
// LookupInitializer is necessary here: it allows
// identify Spring boot as a regular Web container (and run
// LookupServletContainerInitializer logic) even though
// LookupInitializer will be ignored because there
// is its subclass SpringLookupInitializer provided
Stream.of(LookupInitializer.class,
SpringLookupInitializer.class))
.collect(Collectors.toSet());
process(classes, event.getServletContext());
}
Expand Down

0 comments on commit 60407ac

Please sign in to comment.