Skip to content

Commit

Permalink
Merge pull request #1 from mgeiss/develop
Browse files Browse the repository at this point in the history
added DelegatingSecurityContextAsyncTaskExecutor to delegate
  • Loading branch information
mgeiss authored Apr 12, 2017
2 parents c445735 + 0e4bd4c commit 723d58a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ version '0.1.0-BUILD-SNAPSHOT'

ext.versions = [
springcontext : '4.3.3.RELEASE',
springsecurity : '4.2.2.RELEASE',
springboot : '1.4.1.RELEASE',
findbugs : '3.0.1',
]
Expand All @@ -40,6 +41,7 @@ repositories {
dependencies {
compile(
[group: 'org.springframework', name: 'spring-context', version: versions.springcontext],
[group: 'org.springframework.security', name: 'spring-security-web', version: versions.springsecurity],
[group: 'com.google.code.findbugs', name: 'jsr305', version: versions.findbugs]
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.springframework.scheduling.annotation.AsyncConfigurer;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.security.task.DelegatingSecurityContextAsyncTaskExecutor;

import java.util.concurrent.Executor;

Expand Down Expand Up @@ -52,7 +53,7 @@ public Executor getAsyncExecutor() {
executor.setThreadNamePrefix(
this.env.getProperty(AsyncConstants.THREAD_NAME_PROP, AsyncConstants.THREAD_NAME_DEFAULT));
executor.initialize();
return executor;
return new DelegatingSecurityContextAsyncTaskExecutor(executor);
}

@Override
Expand Down

0 comments on commit 723d58a

Please sign in to comment.