1.sql语法异常 注入异常报错
org.springframework.jdbc.BadSqlGrammarException:
Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column ‘project_name’ in ‘field list’
The error may exist in com/turing/wbs/mapper/WbsPlanMapper.java (best guess)
报错位置如下
最后解决办法是,重写了红框中的方法
2.没有写 @responsebody 导致回传数据异常
17:43:01.652 [http-nio-80-exec-4] ERROR org.thymeleaf.TemplateEngine - [THYMELEAF][http-nio-80-exec-4] Exception processing template “wechatRole/addsave”: Error resolving template [wechatRole/addsave], template might not exist or might not be accessible by any of the configured Template Resolvers
org.thymeleaf.exceptions.TemplateInputException: Error resolving template [wechatRole/addsave], template might not exist or might not be accessible by any of the configured Template Resolvers
错误位置
@responsebody 写在上面红框处问题就解决了!