05 2018 档案

摘要:在java集合中,判断一个集合是不是为空,有三种方法:null,isEmpty(),size()==0.对这三者进行一个比较: null:直接判断有没有这个集合,就像有没有某个东西一样; isEmpty:判断集合里面有没有元素,前提是有这个集合;如果集合为null,会抛出空指针异常. size()= 阅读全文
posted @ 2018-05-28 17:53 南城北国 阅读(1270) 评论(0) 推荐(0)
摘要:import org.junit.runner.RunWith;import org.springframework.boot.test.context.SpringBootTest;import org.springframework.test.context.junit4.SpringRunne 阅读全文
posted @ 2018-05-18 09:10 南城北国 阅读(163) 评论(0) 推荐(0)
摘要:1.dao层 public interface userDao(){ void add(User user); } 2.service层 public interface userService(){ void add(User user); } 3.serviceImpl @Service pub 阅读全文
posted @ 2018-05-17 10:36 南城北国 阅读(224) 评论(0) 推荐(0)