Spring Framework

Spring from the Trenches: New Like Expressions of Spring Data JPA

Today's war story talks about the like expression handling of Spring Data JPA. Although I have written earlier about a better solution for implementing text based search functions, using an external search server like Solr is not a viable option if the implemented search function is rather simple. Let's consider the following example. Using the […] Read more

Spring From the Trenches: Adding Validation to a REST API

I am a bit ashamed to admit this but until yesterday, I had no idea that I can add validation to a REST API by using the @Valid and the @RequestBody annotations. This was not working in Spring MVC 3.0 and for some reason I had not noticed that the support for this was added […] Read more

Spring Data Solr Tutorial: Pagination

In the earlier parts of my Spring Data Solr tutorial, we have implemented a simple search function which is used to search the information of todo entries. The current implementation of our search function shows all search results in a single page. This is not a viable solution for most real life applications because the […] Read more

Spring Data Solr Tutorial: Sorting

When we are implementing a word search function, we typically want to sort the search results in descending order by using the relevancy of each search result. This is also the default behaviour of Solr. However, there are situations when it makes to sense to specify the sort order manually. One such situation is an […] Read more

Spring Data Solr Tutorial: Dynamic Queries

Solr is often referred as a search server which we can use when we are implementing full-text search functions. However, it is often wise to leverage the performance of Solr when we are implementing a search function which takes its input from a search form. In this scenario, the executed search query depends from the […] Read more