spring-injector

A fast alternative to the Spring @Configurable magic.

Лицензия

Лицензия

Группа

Группа

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

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

spring-injector
Последняя версия

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

1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

spring-injector
A fast alternative to the Spring @Configurable magic.
Ссылка на сайт

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

https://github.com/sabomichal/spring-injector
Система контроля версий

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

https://github.com/sabomichal/spring-injector

Скачать spring-injector

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

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

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
org.springframework : spring-core jar 4.3.17.RELEASE
org.springframework : spring-context jar 4.3.17.RELEASE
javax.inject : javax.inject jar 1
cglib : cglib jar 3.2.5

test (2)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.springframework : spring-test jar 4.3.17.RELEASE

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

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

Maven Central

spring-injector

A fast alternative to the Spring @Configurable magic.

Do you need to inject spring beans into non managed e.g. domain objects? Are you tired of slow aspectj compilation or load-time weaving? Then spring-injector is the solution.

This project is based on the Spring Injector from Apache Wicket project.

Usage

In order to inject dependents into any object just call SpringInjector.get().inject(this). And that's it!

public class DependentComponent implements Serializable {
	private static final long serialVersionUID = 1L;

	@Inject
	private InjectedComponent injectedComponent;

	public DependentComponent() {
		SpringInjector.get().inject(this);
	}

	public int answer() {
		return injectedComponent.answer();
	}
}

See the test classes for more detailed use case.

If you like it, give it a star, if you don't, please write an issue.

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

Версия
1.0