org.springframework.web.util.NestedServletException: Request processing failed; nested exception is
org.springframework.aop.AopInvocationException: Null return value from advice does not match primitive return type for:
public abstract int com.*.VoterDao.todayCountVote(java.util.Date)
下面是我的dao層
@Query("select sum(v.daysNum) from Voter v where v.updateTime>?1") int todayCountVote(Date date);
應該是自動拆箱的時出現的問題,把int換成 Integer 包裝類就行了,如果還報空指針的錯誤,就加個null判空。
完!
