问题1
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.study.oa.dao.AccountDAO.selectByExample
2021-01-17 04:39:02.716 ERROR 57660 --- [nio-8080-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.study.oa.dao.AccountDAO.selectByExample] with root cause
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.study.oa.dao.AccountDAO.selectByExample
出现原因
多建立了一个目录,也是对应的,但不知道为什么就是会报错
解决办法
删掉mybatis目录就可以,然后修改locations位置
疑惑
出现这个问题的原因不知道,希望谁如果知道,烦请指导一下,感谢
问题2
使用mvn clean命令成功,但是target目录并没有被清除
解决办法
使用点击的方式可以清理成功
疑惑
原因不知
问题3
2021-01-19 14:08:05.274 ERROR 12256 --- [nio-8080-exec-3] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/manager/roleList.html]")] with root cause
org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'loginName' cannot be found on object of type 'com.study.oa.po.Role' - maybe not public or not valid?
出现原因
模板文件中有的属性后端没有传过来,解决办法,传过来就好了
问题4
### Error updating 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 'insert into role_permission (role_id, permission_id) values (2,2)' at line 2
### The error may exist in file [D:\oa\target\classes\mapper\RoleDAO.xml]
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: delete from role_permission where role_id=?; insert into role_permission (role_id, permission_id) values (?,?)
### 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 'insert into role_permission (role_id, permission_id) values (2,2)' at line 2
; 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 'insert into role_permission (role_id, permission_id) values (2,2)' at line 2] with root 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 'insert into role_permission (role_id, permission_id) values (2,2)' at line 2
出现原因
mysql不支持同时发多条SQL
解决办法
在application.properties中URL后面添加 allowMultiQueries=true
问题5
打包异常
解决办法
引入插件,跳过测试
问题6
端口占用
出现原因
解决办法
第一步,查看会话状态,查看8080端口,显示占用端口的进程
第二步,运行windows自带taskkill命令,将占用端口的进程号,/f 强制结束。
然后重新启动
或者直接修改端口