2016-07-29 113 views
4

我刚刚将弹簧引导版本更新为1.4.0。之后,我得到类似的错误升级到Spring引导后未找到com.querydsl.core.types.Predicate符号1.4.0

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) 

升级之前,查询工作正常。

回答

3

很有可能(因为提供的信息非常有限),您使用的是QueryDSL的错误版本。 QueryDSL谓词类现在(包括com.querydsl.core.types中的QueryDSL 4)。 尝试从您的pom中删除您的queryDSL依赖项的版本(如果使用maven)并改为使用依赖项管理部分中的Spring Boot BOM依赖项。请参阅here

+0

我正在使用gradle来管理依赖关系,其中休眠版本= 5.2.1.FINAL和springboot版本1.4.0.RELEASE。如何在gradle中使用springboot BOM依赖关系? – msfk

+1

artefact组已更改为'com.querydsl' –

相关问题