1.mybatis
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.i7i8i9.base1.mapper.SysUserMapper.queryList
原因:yml配置错误
错误配置:
#数mybatis
mybatis:
mapper-locations:
classpath: /mapper/*.xml
正确配置:
mybatis:
mapper-locations: classpath:/mapper/*.xml
2.HHH000342: Could not obtain connection to query metadata
后端和数据库都是docker运行的,且docker之间建了网络
在后端连接数据库docker时可以用内网ip,但要注意可以要用数据库docker自身端口,而不是映射服务器的端口
2.SpringBoot
Controller 请求报错
No primary or single unique constructor found for interface javax.servlet.http.HttpServletRequest
原因:导入错了包
错误的
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
正确的
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
声明未加@AutoWired
Cannot invoke "com.i7i8i9.ebook3.weixin.service.WeiXinService.initJSSDKConfigInfo(String)" because "this.weiXinService" is null