【已解决】org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.

Spring-Mybatis integration

出现:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 异常

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error updating database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Access denied for user 'Y7000'@'localhost' (using password: YES)
### The error may exist in file [D:\从零开始\spring\bj-SpringStudy-Mybatis01\bj-SpringMybatis-01\target\classes\com\jcjava\mapper\UserMapper.xml]
### The error may involve com.jcjava.mapper.UserMapper.insertUser
### The error occurred while executing an update
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Access denied for user 'Y7000'@'localhost' (using password: YES)

Solution:
This is a JDBC naming conflict;
insert image description herechange to:
insert image description here!!! Finally, don't forget to add jdbc to the data in ${} in the applicationContext.xml file.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=324058182&siteId=291194637