com.alon.spring.crud.resource.dto.EntityListOutputConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-crud-base Show documentation
Show all versions of spring-crud-base Show documentation
Projeto base para criação de serviços e recusos de CRUD com Spring Data JPA.
package com.alon.spring.crud.resource.dto;
import com.alon.spring.crud.model.BaseEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Component;
@Component
public class EntityListOutputConverter implements OutputDtoConverter, ListOutput> {
@Autowired
private EntityOutputConverter entityOutputConverter;
@Override
public ListOutput convert(Page data) {
return ListOutput.of(data, entityOutputConverter);
}
}