区间查询功能不能实现怎么半

有个问题还是想问下,我就是做了个商品表怎删改查功能,然后我想做个区间查询功能,然后我写的测试类里面测能给数据库里内容显示出来,但是在页面上一起服务就报错,我没看懂这个错什么意思

一月 29, 2019 10:19:27 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [springmvc] in context with path [/maven05] threw exception [Request processing failed; nested exception is java.lang.IllegalStateException: Optional int parameter 'p1' is present but cannot be translated into a null value due to being declared as a primitive type. Consider declaring it as object wrapper for the corresponding primitive type.] with root cause
java.lang.IllegalStateException: Optional int parameter 'p1' is present but cannot be translated into a null value due to being declared as a primitive type. Consider declaring it as object wrapper for the corresponding primitive type.

从异常信息判断应该是ORM映射时使用的Java实体的类型和数据库字段类型映射时使用了原始的int类型,修改映射配置文件为对应的包装类型试试。

意思是你的类型是基本类型,然后你可能
xml if 里面判断它不等于null 而引发的类型转换问题