文章目录
- 1. Cannot resolve symbol
- 2. Command line is too long
- 3. Illegal character
- 4. Unable to import Maven project
- 5. Cannot resolve xxx
- 6. Incorrect credentials
- 7. IDEA 与 WIN7 系统显卡快捷键冲突
- 8. MyBatis 的 XML 文件报错,提示更改方言
- 9. IDEA 数据资源管理器数据库显示不全
当不知道怎么解决
IDEA
出现的问题的时候,首先可以尝试重启一下
IDEA
,很多问题可能就没了,绝对是经验之谈。
1. Cannot resolve symbol
IDEA
无法识别某一个或者某些类,使用到这种类的地方import
都提示Cannot resolve symbol XXX
的错误,但是项目可以BUILD SUCCESS
。尝试了重启IDEA
,clean build
都没有用。这是因为IDEA
之前发生了错误,某些 setting
出了问题。解决方法如下:
点击菜单中的File -> Invalidate Caches/Restart
,然后点击对话框中的 Invalidate and Restart
,清空cache
并且重启。会发现错误提示消失了。
(1)菜单选项
(2)无效并重启(也就是删除缓存,并且会在下一次重启的时候重建缓存)
2. Command line is too long
我们项目里使用CodeGenerator
生成CRUD
代码的时候会报如下错误:
Error running 'CodeGenerator':
Command line is too long.
Shorten command line for CodeGenerator or also for Application default configuration.
翻译过来就是:命令行太长。缩短代码生成器或应用程序默认配置的命令行。
可以通过修改项目所在目录下的.idea\workspace.xml
解决。
我的目录:
D:\IdeaProjects\.idea\workspace.xml
。
找到标签:
<component name="PropertiesComponent">...</component>
在标签里加一行,表示动态路径:
<property name="dynamic.classpath" value="true" />
在使用Junit
执行测试类的时候又遇到了这个问题:
Error running 'FlowSimpleITTest.invokeTest':
Command line is too long. Shorten command line for FlowSimpleITTest.invokeTest or also for JUnit default configuration.
根据提示去设置下就可以了。
具体原因分析可以参考这篇博客:
IDEA命令行缩短器助你解决此问题:Command line is too long. Shorten command line…
3. Illegal character
不小心触动了Shift + Space
快捷键,将搜狗输入法由半角切换成全角了,在IDEA
中输入的代码一直提示非法字符(Illegal character
),如下所示,第一行是正常代码,第二行是非法字符。
以前在使用Eclipse
的时候也碰到过这个问题,当时没有总结博客,这次总结一下,这是输入法切换成全角的原因,只需要切换回半角状态即可。搜狗输入法的切换半角全角的快捷键是Shift + Space
。
直接把搜狗输入法的相关快捷键关闭:
4. Unable to import Maven project
新安装了一个本地maven
,安装目录D:\Program Files (x86)\apache-maven-3.6.2
,修改了setting.xml
文件中本地仓库的位置和下载镜像地址。配置了path
环境变量MAVEN_HOME
(配置这个只是为了在系统全局能直接使用maven
命令,可以选择不配)。
<localRepository>D:\Repository</localRepository>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
接下来在IDEA
中新建项目的时候一直报Unable to import Maven project
的错误,下面就是我新建的项目错误提示。
根据提示打开IDEA
的日志查看,显示的错误日志可以通过点击提示的标签Show Log in Explorer
或者通过工具栏的Help --->Show Log in Explorer
进入查看。提示的是谷歌注射器创建异常,无法创建注入器。其实我也没看出个啥。
#org.jetbrains.idea.maven - com.google.inject.CreationException: Unable to create injector
经过排查,最后发现是因为我的maven
版本过高引起的。使用和IDEA
中默认 maven
一致的版本即可解决。我的IDEA
版本是2019.2
,支持的默认maven
版本是3.6.1
,而我安装的是apache-maven-3.6.2
,所以导致了各种问题。直接删除了本地maven
,使用IDEA
自带的即可。网上看到其他人也有遇到类似问题,但是其他原因引起的,碰到的朋友可以参考下。
5. Cannot resolve xxx
这是个Maven
问题,表现是:刚检出的项目,在Maven
选项卡中一直报红色错误,Build
选项卡中会有对应错误提示。比如我遇到的就是:
Cannot resolve org.elasticsearch:elasticsearch:5.5.2
这是对应Jar
包一直下载不出来的缘故,可能有网络原因,也可能是目标资源的原因。我们可以直接到 MVN资源库 中把对应包下载出来,手动放到本地的Maven
资源库对应目录中,然后刷新Maven
错误提示即可消失(有时需要重启,Maven
选项卡中的错误才会消失)。
6. Incorrect credentials
在IDEA
添加码云账户的时候出现了这种错误提示,这里的Login
后面我填写的是我的码云账号,Password
后面填写的是我的码云密码。直接点击Log In
出现这种问题。
网上看了多数人说的是需要在Windows
的控制面板\用户帐户\凭据管理器
的Windows凭据
下的普通凭据
中删除对应的码云账户,意思是以第一次输错的话,错误的账号密码会被系统缓存,删除缓存后重新输入正确的才可以。不过我试了该方法不好使。后来我发现这个IDEA
中的这个Login
后面需要填写的不是码云的登录账号,而是码云上的个人空间地址,Password
后面填写的仍然是码云登录密码,然后就可以成功登录了。
7. IDEA 与 WIN7 系统显卡快捷键冲突
(2019年)最近入职了一家新公司,开始正式使用IDEA
作为开发工具,公司统一用的Win7
系统,然后在跟踪代码的时候就出现了问题,每次我按下 Ctrl+Alt+方向键
就会导致屏幕进行旋转,跟踪代码特别不方便,家里的Win10
系统没这个问题, 其实就是Win7
屏幕旋转快捷键和IDEA
代码跟踪快捷键冲突了,我们禁用操作系统的快捷键即可。
进入控制面板,点击调整屏幕分辨率,点击调整屏幕分辨率,点击高级设置。
点击图形属性
接下来会进入显卡控制面板,一般是在选项和支持的界面里进行快捷键禁用。
8. MyBatis 的 XML 文件报错,提示更改方言
下图我是使用了官方 IDEA 中文插件,英文提示好像如下所示:
<statement> or DELIMITER expected, got 'id'
使用的 MySQL,所以设置方言是 MySQL,但是一直提示这个红色错误,强迫症不能忍受。于是在网上找到了下面的方法,我们只需要把全局 SQL 方言和项目 SQL 方言都改为 Generic SQL 即可,改完后就不会提示这种错误了。
不过这么改了又引入了格式化的问题,就是在使用 Ctrl + Alt + L 进行 xml 文件格式话的时候,格式会出现问题。
举个例子,比如 SQL 中的SUM()
函数,在 MySQL 方言下格式化没有问题,但是在 Generic SQL 方言下格式化会变为SUM ()
,中间多了一个空格,在执行的时候直接会报语法错误,错误日志如下所示,所以这种修改带来的问题还是得注意。之后我又手动把空格去掉了,不对这个 xml 文件使用自动格式化。
2021-11-03 11:53:41.898 DEBUG 1 --- [tp1935122449-16] c.g.w.m.O.listStatisticsByDay : ==> Preparing: SELECT DATE (create_end_time) AS date, SUM (record_num) AS record_num FROM output_task_execution WHERE task_id = ? GROUP BY DATE (create_end_time) LIMIT ?, ?
2021-11-03 11:53:41.899 DEBUG 1 --- [tp1935122449-16] c.g.w.m.O.listStatisticsByDay : ==> Parameters: 145(Long), 0(Integer), 10(Integer)
2021-11-03 11:53:41.982 ERROR 1 --- [tp1935122449-16] c.g.w.exception.ExceptionHandlerAdvice : 通用异常处理
org.springframework.jdbc.BadSqlGrammarException:
### Error querying database. Cause: java.sql.SQLSyntaxErrorException: FUNCTION data_center.SUM does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
### The error may exist in class path resource [com/gtcom/web/mapper/xml/OutputTaskExecutionMapper.xml]
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: SELECT DATE (create_end_time) AS date, SUM (record_num) AS record_num FROM output_task_execution WHERE task_id = ? GROUP BY DATE (create_end_time) LIMIT ?, ?
### Cause: java.sql.SQLSyntaxErrorException: FUNCTION data_center.SUM does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: FUNCTION data_center.SUM does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:93) ~[spring-jdbc-5.3.9.jar!/:5.3.9]
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70) ~[spring-jdbc-5.3.9.jar!/:5.3.9]
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79) ~[spring-jdbc-5.3.9.jar!/:5.3.9]
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91) ~[mybatis-spring-2.0.6.jar!/:2.0.6]
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441) ~[mybatis-spring-2.0.6.jar!/:2.0.6]
at com.sun.proxy.$Proxy61.selectList(Unknown Source) ~[na:na]
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:224) ~[mybatis-spring-2.0.6.jar!/:2.0.6]
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:147) ~[mybatis-3.5.7.jar!/:3.5.7]
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:80) ~[mybatis-3.5.7.jar!/:3.5.7]
at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145) ~[mybatis-3.5.7.jar!/:3.5.7]
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86) ~[mybatis-3.5.7.jar!/:3.5.7]
at com.sun.proxy.$Proxy70.listStatisticsByDay(Unknown Source) ~[na:na]
at com.gtcom.web.service.impl.OutputTaskExecutionServiceImpl.listStatisticsOutputTaskExecutions(OutputTaskExecutionServiceImpl.java:88) ~[classes!/:na]
at com.gtcom.web.controller.OutputTaskExecutionController.listStatisticsOutputTaskExecutions(OutputTaskExecutionController.java:65) ~[classes!/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197) ~[spring-web-5.3.9.jar!/:5.3.9]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141) ~[spring-web-5.3.9.jar!/:5.3.9]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1064) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:517) ~[jakarta.servlet-api-4.0.4.jar!/:4.0.4]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.9.jar!/:5.3.9]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:584) ~[jakarta.servlet-api-4.0.4.jar!/:4.0.4]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) ~[jetty-servlet-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626) ~[jetty-servlet-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:228) ~[websocket-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) ~[jetty-servlet-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) ~[jetty-servlet-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.9.jar!/:5.3.9]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.9.jar!/:5.3.9]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) ~[jetty-servlet-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) ~[jetty-servlet-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.9.jar!/:5.3.9]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.9.jar!/:5.3.9]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) ~[jetty-servlet-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) ~[jetty-servlet-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.9.jar!/:5.3.9]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.9.jar!/:5.3.9]
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) ~[jetty-servlet-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) ~[jetty-servlet-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548) ~[jetty-servlet-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602) ~[jetty-security-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) ~[jetty-servlet-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) ~[jetty-server-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[jetty-io-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ~[jetty-io-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) ~[jetty-io-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) ~[jetty-util-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) ~[jetty-util-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) ~[jetty-util-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) ~[jetty-util-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:386) ~[jetty-util-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) ~[jetty-util-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) ~[jetty-util-9.4.43.v20210629.jar!/:9.4.43.v20210629]
at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]
Caused by: java.sql.SQLSyntaxErrorException: FUNCTION data_center.SUM does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.26.jar!/:8.0.26]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.26.jar!/:8.0.26]
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) ~[mysql-connector-java-8.0.26.jar!/:8.0.26]
at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:370) ~[mysql-connector-java-8.0.26.jar!/:8.0.26]
at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[HikariCP-4.0.3.jar!/:na]
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) ~[HikariCP-4.0.3.jar!/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) ~[mybatis-3.5.7.jar!/:3.5.7]
at com.sun.proxy.$Proxy91.execute(Unknown Source) ~[na:na]
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64) ~[mybatis-3.5.7.jar!/:3.5.7]
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79) ~[mybatis-3.5.7.jar!/:3.5.7]
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63) ~[mybatis-3.5.7.jar!/:3.5.7]
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325) ~[mybatis-3.5.7.jar!/:3.5.7]
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) ~[mybatis-3.5.7.jar!/:3.5.7]
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109) ~[mybatis-3.5.7.jar!/:3.5.7]
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:89) ~[mybatis-3.5.7.jar!/:3.5.7]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151) ~[mybatis-3.5.7.jar!/:3.5.7]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145) ~[mybatis-3.5.7.jar!/:3.5.7]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140) ~[mybatis-3.5.7.jar!/:3.5.7]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427) ~[mybatis-spring-2.0.6.jar!/:2.0.6]
... 74 common frames omitted
9. IDEA 数据资源管理器数据库显示不全
摘自:解决Idea连接MySql后数据库表显示不全问题
打开 Database 选项卡,点击 Data Source Properties,显示弹出框,选择 Schemas 勾选要在 IDEA 中显示的库,点击 OK 就完成了,这样我们就可以在 IDEA 界面看到想要看到的 MySQL 库了。