spring-enricher

Enables simple enriching of objects in spring-projects

Лицензия

Лицензия

Категории

Категории

IDE Инструменты разработки
Группа

Группа

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

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

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

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

2.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

spring-enricher
Enables simple enriching of objects in spring-projects
Ссылка на сайт

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

https://github.com/avides/spring-enricher
Организация-разработчик

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

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

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

https://github.com/avides/spring-enricher

Скачать spring-enricher

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

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

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
org.springframework : spring-context jar 5.2.1.RELEASE
org.slf4j : slf4j-api jar 1.7.25
org.aspectj : aspectjrt jar 1.9.4
org.aspectj : aspectjweaver jar 1.9.4

test (7)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.assertj : assertj-core jar 3.14.0
org.easymock : easymock jar 4.1
org.powermock : powermock-module-junit4 jar 2.0.4
org.powermock : powermock-api-easymock jar 2.0.4
org.jacoco : org.jacoco.agent jar 0.8.3
org.slf4j : slf4j-simple jar 1.7.25

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

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

spring-enricher

Maven Central Build Nightly build Coverage report Quality Gate Technical dept

Maven

<dependency>
    <groupId>com.avides.spring</groupId>
    <artifactId>spring-enricher</artifactId>
    <version>2.0.0</version>
</dependency>

Example

@Configuration
@EnableEnriching
public class EnricherConfiguration
{
}

@Service
public class CustomerService
{
    @Autowired
    private CustomerRepository customerRepository;

    @Enriched
    public Customer getCustomer(long id)
    {
        return customerRepository.getCustomer(id);
    }

    @Enriched
    public List<Customer> getCustomers()
    {
        return customerRepository.getCustomers();
    }
}

@Component
public class CustomerEnricher extends AbstractEnricher<Customer>
{
    @Autowired
    private AddressService addressService;

    public CustomerEnricher()
    {
        super(Customer.class);
    }

    @Override
    public void doEnrich(Customer customer)
    {
        customer.setAddresses(addressService.getAddresses(customer.getId()));
    }
}

@Component
public class CustomerOutput
{
    @Autowired
    private CustomerService customerService;

    public void outputCustomers()
    {
        for (Customer customer : customerService.getCustomers())
        {
            System.out.println(customer);
        }
    }

    public void outputCustomer(long id)
    {
        System.out.println(customerService.getCustomer(id));
    }
}
com.avides.spring

AVIDES Media AG

E-Commerce Solutions

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

Версия
2.0.0
1.0.2.RELEASE
1.0.1.RELEASE
0.0.1-RELEASE