首页 \ 问答 \ 如何找到Spring Data JPA和Spring版本的正确jar文件(How to find correct jar file of Spring Data JPA and Spring version)

如何找到Spring Data JPA和Spring版本的正确jar文件(How to find correct jar file of Spring Data JPA and Spring version)

我正在使用Spring MVC和Spring Data JPA,并面对jar版本的异常。

这是我的朋友:

<properties>
    <spring.version>4.2.4.RELEASE</spring.version>
    <hibernate.version>4.3.8.Final</hibernate.version>
    <mysql.version>5.1.10</mysql.version>
    <junit-version>4.11</junit-version>
    <servlet-api-version>3.1.0</servlet-api-version>
    <spring-security-version>4.0.4.RELEASE</spring-security-version> 
    <spring-data-solr.verion>1.2.0.RELEASE</spring-data-solr.verion>         
    <springbatch.version>3.0.6.RELEASE</springbatch.version>
    <jsp-version>2.1</jsp-version>
    <jstl-version>1.2</jstl-version>
    <java.version>1.7</java.version>
    <liquibase.version>3.1.1</liquibase.version>
    <spring.data.jpa.version>1.10.3.RELEASE</spring.data.jpa.version>   
    <spring.social.version>1.1.0.RELEASE</spring.social.version>                        
</properties>

这是我的班级:

import org.springframework.data.jpa.repository.JpaRepository;
public interface RoleRepository extends JpaRepository<Role, Long> {

}

我在Eclipse上收到一条错误警告消息:

The type org.springframework.data.repository.query.QueryByExampleExecutor cannot be resolved. It is indirectly referenced from required .class files

看起来我的Spring数据jpa jar版本不正确,但我不知道找到了正确的版本。 我的春天verion:4.2.4.RELEASE是最新的

如何解决这个错误? 非常感谢 !


I'm using Spring MVC and Spring Data JPA and facing with an exception of jar version.

This is my pom:

<properties>
    <spring.version>4.2.4.RELEASE</spring.version>
    <hibernate.version>4.3.8.Final</hibernate.version>
    <mysql.version>5.1.10</mysql.version>
    <junit-version>4.11</junit-version>
    <servlet-api-version>3.1.0</servlet-api-version>
    <spring-security-version>4.0.4.RELEASE</spring-security-version> 
    <spring-data-solr.verion>1.2.0.RELEASE</spring-data-solr.verion>         
    <springbatch.version>3.0.6.RELEASE</springbatch.version>
    <jsp-version>2.1</jsp-version>
    <jstl-version>1.2</jstl-version>
    <java.version>1.7</java.version>
    <liquibase.version>3.1.1</liquibase.version>
    <spring.data.jpa.version>1.10.3.RELEASE</spring.data.jpa.version>   
    <spring.social.version>1.1.0.RELEASE</spring.social.version>                        
</properties>

This is my class:

import org.springframework.data.jpa.repository.JpaRepository;
public interface RoleRepository extends JpaRepository<Role, Long> {

}

I received an error warning on Eclipse with message:

The type org.springframework.data.repository.query.QueryByExampleExecutor cannot be resolved. It is indirectly referenced from required .class files

It seem my Spring data jpa jar version is incorrect, but I don't know find correct version. My Spring verion: 4.2.4.RELEASE is latest

How to fix this error? Thank so much !


原文:https://stackoverflow.com/questions/43006156
更新时间:2023-10-17 15:10

最满意答案

下面是生成的缩进更好的JavaScript:

_(gameState.loot).pick(function(value, key) {
    return key !== "pickUpAnimations";
}).filter(
    (function(d) {
        return _.isArray(d);
    }).reduce((function(sum, d) {
        return sum.concat(d);
    }))
);

