【解决报错】java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)_qiiingc的解题记录-程序员宅基地

技术标签: java  JAVA Web  jdbc  

IDE:IntelliJ IDEA Ultimate 2019.3 (我用的是学生版,只要大学邮箱能用就可以的)

报错信息全文附在最后。其中关键的信息就是:

Root Cause

java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

解决方法

1.首先,如果项目是你下载的,数据库的账户密码一定都要改好。

2.设置Mysql初始化root密码和允许远程访问:

(1)进入mysql数据库

mysql>update user set password=PASSWORD(‘123456’) where User='root';

(2)授权使Mysql被允许远程访问

mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
mysql>FLUSH PRIVILEGES;

 

报错信息全文

Exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))
### The error may exist in file [/Users/ching_shing/Downloads/JavaEETest-master/MyBlog/target/MyBlog/WEB-INF/classes/mapping/ArticleMapper.xml]
### The error may involve org.sang.dao.ArticleDao.getFirst10Article
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))
### The error may exist in file [/Users/ching_shing/Downloads/JavaEETest-master/MyBlog/target/MyBlog/WEB-INF/classes/mapping/ArticleMapper.xml]
### The error may involve org.sang.dao.ArticleDao.getFirst10Article
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))
	org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77)
	org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)
	com.sun.proxy.$Proxy27.selectList(Unknown Source)
	org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230)
	org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:137)
	org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:75)
	org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
	com.sun.proxy.$Proxy28.getFirst10Article(Unknown Source)
	org.sang.service.ArticleService.getFirst10Article(ArticleService.java:29)
	org.sang.controller.ArticleController.index(ArticleController.java:33)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:564)
	org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause

org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))
### The error may exist in file [/Users/ching_shing/Downloads/JavaEETest-master/MyBlog/target/MyBlog/WEB-INF/classes/mapping/ArticleMapper.xml]
### The error may involve org.sang.dao.ArticleDao.getFirst10Article
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))
	org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:564)
	org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
	com.sun.proxy.$Proxy27.selectList(Unknown Source)
	org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230)
	org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:137)
	org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:75)
	org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
	com.sun.proxy.$Proxy28.getFirst10Article(Unknown Source)
	org.sang.service.ArticleService.getFirst10Article(ArticleService.java:29)
	org.sang.controller.ArticleController.index(ArticleController.java:33)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:564)
	org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause

org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))
	org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
	org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:82)
	org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:68)
	org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:336)
	org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:84)
	org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
	org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)
	org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
	org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
	org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:564)
	org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
	com.sun.proxy.$Proxy27.selectList(Unknown Source)
	org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230)
	org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:137)
	org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:75)
	org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
	com.sun.proxy.$Proxy28.getFirst10Article(Unknown Source)
	org.sang.service.ArticleService.getFirst10Article(ArticleService.java:29)
	org.sang.controller.ArticleController.index(ArticleController.java:33)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:564)
	org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause

org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))
	org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)
	org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
	org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
	org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
	org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:82)
	org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:68)
	org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:336)
	org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:84)
	org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
	org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)
	org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
	org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
	org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:564)
	org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
	com.sun.proxy.$Proxy27.selectList(Unknown Source)
	org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230)
	org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:137)
	org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:75)
	org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
	com.sun.proxy.$Proxy28.getFirst10Article(Unknown Source)
	org.sang.service.ArticleService.getFirst10Article(ArticleService.java:29)
	org.sang.controller.ArticleController.index(ArticleController.java:33)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:564)
	org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause

java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
	com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)
	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3970)
	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3906)
	com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:873)
	com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1710)
	com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1226)
	com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2253)
	com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2284)
	com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2083)
	com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:806)
	com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
	java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
	com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
	com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:410)
	com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:328)
	org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
	org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
	org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
	org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
	org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
	org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
	org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
	org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:82)
	org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:68)
	org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:336)
	org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:84)
	org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
	org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)
	org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
	org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
	org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
	org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:564)
	org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)
	com.sun.proxy.$Proxy27.selectList(Unknown Source)
	org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230)
	org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:137)
	org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:75)
	org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
	com.sun.proxy.$Proxy28.getFirst10Article(Unknown Source)
	org.sang.service.ArticleService.getFirst10Article(ArticleService.java:29)
	org.sang.controller.ArticleController.index(ArticleController.java:33)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:564)
	org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
	org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
	org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
	org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
	org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

 

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/allisonshing/article/details/104686329

智能推荐

linux查看ipmi端口down,Linux下使用命令行配置IPMI_叶迅的博客-程序员宅基地

为了方便遥远的另一边干嘛干嘛的,单位部署了IPMI。我好动,所以就把一些IPMI的操作记了下来,当做日记记了下来。关于IPMI,据我所知,各家服务器所用的IPMI都差不多,配置方法基本都是一样的。我接触到的IPMI配置方法有:1.BIOS配置,这个简单,直接开机进BIOS,在进阶选项里配置IPMI的IP,掩码,网关。2.开机过程中,按照提示,按ctrl + E 进入IPMI的配置界面,没有拍照,上...

精通Hibernate——数据库的事务与声明事务边界_孙悟空2015的博客-程序员宅基地

数据库事务必须具备ACID特征,分别是原子性(Atomic)、一致性(Consistency)、隔离性(Isolation)和持久性(Durability) 声明事务包含以下内容: 1、事务的开始边界 2、事务的正常结束边界(commit):提交事务 3、事务的异常结束边界(rollback):撤销事务,使数据回到事务前的状态 数据库系统支持以下两种事务 1、自动提交模式:每个sql语句

