示例代码如下:

@Modifying
@Transactional
@Query("delete from GoodsBindConfigMapping gbc " +
"where gbc.goodsConfigUid = :#{#bean.goodsConfigUid} " +
"and gbc.tenementId = :#{#bean.tenementId} " +
"and gbc.goodConfigFlag = :#{#bean.goodConfigFlag} "+
"and gbc.goodTypeUid in (:#{#bean.goodsList})")
int deleteByConfigUidAndTypeUid(@Param("bean") BindConfigBean bean);

报错:

org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'goodsConfigUid' cannot be found on null

解决方法:

是因为在使用@Query写语句的时候,没有使用@Param()标明参数实体

【spring data jpa】jpa中使用in查询或删除 在@Query中怎么写 ,报错:org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'goodsConfigUid' cannot be found on null 怎么处理的更多相关文章

  1. 【spring data jpa】使用jpa的@Query,自己写的语句,报错:org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'status' cannot be found on null

    报错: org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'status' ...

  2. 【Elasticsearch】ES中时间查询报错:Caused by: ElasticsearchParseException[failed to parse date field [Sun Dec 31 16:00:00 UTC 2017] with format [yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis]];

    ES中时间查询报错:Caused by: ElasticsearchParseException[failed to parse date field [Sun Dec 31 16:00:00 UTC ...

  3. Spring Data Solr创建动态域报错:org.springframework.data.solr.UncategorizedSolrException

    今天在项目中使用Spring Data Solr导入动态域数据报错, 控制台打印错误信息如下 Exception in thread "main" org.springframew ...

  4. 查询和删除数据表中反复数据的sql

    1.查询表中反复数据. select * from people where peopleId in (select   peopleId   from   people   group   by   ...

  5. 【spring boot】使用注解@ConfigurationProperties读取配置文件时候 报错 org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'rocketmqAutoConfiguration': Unsatisfied dependenc

    如题,配置文件如下: #注册中心配置 eureka: instance: instanceId: ${spring.application.name}:${random.int} hostname: ...

  6. 【spring cloud】spring cloud 使用feign调用,1.fallback熔断器不起作用,2.启动报错Caused by: java.lang.ClassNotFoundException: com.netflix.hystrix.contrib.javanica.aop.aspectj.Hystri解决

    示例GitHub源码地址:https://github.com/AngelSXD/springcloud 1.首先使用feign调用,需要配置熔断器 2.配置熔断器需要将熔断器注入Bean,熔断器类上 ...

  7. mysql中PDO参数化引号引起的Warning: PDOStatement::execute(): SQLSTATE[HY093]:报错

    sql语句之前是这样写的:INSERT INTO tablename SET a = ':a',b = ':b',c = ':c',d = :d,e = :e $data = array ( [':a ...

  8. 报错org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.mybatis.spring.SqlSessionFactoryBean]

    超级大坑 org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.mybati ...

  9. eclipse中运行python脚本中有注释为中文的内容,报错:SyntaxError: Non-ASCII character '\xe5'

    '''Created on 2015年7月2日 @author: liujuan'''import sysreload(sys) 以上为注释的有个日期中文的,结果运行报错:SyntaxError: N ...

随机推荐

  1. JVM 性能排查--查看哪个对象占用内存大

    参考:http://blog.csdn.net/chenleixing/article/details/44227327/ 1.  在IE地址栏中输入:http://localhost/test/in ...

  2. SDK登录cognos

    通过SDK登录cognos 一种是拼xml,如这里的实现https://github.com/cosysoft/cognos-tools/blob/master/src/com/ibm/cognos/ ...

  3. 【hdu2825-Wireless Password】AC自动机+DP

    http://acm.hust.edu.cn/vjudge/problem/16883 题意:要构造一个长度为n的字符串,然后有m模板串构成一个集合(m<=10),构造出来的字符串至少含有k种模 ...

  4. NYOJ 284 坦克大战 (广搜)

    题目链接 描述 Many of us had played the game "Battle city" in our childhood, and some people (li ...

  5. 【Python实例二】BeautifulSoup爬虫简单实践

    前言 前面安装了BeautifulSoup库,现在就来实现一下吧. 目录 一.Urllib库的使用 二.BeautifulSoup的使用 三. 一个示例 ----------------------- ...

  6. 如何优雅地使用minicom

    minicom简介 安装 minicom是linux下一款常用的串口调试工具.ubuntu环境下,使用如下命令安装 sudo apt-get install minicom 配置 使用前需要进行配置, ...

  7. shell脚本(傻瓜式处理文件到指定分类)

    前言 每一到两周,我大概会新增十多个甚至更多的资料文件,都是些最近遇到的一些问题的总结或者相关技术文档,但是资料都是在公司电脑上,拷贝到自己电脑上后,又得一个个去找一个这个应该放到哪个分类,个人感觉很 ...

  8. C++格式输出控制

    #include<iostream> #include<string> #include<vector> #include<set> #include& ...

  9. JS实现上下左右对称的九九乘法表

    JS实现上下左右对称的九九乘法表 css样式 <style> table{ table-layout:fixed; border-collapse:collapse; } td{ padd ...

  10. JSTL c:url

    c:url 标签 jstl 实例代码和用法.     <c:url>标记格式化成一个字符串格式的URL,并将其存储到变量中.这个标签会在必要时自动执行URL重写. var属性指定的变量将包 ...