问题记录
# 问题记录
mybaties执行查询语句,把sql行记录映射到实体类返回结果时报错
原因:创建和数据表对应的实体类时,没有添加无参构造方法。
解决:添加无参构造方法
连接通过jdbc.properties配置文件连接druid数据连接池时报错"Access denied for user"
原因:数据库配置文件中"username","password"等变量名和系统变量名出现冲突
解决:添加前缀,jdbc.username
添加组件包扫描<context:component-scan>时无法正确解析,通配符的匹配很全面, 但无法找到元素"..."
原因:没有在schemaLocation配置上相应的文件信息
解决:完整配置如下
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd ">1
2
3
4
5
6
编辑 (opens new window)
上次更新: 2023/12/15, 15:49:57