spring-boot-starter-threadscope

Thread scope that supports asynchronous threads and bean destruction callbacks

Лицензия

Лицензия

Категории

Категории

Spring Boot Контейнер Микросервисы
Группа

Группа

com.devbury
Идентификатор

Идентификатор

spring-boot-starter-threadscope
Последняя версия

Последняя версия

1.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

spring-boot-starter-threadscope
Thread scope that supports asynchronous threads and bean destruction callbacks
Ссылка на сайт

Ссылка на сайт

https://github.com/devbury/spring-boot-starter-threadscope
Организация-разработчик

Организация-разработчик

devbury
Система контроля версий

Система контроля версий

https://github.com/devbury/spring-boot-starter-threadscope

Скачать spring-boot-starter-threadscope

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.devbury/spring-boot-starter-threadscope/ -->
<dependency>
    <groupId>com.devbury</groupId>
    <artifactId>spring-boot-starter-threadscope</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.devbury/spring-boot-starter-threadscope/
implementation 'com.devbury:spring-boot-starter-threadscope:1.1.0'
// https://jarcasting.com/artifacts/com.devbury/spring-boot-starter-threadscope/
implementation ("com.devbury:spring-boot-starter-threadscope:1.1.0")
'com.devbury:spring-boot-starter-threadscope:jar:1.1.0'
<dependency org="com.devbury" name="spring-boot-starter-threadscope" rev="1.1.0">
  <artifact name="spring-boot-starter-threadscope" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.devbury', module='spring-boot-starter-threadscope', version='1.1.0')
)
libraryDependencies += "com.devbury" % "spring-boot-starter-threadscope" % "1.1.0"
[com.devbury/spring-boot-starter-threadscope "1.1.0"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.springframework.boot : spring-boot-starter jar 1.2.2.RELEASE
javax.servlet : javax.servlet-api jar 3.1.0

test (2)

Идентификатор библиотеки Тип Версия
org.springframework.boot : spring-boot-starter-test jar 1.2.2.RELEASE
org.springframework.boot : spring-boot-starter-web jar 1.2.2.RELEASE

Модули Проекта

Данный проект не имеет модулей.

spring-boot-starter-threadscope

A Spring Boot starter that sets up a "thread" scope similar to [SimpleThreadScope] (http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/support/SimpleThreadScope.html). The difference being spring-boot-starter-threadscope supports destruction callbacks such as @PreDestroy and propagates thread scoped beans to asynchronous threads. Thread scope works in regular application contexts as well as web application contexts. It can be used to replace Spring's request scope.

Activating

spring-boot-starter-threadscope is published to the jcenter and maven central repositories. To use the starter, add the following dependency information to your project.

<dependency>
    <groupId>com.devbury</groupId>
    <artifactId>spring-boot-starter-threadscope</artifactId>
    <version>1.1.0</version>
</dependency>

To build and install the project from source, clone the Git repository and run

mvn clean install

The starter provides you with a configured thread scope and a task executor that will propagate thread scoped beans to asynchronous tasks.

Configuring

Properties

The following properties may be set in your application.properties file to override default values.

threadScope.poolSize=25
threadScope.threadNamePrefix=async-
threadScope.scopeName=request

The default setting of threadScope.scopeName=request will replace the default web request scope with the starter's thread based scope and all existing request scoped beans will use the new thread scope. If you want to use both the existing request scope and the new thread scope, change the value of this setting.

Default Beans

spring-boot-starter-threadscope will configure a default working environment but will remove the defaults based on the beans configured in your application. If an AsyncConfigurer is not already already defined one will be registered. A default SimpleAsyncUncaughtExceptionHandler will be defined if an AsyncUncaughtExceptionHandler is not defined. A ThreadScopePropagatingScheduler that can propagate the scheduling thread's scope to threads in the pool will be used unless another implementation is provided.

com.devbury

devbury

Версии библиотеки

Версия
1.1.0