正如你所看到的, .filter (....filter(...不一样,两种可能的修正:

  1. 删除方法名称和开头括号之间的空格:

    _(gameState.loot)
        .pick((value, key) -> key isnt "pickUpAnimations")
        .filter((d) -> _.isArray (d))
        .reduce((sum, d) -> sum.concat (d))
    
  2. 完全删除括号:

    _(gameState.loot)
        .pick (value, key) -> key isnt "pickUpAnimations"
        .filter (d) -> _.isArray (d)
        .reduce (sum, d) -> sum.concat (d)
    

你也可以去掉调用_.isArray的匿名函数:

    _(gameState.loot)
        .pick (value, key) -> key isnt "pickUpAnimations"
        .filter _.isArray
        .reduce (sum, d) -> sum.concat (d)

Here's the generated JavaScript with better indentation:

_(gameState.loot).pick(function(value, key) {
    return key !== "pickUpAnimations";
}).filter(
    (function(d) {
        return _.isArray(d);
    }).reduce((function(sum, d) {
        return sum.concat(d);
    }))
);

As you can see, .filter (... and .filter(... are not the same. Two possible fixes:

  1. Remove the whitespace between the method names and the opening parentheses:

    _(gameState.loot)
        .pick((value, key) -> key isnt "pickUpAnimations")
        .filter((d) -> _.isArray (d))
        .reduce((sum, d) -> sum.concat (d))
    
  2. Remove the parentheses entirely:

    _(gameState.loot)
        .pick (value, key) -> key isnt "pickUpAnimations"
        .filter (d) -> _.isArray (d)
        .reduce (sum, d) -> sum.concat (d)
    

You can also get rid of the anonymous function calling _.isArray:

    _(gameState.loot)
        .pick (value, key) -> key isnt "pickUpAnimations"
        .filter _.isArray
        .reduce (sum, d) -> sum.concat (d)

相关问答

更多
  • 当然有一些猜测涉及到你遇到这个问题的实际意图和用例。 此外,还不完全清楚什么something , somethingElse和something somethingElse (它们来自哪里以及它们应该去哪里)。 然而,根据你提供的信息,以及作为slartidan答案的补充(或者说是扩展或泛化):你在这里描绘的这些虚拟调用之间的区别似乎是 传递给get方法的String参数 被调用的Callback 接下来执行哪种方法 您可以将这些部分分解出来: String参数和Callback可以作为参数传递给创建Ca ...
  • 我不认为你正确地使用chain - 检查文档 ,你必须打开.value()调用值,就像在文档的例子中一样。 Tap实际上并不是先执行。 let id = null; _.chain(ids) .forEach(value => { id = _.result(_.find(value.refs, function(sku) { return sku.colorId === 'ROSE' && sku.sizeId === '14M'; }), 'sku ...
  • 如文档中所述: https : //lodash.com/docs/4.17.4#reduce 将集合减少到一个值,该值是通过iteratee运行集合中每个元素的累积结果,其中每个连续调用都提供前一个的返回值。 如果未给出累加器,则将第一个集合元素用作初始值。 使用四个参数调用iteratee :( accumulator,value,index | key,collection)。 您可以执行以下操作 return _(myCollection) .filter(...) .map(...) .reduc ...
  • 下面是生成的缩进更好的JavaScript: _(gameState.loot).pick(function(value, key) { return key !== "pickUpAnimations"; }).filter( (function(d) { return _.isArray(d); }).reduce((function(sum, d) { return sum.concat(d); })) ); 正如你所看到的, .fil ...
  • 解决方案是使用head()而不是value() : var res = _([" test "]) .map(function(s) { return s + s; }) .map(_.trim) .head(); 或TypeScript: var res = _([" test "]) .map(s => s + s) .map(_.trim) .head(); 这种方式res只是一个字符串,代码更具可读性。 The solution was to ...
  • 原因是由Bower安装的文件之一lodash.underscore.js由Meteor自动包含在我的应用程序中。 这个版本的lodash似乎表现得像下划线,因为它不会自动链接。 The reason is that lodash.underscore.js, one of the files installed by Bower, is included in my app automatically by Meteor. This version of lodash seems to behave lik ...
  • 1) _.tap是mutate参数,最好使用_.thru 2)要获得链接结果,必须在链的末尾调用.value() 3)所以我的建议 _.chain('1,2,4') .split(',') .max() .thru(function(maxValue) { return _.chain(maxValue).times(_.constant(false)).value(); }) .value(); 如果真的不需要_. ...
  • 你可以做类似的事情 _.chain(123) .thru(function(num) { return _.every([ // or _.some for any item _.isNumber(num), _.anotherCheck(num), _.anotherCheck(num) ]); }) .value(); you can do somthing like _.c ...
  • 此方法可让您有效地搜索任意数量的数组中的交集。 function hasIntersection() { var collections = _.rest(arguments); return _.some(_.first(arguments), function(item) { return _(collections) .chain() .map(_.ary(_.partial(_.includes, item), 1)) ...
  • 这是订单: 以下是实例化派生时实际发生的情况: 将派生的内存留出(足够用于Base和Derived部分) 调用适当的Derived构造函数 首先使用适当的Base构造函数构造Base对象。 如果未指定基础构造函数,则将使用默认构造函数。 初始化列表初始化变量 构造函数的主体执行 控制权返回给调用者 希望能帮助到你。 Here is the order: Here’s what actually happens when derived is instantiated: Memory for derived ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。