自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

原创 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 132

原创 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 740

原创 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 123

原创 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 125

原创 关于Springboot2.0项目的mysql驱动问题

驱动未添加也能访问数据库datasource:# driver-class-name: com.mysql.cj.jdbc.Driver具体原因未知,相关博客:https://juejin.im/post/5c9f53836fb9a05e462b8d9a

2020-08-31 10:47:31 251

原创 Springboot框架搭建问题

配置文件关于数据库配置不起作用:原因:利用Database连接过数据库,配置文件中的配置信息失效。解决办法:修改数据库密码或关掉Database连接。

2020-08-18 16:43:32 104

原创 Springboot框架

框架搭建过程的一个大坑2020-08-18 14:11:52.220 ERROR 10904 --- [ main] o.s.boot.SpringApplication : Application run failedorg.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'categoryCotroller': Un

2020-08-18 14:17:45 222

原创 Mysql表格创建报错

报错:1067 - Invalid default value for 'JZ_LSH_ID'分析:myql数据库的numeric类型数据不能定义为空,即:JZ_LSH_ID` numeric NOT NULL default ''错误。解决办法:去掉默认值即可。

2020-08-14 17:07:13 439

原创 Mysql创建数据库报错

报错:1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARCHAR2(20) NOT NULL default '', `PAT_JZCS` DOUBLE, `JZKH` VARCHAR2(200) ' at line 3原因:oracle数据库的VARCHAR

2020-08-14 17:02:43 657

原创 Kettle工具的使用

kettle报错问题插入 / 更新.0 - Field [null] is required and couldn't be found!原因:在sql中添加了一个字段后,同时在更新/插入里面进行映射,后面因为其他原因先是在sql中取消了这个字段,在将映射的字段也取消后就报这个错。分析:可能是步骤错了,应该是将更新/插映射字段去掉,再将sql中的字段去掉。解决办法:先将在sql中删除的字段重新添加,然后将映射将更新/插映射字段去掉,再将sql中的字段去掉。...

2020-08-14 11:08:10 1944

原创 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 227

原创 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 422

原创 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 140

原创 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 1089

原创 Mybatis的SqlMapConfig.xml配置文件相关属性

SqlMapConfig.xml相关属性properties(属性)settings(全局配置参数)typeAliases(类型别名)typeHandlers(类型处理器)objectFactory(对象工厂)plugins(插件)environments(环境集合属性对象)environment(环境子属性对象,包含transactionManager-事务管理和dataSource(数据源))mappers(映射器)1.properties是一个配置元素属性,该元素用于将内部元素

2020-07-07 17:04:10 88

原创 Mybatis基础使用

Mybatis基础使用步骤1.创建web项目,在lib中加入需要使用的jar包。2.创建日志文件log4j.properties,做基础日志配置。3.创建配置文件SqlMapConfig.xml,做基础环境配置。4.创建po类User.java5.创建UserMapper.xml文件,编写sql语句6.创建测试类UserTest.java总体框架:1 .创建web项目,在lib中加入需要使用的jar包。2.创建日志文件log4j.properties,做基础日志配置。log4j.ro

2020-07-07 15:33:40 89

原创 Mybatis学习

Mybatis报错:org.apache.ibatis.exceptions.PersistenceException:Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for test.findUserByIdCause: java.lang.IllegalArgumentException: Mapped S

2020-07-07 09:39:00 94

原创 Mybatis

什么是ORM?ORM简介对象关系映射(Object Relational Mapping,简称ORM)模式是一种为了解决面向对象与关系数据库之间映射存在不匹配的现象的技术。 简单地说,ORM是通过使用描述对象和数据库之间映射的元数据(表格中对应的数据),将程序中的对象自动持久化到关系数据库中。ORM概念...

2018-09-17 19:58:35 110

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除