Com.querydsl.core.types.Predicate symbol not found after upgrading to Spring boot 1.4.0

I just updated the boot version of spring to 1.4.0. After that I get errors like

Error:(109, 45) java: no suitable method found for findAll(com.mysema.query.types.Predicate,org.springframework.data.domain.Pageable)
    method org.springframework.data.querydsl.QueryDslPredicateExecutor.findAll(com.querydsl.core.types.Predicate,org.springframework.data.domain.Sort) is not applicable
      (argument mismatch; com.mysema.query.types.Predicate cannot be converted to com.querydsl.core.types.Predicate)
    method org.springframework.data.querydsl.QueryDslPredicateExecutor.findAll(com.querydsl.core.types.Predicate,com.querydsl.core.types.OrderSpecifier<?>...) is not applicable
      (argument mismatch; com.mysema.query.types.Predicate cannot be converted to com.querydsl.core.types.Predicate)
    method org.springframework.data.querydsl.QueryDslPredicateExecutor.findAll(com.querydsl.core.types.OrderSpecifier<?>...) is not applicable
      (varargs mismatch; com.mysema.query.types.Predicate cannot be converted to com.querydsl.core.types.OrderSpecifier<?>)
    method org.springframework.data.querydsl.QueryDslPredicateExecutor.findAll(com.querydsl.core.types.Predicate,org.springframework.data.domain.Pageable) is not applicable
      (argument mismatch; com.mysema.query.types.Predicate cannot be converted to com.querydsl.core.types.Predicate)

Before the upgrade, the queries worked correctly.

+4
source share
1 answer

Most likely (since the information provided is very limited), you are mistaken in the version of QueryDSL. The QueryDSL Predicate class is now (with QueryDSL 4) in the package com.querydsl.core.types. Try dropping the version of queryDSL dependencies from your pom (when using maven) and use the Spring dependency boot specification in the dependency management section. See here

+3

Source: https://habr.com/ru/post/1649552/


All Articles