当前位置: 首页 > news >正文

SpringMVC-mybatis,SQL语句中误用了desc关键字,导致报错。

在这里插入图片描述

17-Jul-2023 21:26:22.295 淇℃伅 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.ApplicationContext.log 1 Spring WebApplicationInitializers detected on classpath
17-Jul-2023 21:26:22.621 淇℃伅 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
17-Jul-2023 21:26:24.775 淇℃伅 [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.ApplicationContext.log Initializing Spring DispatcherServlet 'dispatcher'
17-Jul-2023 21:26:37.403 涓ラ噸 [http-nio-8080-exec-1] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [dispatcher] in context with path [] threw exception [Request processing failed; nested exception is 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 'desc FROM ssmBooks' at line 1
### The error may exist in com/athome/dao/BookDao.java (best guess)
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT ssm_id id, ssm_type type, ssm_name name, ssm_desc desc FROM ssmBooks
### 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 'desc FROM ssmBooks' 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 'desc FROM ssmBooks' at line 1] with root causejava.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 'desc FROM ssmBooks' at line 1at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:955)at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:372)at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:498)
http://www.lryc.cn/news/98256.html

相关文章:

  • adb笔记
  • RocketMQ教程-(5)-功能特性-顺序消息
  • Oracle TNS侦听器远程中毒(CVE-2012-1675)
  • Springboot+Netty
  • window.location.href is not a function
  • STM32+FPGA的导常振动信号采集存储系统
  • Eclipse memory analyzer 分析GC dump日志定位代码问题
  • DSA之图(3):图的遍历
  • 从零开始学习 Java:简单易懂的入门指南之for循环(四)
  • Android 之 http/https原理和机制
  • mybatis源码研究、搭建mybatis源码运行的环境
  • 【算法基础:搜索与图论】3.5 求最小生成树算法(PrimKruskal)
  • 扩展Ceph集群实现高可用
  • 代码随想录 DAY45
  • Centos报错:[Errno 12] Cannot allocate memory
  • 手把手教你怎么写顺序表
  • FPGA中RAM的结构理解
  • 家庭用的无线洗地机到底好不好用?2023洗地机品牌排行榜前十名
  • [React]常见Hook实现之useUpdateEffect
  • 为什么视频画质会变差,如何提升视频画质清晰度。
  • 【uni-app2.0】实现登录页记住密码功能
  • IDEA live templates
  • 电子鼻毕业论文
  • 8 | 爬虫解析利器 PyQuery 的使用
  • 2023年 React 最佳学习路线
  • 使用 ChatGPT 进行研究的先进技术
  • Java-API简析_java.net.Proxy类(基于 Latest JDK)(浅析源码)
  • 磁盘问题和解决: fsck,gdisk,fdisk等
  • 基于深度学习的高精度六类海船检测识别系统(PyTorch+Pyside6+YOLOv5模型)
  • 【React Native】学习记录(一)——环境搭建