java
qq_41624280
这个作者很懒,什么都没留下…
展开
-
SpringBoot
关于SpringBoot无法创建Bean的特殊情况Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao'#当启动类的名字被修改之前启动后,再次修改启动类,发现某个不需要创建的bean出现报错,则可能是第一次启动时需要创建bean,第二次被修改了,而执行文件target中存在。则需要清除这个文件再启动。...原创 2021-03-18 16:16:15 · 102 阅读 · 0 评论 -
SpringBoot项目无法扫描到xml文件
SpringBoot项目无法扫描到xml文件错误为:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.deyunjiaoyu.sportplay.dao.UserDao.getUserByMessage#由#mybatis:#mapper-locations: classpath:mapper/*.xml#改为:mybatis: mapper-localtions: c原创 2021-03-13 16:55:36 · 723 阅读 · 0 评论 -
SpringBoot整合Thymeleaf
Controller中返回数据和页面的差别1.返回数据是需要添加@ResponseBody,2.返回到页面时,@Controller不可以使用@RestController代替,因为在返回页面的方法上不需要@ResponseBody; @ResponseBody @RequestMapping("/success") public String success(){ //classpath:/templates/success.html return原创 2020-12-08 13:48:58 · 98 阅读 · 0 评论 -
Socket相关理解
客户端:1. 数据发送: //1.连接 Socket sk = new Socket(address,port); //2.连接上之后放到输出流中 OutputStream os = sk.getOutputStream(); // 3.将对象的格式表示打印到文本输出流 PrintWriter pw = new PrintWriter(os); //4.向服务器写入需要发送信息! pw.write("向服务器发送信息!"); //刷新write,不然服务端可能接收不到原创 2020-09-04 17:08:50 · 109 阅读 · 0 评论 -
IDEA创建项目碰见的坑
项目中<groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId>相关报错,出现无法解析符号 'RestController’等问题,解决办法如下链接:https://blog.csdn.net/FungLi_notLove/article/details/104469940...原创 2020-08-11 15:37:35 · 157 阅读 · 0 评论 -
JSP数据传输
getAttribute()和getParameter()异同1.getAttribute()获取servlet之间的信息:在servletOne中设置如下,然后进行跳转到servletTwo中,thCon为web.xml中映射的名称。protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException{ ServletContext原创 2020-07-20 17:50:16 · 412 阅读 · 0 评论 -
Mybatis框架报错
UserMapper.xml相关报错org.apache.ibatis.exceptions.PersistenceException: ### Error building SqlSession.### The error may exist in com/mybatis/mapper/UserMapper.xml### The error occurred while processing mapper_resultMap[userVoa]_collection[cars]### Cause:原创 2020-07-17 13:55:23 · 125 阅读 · 0 评论 -
List集合空指针异常情况
List集合空指针1List<String> errormessage= null;//保存错误信息String str="第"+(m+1)+"数据保存失败;"; errormessage.add(str);for (String a:errormessage) { System.out.println(a);}需要将List<String> errormessage= null;改为 List<String> errormessage= new Ar原创 2020-07-17 10:29:19 · 1046 阅读 · 0 评论