01 2021 档案
摘要:错误信息: ### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the m
阅读全文
摘要:问题描述: 若测试代码成功运行,但sql的表中并没有新添加的数据。 原因: 在获取SQLSession对象时,可能选择了手动添加(代码如下,表面上看没有区别) SqlSession openSession = sqlSessionFactory.openSession(); 解决办法: 在添加数据后
阅读全文
摘要:MySql循环插入出错 错误原因: Cause: org.apache.ibatis.binding.BindingException: Parameter 'ids' not found. Available parameters are [arg0, collection, list] 代码如下
阅读全文
摘要:我敲好了分步查询的相关代码,如下: public interface DepartmentMapper { public Department getDaptById(Integer id); } <mapper namespace="com.fenga.mybatis.dao.Department
阅读全文
摘要:${}和#{}对比: 共同点:都可以获取map中的值或者pojo对象的属性值 区别: #{}:是以预编译的形式,将参数设置到sql语句中;PreparedStatement;防止sql注入 ${}:取出的值直接拼装在sql语句中;会有安全问题; 例: select * from tbl_employ
阅读全文
摘要:在测试MyBatis出现下面问题: java.io.IOException: Could not find resource mybatis-config.xml 原因: 找不到全局配置文件mybatis-config.xml 我存放的路径: 解决办法: 建立的文件夹conf不是资源文件夹 建立时选
阅读全文
摘要:在导入mybatis-3-mapper.dtd后出现 方法一可以通过修改 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> 来解决。
阅读全文
摘要:1、进入官网http://shiro.apache.org/download.html 2、选择下载版本 3、选择下载需要的jar包名
阅读全文

浙公网安备 33010602011771号