验证AreaController.java的时候没有返回json,报错了

来源:2-10 验证Controller

qq_慕哥2339582

2020-05-22

老师好,在验证AreaController.java的时候没有返回json,报错了
报错信息:
{“success”:false,“errMsg”:“org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: \r\n### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!\r\n### The error may exist in file [F:\com\o2o\out\artifacts\o2o_war_exploded\WEB-INF\classes\mapper\AreaDao.xml]\r\n### The error may involve com.chr.o2o.dao.AreaDao.queryArea\r\n### The error occurred while executing a query\r\n### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!”}

写回答

1回答

慕少0402564

2020-05-23

返回json了,从数据库查没查出来,

1
1
qq_慕哥2339582
同学我问题解决了,我跟换mysql-connector-java这个依赖包,在项目没有重新更新
2020-05-23
共1条回复

Java双版本(SSM到SpringBoot)校园商铺全栈开发

SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需

5113 学习 · 8144 问题

查看课程