6 changed files with 2 additions and 50 deletions
@ -1 +1 @@ |
|||
Subproject commit b9ed9d8d4489f6cd87f2d1e5152bbf206c831dfb |
|||
Subproject commit a783187c8dbbe5e048d157493b9b871c3ef35787 |
@ -1 +1 @@ |
|||
Subproject commit 418503b89e892d5f7279c2a52c6aad38da1544d9 |
|||
Subproject commit 13aed64d573dd166c1cf120b8a5458a76e43082c |
@ -1,22 +0,0 @@ |
|||
package com.elink.esua.epdc.config; |
|||
|
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.core.task.AsyncTaskExecutor; |
|||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
|||
|
|||
public class AsyncConfig { |
|||
|
|||
private static final int MAX_POOL_SIZE = 100; |
|||
|
|||
private static final int CORE_POOL_SIZE = 50; |
|||
|
|||
@Bean("asyncTaskExecutor") |
|||
public AsyncTaskExecutor asyncTaskExecutor() { |
|||
ThreadPoolTaskExecutor asyncTaskExecutor = new ThreadPoolTaskExecutor(); |
|||
asyncTaskExecutor.setMaxPoolSize(MAX_POOL_SIZE); |
|||
asyncTaskExecutor.setCorePoolSize(CORE_POOL_SIZE); |
|||
asyncTaskExecutor.setThreadNamePrefix("async-task-thread-pool-"); |
|||
asyncTaskExecutor.initialize(); |
|||
return asyncTaskExecutor; |
|||
} |
|||
} |
@ -1,24 +0,0 @@ |
|||
package com.elink.esua.epdc.config; |
|||
|
|||
import io.undertow.Undertow; |
|||
import io.undertow.UndertowOptions; |
|||
import org.springframework.boot.web.embedded.undertow.UndertowBuilderCustomizer; |
|||
import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
|
|||
@Configuration |
|||
public class UndertowConfig { |
|||
|
|||
@Bean |
|||
public UndertowServletWebServerFactory undertowServletWebServerFactory() { |
|||
UndertowServletWebServerFactory factory = new UndertowServletWebServerFactory(); |
|||
factory.addBuilderCustomizers(new UndertowBuilderCustomizer() { |
|||
@Override |
|||
public void customize(Undertow.Builder builder) { |
|||
builder.setServerOption(UndertowOptions.RECORD_REQUEST_START_TIME, true); |
|||
} |
|||
}); |
|||
return factory; |
|||
} |
|||
} |
Loading…
Reference in new issue