Skip to content

Commit

Permalink
fix: expose Spring executor for Vaadin dev mode (#692)
Browse files Browse the repository at this point in the history
Part of #691

# Conflicts:
#	vaadin-spring/src/test/java/com/vaadin/flow/spring/VaadinServletContextInitializerTest.java
  • Loading branch information
Denis committed Dec 3, 2020
1 parent b002164 commit e0ff7b1
Show file tree
Hide file tree
Showing 2 changed files with 157 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.locks.ReentrantLock;
import java.util.stream.Collectors;
import java.util.stream.Stream;
Expand All @@ -61,6 +62,7 @@
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.task.TaskExecutor;
import org.springframework.core.type.filter.AnnotationTypeFilter;
import org.springframework.core.type.filter.AssignableTypeFilter;

Expand Down Expand Up @@ -366,6 +368,8 @@ public void failFastContextInitialized(ServletContextEvent event)
isDevModeAlreadyStarted(event.getServletContext())) {
return;
}
config.getInitParameters().put(Executor.class,
appContext.getBean(TaskExecutor.class));

Set<String> basePackages;
if (isScanOnlySet()) {
Expand Down
Loading

0 comments on commit e0ff7b1

Please sign in to comment.