Closed arabbani closed 6 years ago
I think you need to check/learn Reactive Spring (webflux) and see how it works
For now, I don't wnat to migrate to webflux. For now, i want to continue with spring mvc
I'm sorry but this is not a bug, just a configuration you should do on Spring Boot - please have a look at the Spring Boot documentation, or ask a question on StackOverflow if that is not enough. We do not provide this configuration out-of-the-box, as this is not a common requirement. We do indeed some similar things with a sync controller that calls an async service method, but we don't have async controllers by default.
Then @arabbani it's not really nice to spam us, per the guidelines you should create one ticket if that's a bug or one question if that's a question. Please don't spam us.
Sorry @jdubois . I thought it's a bug. So sorry for the inconvenience
No problem @arabbani you're really not the only one doing this :-) I'm just trying not to have the same question/issue twice, as we follow both channels, and that makes extra work. Also, if other people have the same issue, they are lost.
Overview of the issue
I have a rest controller that returns Callable.
@GetMapping("/fb-roles") @Timed public Callable<List<FbRole>> getAllFbRoles() { log.debug("REST request to get all FbRoles"); return (() -> { return fbRoleRepository.findAll(); }); }
JHipster configures a ThreadPoolTaskExecutor as following: ` @Configuration @EnableAsync @EnableScheduling public class AsyncConfiguration implements AsyncConfigurer {
} `
But while accessing the api server is producing the following warning
2018-09-19 00:43:58.434 WARN 10104 --- [ XNIO-2 task-28] o.s.w.c.request.async.WebAsyncManager : !!! An Executor is required to handle java.util.concurrent.Callable return values. Please, configure a TaskExecutor in the MVC config under "async support". The SimpleAsyncTaskExecutor currently in use is not suitable under load.
Motivation for or Use Case
Reproduce the error
Related issues
Suggest a Fix
JHipster Version(s)
JHipster v5.3.1
JHipster configuration
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryEnvironment and Tools
java version "1.8.0_144" Java(TM) SE Runtime Environment (build 1.8.0_144-b01) Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
git version 2.14.1.windows.1
node: v8.11.3
npm: 6.1.0
yarn: 1.7.0
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryBrowsers and Operating System