mybatis,调用存储过程,“setselect”附近有语法错误。
把参数直接改成 'Day', 'JTLL', 2015, 06, 15, 0
就没有问题。
完整log
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.jdbc.UncategorizedSQLException: ### Error querying database. Cause: com.microsoft.sqlserver.jdbc.SQLServerException: “setselect”附近有语法错误。 ### The error may exist in file [D:\zngkpt\code\zngkpt\out\artifacts\highway_war_exploded\WEB-INF\classes\mapper\sqlserver\TrafficReportStatic.xml] ### The error may involve com.unisits.zngkpt.framework.highwayreport.mapper.TrafficReportDao.getTrafficReportData-Inline ### The error occurred while setting parameters ### SQL: {call Get_TrafficData_Report ( ?, ?, ?, ?, ?, ? )} ### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: “setselect”附近有语法错误。
存储过程报错,直接把报错的参数用来调试存储过程就知道什么问题了