小编Ari*_*ani的帖子

异步REST API生成警告

我正在使用Spring Boot应用程序。我有一个返回Callable的rest控制器。

@GetMapping("/fb-roles")
@Timed
public Callable<List<FbRole>> getAllFbRoles() {
    log.debug("REST request to get all FbRoles");
    return (() -> { return fbRoleRepository.findAll(); });
}
Run Code Online (Sandbox Code Playgroud)

ThreadPoolTask​​Executor的配置如下:

@Configuration
@EnableAsync
@EnableScheduling
public class AsyncConfiguration implements AsyncConfigurer {

private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class);

private final JHipsterProperties jHipsterProperties;

public AsyncConfiguration(JHipsterProperties jHipsterProperties) {
    this.jHipsterProperties = jHipsterProperties;
}

@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
    log.debug("Creating Async Task Executor");
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
    executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
    executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
    executor.setThreadNamePrefix("fb-quiz-Executor-");
    return new ExceptionHandlingAsyncTaskExecutor(executor);
}

@Override
public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { …
Run Code Online (Sandbox Code Playgroud)

spring spring-mvc spring-boot jhipster spring-async

3
推荐指数
2
解决办法
4015
查看次数

如何在jHipster 4中添加自定义js和css文件

因为我不熟悉webpack,所以在使用jhipster 4时我遇到了一些困难.我想在jHipster中添加一些应用程序级别的js和css文件.有人可以建议如何做到这一点.

jhipster webpack

2
推荐指数
2
解决办法
5038
查看次数