Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: 无法将 NULL 插入 (“ZHXY_RSW_LOCAL”.“T_EXAM_SUBJECT”.“ID”)
使用mybatis-plus插入时,明明设置了id的值,还报这个错
在id字段上,添加 @TableId(type = IdType.INPUT)
Ambiguous mapping
Controller中有两个接口名字一样了
400 Bad Request
这一般就是请求参数不对,我这里是实例类中日期类型从Date 改为 String ,传参的时候才能传 2021-10-07,否则必须传2021/10/07
ORA-01745: 无效的主机/绑定变量名
将#改为$
order by ${reqVo.sortField} ${reqVo.sortOrder}
ORA-00911: 无效字符
Sql贴出来执行没问题,但是swagger调用就会报错
常见报错为:ORA-00911: 无效字符
可能是多了分号
nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{…}.Cause: org.apache.ibatis.type.TypeException: Error setting null for parameter #3 with JdbcType OTHER . Try setting a different JdbcType for this parameter or a different jdbcTypeForNull configuration property. Cause: java.sql.SQLException: 无效的列类型: 1111
不勾选才表示不传参数,勾选了表示传参了 空字符串
主要问题在于动态SQL中的条件,or改为and
Invalid bound statement (not found): com.iflytek.reptile.dao.UserMapper.findUserByName
检查application.properties配置文件中是否配置了mybatis.mapper-locations=classpath:mappers/*.xml
如果是mybatis-plus则使用:
mybatis-plus.mapper-locations=classpath:mappers/*.xml
ORA-00942: 表或视图不存在
ORA-00903: 表名无效
java.lang.NoSuchMethodException:com.iflytek.reptile.mapper.CommentMapper.()
ORA-01747: user.table.column, table.column 或列说明无效
There is no getter for property named ‘query’ in ‘class com.iflytek.core.vo.resource.TEnterpriseResourcesReqVoForExcel’
去掉mapper.xml中的query. 只有mapper接口中的参数使用了
@Param(“query”) 注解,才使用
Parameter ‘park’ not found. Available parameters are [query, page, param1, param2]
在mapper.xml中加上query. 因为在mapper接口中使用的@Param(“query”)注解,表示传过来的参数是query
No primary or single public constructor found for interface java.util.List - and no default constructor found either No primary or default constructor
原因是List是个接口,没有默认的构造器,需要加上@RequestParam注解
Unsatisfied dependency expressed through field ‘baseMapper’
看mapper接口上是不是没有加@Mapper注解
required a single bean, but 2 were found
启动类上加了,MybatisPlusConfig文件上也加了@MapperScan
com.alibaba.fastjson.JSONException: Text ‘2020-09-15T00:00:00’ could not be parsed, unparsed text found at index 10
将fastjson的版本换成 <fastjson.version>1.2.69</fastjson.version>
或者: