![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ssm
凌冰_
分享知识带给我的快乐!帮助他人就是帮助自己。
希望更多人能关注,来分享我的成果!
希望大家快快乐乐的学习,开开心心的畅游知识的海洋。
展开
-
ssm 分页参数较多时,应如何在页面处理
代码如下:<a href="/userinfo/all?pageCurrent=1&username=${userinfo.username}&useraddress=${userinfo.useraddress}&typeid=${userinfo.typeid}">首页</a>修改如下: <%--条件参数--%> <c:set var="str"> &username=${userinfo.u原创 2020-12-20 15:23:15 · 118 阅读 · 1 评论 -
ssm 下拉列表框的值在mybatis中如何判断
<select name="typeid"> <option value="">--请选择类型--</option> <option value="1" ${userinfo.typeid==1?"selected":""} >管理员</option> <option value="2" ${userinfo.typeid=..原创 2020-12-20 15:06:29 · 313 阅读 · 0 评论 -
SSM 使用PageHelper插件实现有条件的分页(二)
一、分页效果:(1)查询所有的数据(2) 单个条件查询(3) 2个条件查询(4) 3个条件查询(5) 3个条件查询二、具体步骤: 1)在 pom.xml文件中添加依赖包 <!--mybatis处理分页的包--> <dependency> <g...原创 2020-04-18 18:16:52 · 612 阅读 · 0 评论 -
SSM 使用 lombok 中的@Data注解
在使用这个@Data注解:(1) 在pom.xml文件添加依赖包 <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.10</v...原创 2020-04-17 17:53:29 · 1248 阅读 · 0 评论 -
SSM 使用PageHelper插件实现分页 (一)
一、在pom.xml文件中添加PageHelper依赖 <!--分页的依赖包--> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <...原创 2020-04-14 21:14:31 · 457 阅读 · 0 评论 -
SSM 运行时发生异常: Optional int parameter 'id' is present
异常:java.lang.IllegalStateException: Optional int parameter 'id' is present but cannot be translated into a null value due to being declared as a primitive type. Consider declaring it as object wrappe...原创 2020-04-12 17:56:28 · 3304 阅读 · 0 评论 -
SSM 运行时发生异常:Could not load properties
原因:没有找到这个文件,查看spring-mybatis.xml中: <!-- 引入属性db文件 --> <context:property-placeholder location="classpath:database.properties"/>解决:修改classpath 为 classpath* <!-- 引入属...原创 2020-04-12 16:57:10 · 1548 阅读 · 0 评论 -
SSM druid连接数据库发生异常:com.alibaba.druid.pool.DruidDataSource error
分析:Access denied for user '44401'@'localhost' (using password: YES),这里Mysql连接的用户名为电脑的系统名,不是数据库中的用户名root原因:在Spring完成注入时是用"${..}"方式获取值完成注入的。而通过这种表达式也能直接获取到JVM系统属性。 因为在系统中也有个username属性,这...原创 2020-04-12 16:39:58 · 2617 阅读 · 2 评论 -
SSM 运行时发生异常:UnsatisfiedDependencyException
原因:(1) 注解或者是扫描路径有错误导致依赖关系 (2) 在web.xml文件中没有配置“读取Spring上下文的监听器<!-- 读取Spring上下文的监听器 --> <listener> <listener-class>org.springframework.web.context.ContextLoad...原创 2020-04-12 16:48:43 · 927 阅读 · 2 评论 -
spring+springmvc+mybatis 整合
第一步: MyBatis和Spring整合,通过Spring管理mapper接口。 使用mapper的扫描器自动扫描mapper接口在Spring中进行注册。第二步: 通过Spring管理Service接口。 使用配置方式将Service接口配置在Spring配置文件中。 实现事务控制。第三步: 由于SpringMVC是S原创 2018-03-03 15:54:25 · 163 阅读 · 0 评论 -
Spring+mybatis+SpringMVC整合发生异常:org.springframework.beans.ConversionNotSupportedException
错误:Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.apache.ibatis.session.defaults.DefaultSqlSessionFactory' to required type 'Ja原创 2017-08-28 16:06:13 · 1333 阅读 · 0 评论 -
SSM 框架集成redis
1.添加maven依赖:(注意:spring-data-redis包的版本要与spring的版本一致哦!) org.springframework.data spring-data-redis 1.8.4.RELEASE redis.clients jedis 2.9.0 2.redis.properties 配原创 2018-03-09 16:33:06 · 233 阅读 · 0 评论 -
SSM 运行时发生异常:org.springframework.beans.ConversionNotSupportedException:
Caused by: java.lang.IllegalStateException: Cannot convert value of type [com.sun.proxy.$Proxy15 implementing com.dmm.service.UserService,org.springframework.beans.factory.InitializingBean,org.spring原创 2017-10-11 10:55:04 · 689 阅读 · 0 评论 -
Maven+Spring+SpringMVC+MyBatis+MySQL 整合SSM框架
一、Mysql数据库 (书表,种类表 多对多的关系)CREATE TABLE `book` ( `bid` int(11) NOT NULL AUTO_INCREMENT, `bname` varchar(20) DEFAULT NULL, PRIMARY KEY (`bid`)) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=u原创 2017-10-10 11:08:58 · 739 阅读 · 0 评论 -
SSM 运行发生异常java.lang.IncompatibleClassChangeError
java.lang.IncompatibleClassChangeError: class org.springframework.core.type.classreading.ClassMetadataReadingVisitor has interface org.springframework.asm.ClassVisitor as super class原因:因为引原创 2017-10-10 10:30:33 · 301 阅读 · 0 评论 -
SSM 整合发生异常:Error creating bean with name 'itemsController': Injection of resource dependencies fail
运行SSM工程发生异常:Error creating bean with name 'itemsController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qua原创 2017-09-07 16:41:43 · 1324 阅读 · 0 评论