mybatis
wuyin丶
别喷了我就是菜
展开
-
SpringBoot配置双数据源,mapper调用时数据源匹配错误问题
SpringBoot配置双数据源,mapper调用时数据源匹配错误问题错误现象Caused by: java.sql.SQLSyntaxErrorException: Table 'test.users' doesn't exist at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLExcept原创 2021-04-20 17:34:39 · 2301 阅读 · 0 评论 -
将实体类对象封装到mybatis逆向工程生成的example中
public Object packingExample(Object entity, Object entityExample) { try { // 得到类对象 Class<?> userCla = entity.getClass(); /* 得到类中的所有属性集合 */ Field[] fs = userCla.getDeclaredFields();...原创 2019-03-20 17:22:59 · 546 阅读 · 0 评论