I want to search data in User table by name case insensitive.
@Repository
public interface UserRepository extends JpaRepository {
@Query
If that is only what you want and you are using Spring Data JPA you don't need to write a query.
List findByNameContainingIgnoreCase(String name);
Else you need to wrap the name attribute with % before you pass it to the method (putting those directly in the query will simply not work). Or don't use a query but use a specification or the Criteria API to create the query.