摘要: exception [Request processing failed; nested exception is java.lang.NullPoin 原因:查询数据的时候,俩张表的数据对不上 解决办法:删除多余的数据(目前水平有限) 阅读全文
posted @ 2021-11-14 15:39 江南0o0 阅读(458) 评论(0) 推荐(0) 编辑
摘要: 1、Ctrl+N按名字搜索类 相当于eclipse的ctrl+shift+R,输入类名可以定位到这个类文件,就像idea在其它的搜索部分的表现一样,搜索类名也能对你所要搜索的内容多个部分进行匹配,而且如果能匹配的自己写的类,优先匹配自己写的类,甚至不是自己写的类也能搜索。 2、Ctrl+Shift+ 阅读全文
posted @ 2021-11-13 16:32 江南0o0 阅读(157) 评论(0) 推荐(0) 编辑
摘要: collection的一些方法 List list = new ArrayList(); //add 添加 list.add(1); list.add("你好"); list.add(true); System.out.println("list:" + list); //remove 删除:1.指 阅读全文
posted @ 2021-11-13 10:18 江南0o0 阅读(23) 评论(0) 推荐(0) 编辑
摘要: dDependencyException: Error creating bean with name 'userController': Unsatisfied dependency expressed through field 'userService'; nested exception i 阅读全文
posted @ 2021-11-12 10:03 江南0o0 阅读(1279) 评论(0) 推荐(0) 编辑
摘要: 在接口上方添加标签 @CacheNamespace(blocking = true) 阅读全文
posted @ 2021-11-11 09:13 江南0o0 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 一、一对一 实体类 //多对一(mybatis中称之为一对一)的映射:一个账户只能属于一个用户 private User user; public User getUser() { return user; } public void setUser(User user) { this.user = 阅读全文
posted @ 2021-11-11 08:53 江南0o0 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 实体类 //多对多的关系映射:一个角色可以赋予多个用户 private List<User> users; public List<User> getUsers() { return users; } public void setUsers(List<User> users) { this.use 阅读全文
posted @ 2021-11-10 10:44 江南0o0 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 一、在主表实体类创建从表实体的list集合(主表user,从表account) public class User implements Serializable { private Integer id; private String username; private String addres 阅读全文
posted @ 2021-11-10 09:35 江南0o0 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 一、实体类从表添加主表的对象(主表user,从表account) public class Account implements Serializable { private Integer id; private Integer uid; private double money; //添加主表对 阅读全文
posted @ 2021-11-10 09:01 江南0o0 阅读(32) 评论(0) 推荐(0) 编辑
摘要: if标签 <!-- 根据输入的参数进行查询 --> <select id="findUserByCondition" resultMap="userMap" parameterType="user"> select * from user where 1=1 <if test="userName ! 阅读全文
posted @ 2021-11-09 14:58 江南0o0 阅读(21) 评论(0) 推荐(0) 编辑