org.hibernate.QueryException: Space is not allowed after parameter prefix ':'

spring mvc + Hibernate4x + maven 抛异常报错:
exception
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.hibernate.QueryException: Space is not allowed after parameter prefix ':' 

root cause

org.hibernate.QueryException: Space is not allowed after parameter prefix ':' 
解决-->引用占位符:的前后不允许有空格。
error:
...AND apply.startTime >=: startTime1 AND apply.endTime <=: endTime1 
correct:
 
  
AND apply.startTime >=:startTime1 AND apply.endTime <=:endTime1 

你可能感兴趣的:(debug)