Closed avidbrit closed 7 months ago
Hi @avidbrit
Yes it is possible:
@Autowired
private FilterParser filterParser;
@Autowired
private FilterSpecificationConverter filterSpecificationConverter;
public List<Entity> search(String filter) {
FilterNode node = filterParser.parse(filter);
FilterSpecification<Entity> spec = filterSpecificationConverter.convert(node);
return repository.findAll(spec);
}
My project is using Vaadin with spring data jpa but not using spring boot controllers. Is it possible to filter an entity without using a controller and the @Filter annotation? Something like Filter("name: 'ABC'") that returns a Specification?