[Bash基础] 判断字符串相等_mathemagics的博客-程序员宅基地_bash 判断字符串相等

判断字符串相等六种方式:test "$S1" = "$S2"[ "$S1" = "$S2" ]test "$S1" == "$S2"[ "$S1" == "$S2" ][[ $S1 = $S2 ]][[ $S1 == $S2 ]]Note: 在[[ ]]中,变量的引用可以不加双引号;这是与[ ]的不同之处。判断字符串不相等test "$S1" != "$S2"[ "$S1" != "$S2" ][[ $S1 != $S2 ]]也可以在判断字符串相等的基

多种样式的select下拉框扩展,总有一款适合你_jintonghuoya的博客-程序员宅基地

很多人为select的诸多不完善而头痛,如无法自定义样式、IE6中无法被浮动层遮住等等。下面介绍一款堪称最完美的下拉框组件。感兴趣的可以从最后的链接地址下载代码研究与交流。特点1:美化的并且可自定义的外观下拉框使用JS进行渲染。当页面引入了脚本和CSS后,页面中的下拉框都会变成如下外观:该外观是由CSS和图片控制。通过修改CSS可以很方便地实现更改外观。下拉框不存在IE

OpenGL(7)之坐标系统_kk君的博客-程序员宅基地_opengl z轴正方向

title: OpenGL(7)之坐标系统date: 2020-07-11 10:34category: 图形学 tags: opengllink:&lt;a href="https://hashwaney.github.io/%E5%9B%BE%E5%BD%A2%E5%AD%A6/2020/07/11/opengl_7.html"&gt;OpenGL(7)之坐标系统&lt;/a&gt;0.前言上一节学习了关于利用矩阵变换对顶点进行变换达到我们的看的物体是动态的,但是OpenGL希望的是每次

管理员禁用了服务器访问网站,在客户端访问服务器上启用或禁用信息权限管理..._weixin_39844481的博客-程序员宅基地

在客户端访问服务器上启用或禁用信息权限管理2021/6/1本文内容适用于:Exchange Server 2013在客户端访问 (IRM) 启用信息权限管理可启用以下功能:Microsoft Office OutlookWeb 应用Microsoft Exchange ActiveSync 中的 IRM在客户端访问服务器上启用 IRM 时,Outlook Web App用户可以通过应用在 AD R...

随便推点

对字符串中的重复字符进行删除并计数__kimcho的博客-程序员宅基地

#include &quot;stdio.h&quot;#define NUM 10int main() { char string[NUM]; int count[255]={0}; int i,j,k,num=1; gets(string); printf(&quot;未处理前期数组:%s\n&quot;,string); //对数组中的重复字符进行删除 for(i=0;string[i]!='\0';i+...

android livedata原理,Jetpack真香系列之LiveData原理解析_weixin_39717318的博客-程序员宅基地

LiveData是什么?首先贴上官方链接从字面意思上来看,这个是一个活跃,有生命的数据。那为何活跃?活跃与否从何判断?先来看这么一个类LifecycleOwner他是一个生命周期的持有者,做为一个android开发来说,这个对大家来说都不陌生,我们所熟知的Activity,Fragment,他们是有典型的生命周期特征,oncreate,onstart,onpause,onstop,ondestor...

Internet信使--模仿QQ常用功能(基于WSAAsyncSelect模型)_蔷薇理想人生的博客-程序员宅基地

Internet信使【摘要】 时下腾讯QQ即时通讯软件的应用如火如荼,只要上网的人都知道QQ,几乎得上网的人都拥有自己的QQ号甚至是多个,然而腾讯的前身是QICQ,走到今天算是一个不平凡的历史,当年她就是模仿外国的ICQ来的,由于版权原因最终才改为腾讯QQ的。如今QQ成为中国网民最喜欢的通讯软件了,当年只有很简单的功能,经过几年的发展升级变成了今天超级强大的功能了,当然还有类似的国内通讯软件,如新浪的UC软件等。90年代后期,互联网刚刚在中国开始普及的时候,国外的ICQ软件可算是全球的聊天软件的老大,比腾讯

CMake和Linux编程:find_package的使用_weixin_34259232的博客-程序员宅基地

1.第一个CMake例子  在 t1 目录建立 main.c 和 CMakeLists.txt(注意文件名大小写):  main.c 文件内容://main.c#include &lt;stdio.h&gt;int main(){ printf(“Hello World from t1 Main!n”); return 0;} Cmake...

数字证书及CA的扫盲介绍_你行你上天的博客-程序员宅基地

 ★ 先说一个通俗的例子  考虑到证书体系的相关知识比较枯燥、晦涩。俺先拿一个通俗的例子来说事儿。  ◇ 普通的介绍信  想必大伙儿都听说过介绍信的例子吧?假设 A 公司的张三先生要到 B 公司去拜访,但是 B 公司的所有人都不认识他,他咋办捏?常用的办法是带公司开的一张介绍信,在信中说:兹有张三先生前往贵公司办理业务,请给予接洽......云云。然后在信上敲上A公司的公章。  张...

奇技淫巧:手工为FMS3安装Adobe Flash Media Encoder 2 Authentication Add-In_weixin_30335353的博客-程序员宅基地

前日拖下FMS3安装后,发现Adobe Flash Media Encoder 2 Authentication Add-In由于官方没有及时更新,与FMS3出现了一点小小的误会,居然检测不到FMS3,下图为证,提示需要安装FMS,这不是睁着眼睛说瞎话吗?呵呵,不管那么多了,既然此路不通,咱们就另辟它径,仔细打量了一下auth_addin_win_v2.1.msi...

推荐文章

热门文章

相关标签