![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SSM
SpringMVC\Spring\Mybatis
life4what
这个作者很懒,什么都没留下…
展开
-
mybatis&数据库:BadSqlGrammarException
org.springframework.jdbc.BadSqlGrammarException: ### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual...原创 2020-02-17 23:13:52 · 1564 阅读 · 0 评论 -
layui+SSM的图片存取记录
我的思路是用layui的upload模块进行上传,然后保存在服务端并返回我的存储的路径path,若用户此时要删除图片,可以直接点击图片删除,然后后台马上从服务器端删除。(这一部分,我打算后期是不是可以用缓存来替代,而不是硬盘的直接读写)然后就是用户确认上传图片,那么我直接把图片的path提交到后台,存入数据库!废话不多说 ,直接上关于图片部分的代码,需要的自取!↓1.前端HTML部分(这...原创 2020-02-13 20:58:40 · 269 阅读 · 0 评论 -
layui的多图片上传
踩了很多坑,特此记录。layui的upload模块,在上传多图片时,其实就是一个一个上传。后台(java为例子)接收方式@RequestParam MultipartFile file出现了conveter 这个转换异常就是下面解决办法POM.XML的依赖(一定要记得加上!)<!-- springMVC的json转换依赖包 --> <dependency> ...原创 2020-02-10 23:58:30 · 905 阅读 · 0 评论 -
前端返回页面出现404情况(持续更新)
1.java后端的controller没有添加@responsebody原创 2020-02-09 12:46:02 · 5865 阅读 · 2 评论 -
Exception getting JDBC Driver
错误报告:Weibao-mbgConfiguration.xml.xml:5: java.lang.RuntimeException: Exception getting JDBC Driverjava.lang.RuntimeException: Exception getting JDBC Driver解决办法:在pom.xml添加以下依赖<!-- mysql-java的驱动 --&...原创 2020-02-07 10:58:53 · 475 阅读 · 0 评论 -
Could not set property 'xxxxxx' of 'xxxxxx' with value 'xxxxx'
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property ‘id’ of ‘class com.hrms.entity.Family’ with value ‘1216317686162...原创 2020-01-12 19:55:16 · 4117 阅读 · 0 评论 -
Parameter 'item' not found. Available parameters are [families, param1]
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘item’ not found. Available parameters are [families, param1]at org.mybatis.spring...原创 2020-01-11 15:14:38 · 1266 阅读 · 0 评论 -
Parameter 'employeeNum' not found. Available parameters are [arg0, name, param1, param2]
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘employeeNum’ not found. Available parameters are [arg0, name, param1, param2]at o...原创 2020-01-09 12:51:02 · 411 阅读 · 0 评论 -
springMVC传值给layui的parseData详细使用
其他的表格参数很简单,这里主要是记录一下parseData。首先我们先看一下layui官方文档parseData 数据格式解析的回调函数,用于将返回的任意数据格式解析成 table 组件规定的数据格式 假设你接口返回的数据为以下格式codelayui.code { “status”: 0, “message”: “”, “total”: 180,“data”: {“ite...原创 2020-01-08 14:33:35 · 3839 阅读 · 1 评论 -
org.xml.sax.SAXParseException;lineNumber:1;columnNumber:1;前言中不允许有内容
java.lang.IllegalStateException: Failed to load ApplicationContextat org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.j...原创 2020-01-06 12:49:03 · 5590 阅读 · 0 评论 -
mybatis:延迟加载
mybatis延迟加载的实现使用这个里面的数据库表来讲解https://blog.csdn.net/qq_36453423/article/details/1036046322.scores.xml<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Ma...原创 2019-12-19 14:40:27 · 98 阅读 · 0 评论 -
mybatis:多表查询级联查询
mybatis多表查询利用Set类,将scores类封装进student类,进行级联查询!查询出来还是student对象,对象里含有一个HashSet<Scores>用来存放scores对象。1.准备两张mysql的数据库表t_student、t_scores2.创建对应的entity(pojo\bean)类此处略,根据数据库自己建立3.Mapper接口添加一个方法4....原创 2019-12-18 20:57:51 · 504 阅读 · 0 评论 -
sqlSession出错;java.lang.IllegalStateException: Failed to load ApplicationContext
java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate....原创 2019-12-18 18:54:13 · 252 阅读 · 0 评论 -
Mybatis:selectKey标签
在学习SSM框架之前的我在做项目的时候,总是在惆怅在多表级联添加的时候,怎么在主表插入完成后获取到其PK的值然后作为第二张表的PK来插入。当时,我只能写成两个方法,做两次的数据库操作,显然这非常的蠢且繁琐,但是当时啥也不会,只能勤劳地打了几十行的代码,就为了实现这么一个操作。学习mybatis,select Key之后……对应的几个必要的参数↓属性名使用方式keyPr...原创 2019-12-16 11:14:39 · 747 阅读 · 0 评论 -
Mybatis:PageHelper插件
本节是pagehelper插件的最小环境配置mybatis最小环境的配置https://blog.csdn.net/qq_36453423/article/details/1035323481.pom.xml<dependency> <groupId>com.github.pagehelper</groupId> <artifactId...原创 2019-12-15 21:12:46 · 216 阅读 · 0 评论 -
Mybatis最小化环境创建
Maven下的Mybatis最小化环境创建总览:mybatis最小化环境的项目结构1.pom.xml引入mybatis的相关依赖库<dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>3.4...原创 2019-12-13 19:50:25 · 152 阅读 · 1 评论 -
SpringMVC:拦截器和handlerExceptionResolver异常处理有冲突
spring.xml<!--拦截器 --><!-- <mvc:interceptors> 多个拦截器,顺序执行 <mvc:interceptor> <mvc:mapping path="/**" /> <bean class="net.dfrz.interceptor.FileInterceptor">&...原创 2019-12-11 23:13:10 · 422 阅读 · 0 评论 -
Spring:异常处理
Spring异常处理配置相当于以前的JSP、servlet如果出错,要跳转到自定义的错误页面。1.spring-mvc.xml配置<bean id="handlerExceptionResolver" class="net.dfrz.exception.MyExceptionResolver"/>2.编写class MyExceptionResolver impleme...原创 2019-12-10 20:28:10 · 134 阅读 · 0 评论 -
druid配置和后台监控
最简单快速的druid配置1.pom.xml 引入依赖包<dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.1.12</version> </dependenc...原创 2019-12-10 09:54:20 · 976 阅读 · 0 评论 -
spring:拦截器
spring配置拦截器1.spring-mvc.xml<!--拦截器 --> <mvc:interceptors> <!-- 多个拦截器,顺序执行 --> <mvc:interceptor> <mvc:mapping path="/**" /> <bean class="net.dfrz.interce...原创 2019-12-10 20:22:01 · 102 阅读 · 0 评论