springboot 在整合数据库时发生了报错终端提示信息如下
org.springframework.jdbc.BadSqlGrammarException:
### Error querying database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by id=1' at line 1
### The error may exist in com/kenochou/dao/AirConditionerDao.java (best guess)
### The error may involve com.kenochou.dao.AirConditionerDao.getById-Inline
### The error occurred while setting parameters
### SQL: select * from tb1_AirCondition where by id=?
### Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by id=1' at line 1
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by id=1' at line 1
sql写错了,where by id=是什么 写法,换成 where id= 试试 ,by 一般是结合order使用 order by 用来排序