
ssm
LemonSnm
心中有梦,生活无暇
展开
-
Request processing failed; nested exception is org.springframework.transaction.CannotCreate.......
Type Exception ReportMessage Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested ...原创 2018-12-31 23:03:49 · 13341 阅读 · 16 评论 -
SSM整合的 一个简单的贴吧项目
1、新建一个maven工程和数据库1.1maven web工程:1.2数据库:帖子表: 评论表: 2、新建相关工程目录: 3.在pom.xml中放入相关依赖包 <!-- https://mvnrepository.com/artifact/org.springframework/spring-core --> ...原创 2019-01-05 22:22:42 · 2263 阅读 · 5 评论 -
jsp接受不到controller数据
jsp接收不到controller数据: 错误:在jsp文件中加入:<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %> 正常输出: isELIgnored属性用来指定是否忽略。格式为: <%@ page isELIgnored="...原创 2019-01-06 21:45:48 · 760 阅读 · 0 评论 -
jsp网页中c:forEach 的 varStatus属性用法
标签库中c:forEach 的 varStatus属性:jsp中常常使用<c:forEach>标签来遍历需要的数据,为了更方便使用,varStatus属性可以方便我们实现一些与行数相关的功能,如:奇数行、偶数行差异;最后一行特殊处理等。varStatus属性常用参数如下:current:当前这次迭代的(集合中的)项index:当前这次迭代从 0 开始的迭代计数co...原创 2019-01-24 12:46:24 · 6870 阅读 · 2 评论 -
MyBatis 分页插件 PageHelper的用法
MyBatis 分页插件 PageHelper:前期搭建好一个ssm项目: 略1. 引入分页插件1.1你可以从下面的地址中下载最新版本的 jar 包:(2选1+1)https://oss.sonatype.org/content/repositories/releases/com/github/pagehelper/pagehelper/http://repo1.mave...原创 2019-01-24 20:25:04 · 382 阅读 · 0 评论 -
jsp页面 中文传值 request接收乱码导入数据库乱码
jsp: <input type="text" name="username" class="form-control" id="input_username" value="${user_name}">controller: user.setUsername(new String(request.getParameter("username"原创 2019-01-21 23:13:17 · 225 阅读 · 0 评论 -
@Autowired和@Resource的区别
@Autowired:@Autowired默认按类型装配(这个注解是属业spring的),默认情况下必须要求依赖对象必须存在,如果要允许null值,可以设置它的required属性为false,如:@Autowired(required=false) ,如果我们想使用名称装配可以结合@Qualifier注解进行使用。@Resource :@Resource 是JDK1.6支持的...原创 2019-01-22 15:25:16 · 133 阅读 · 0 评论 -
SpringMVC前端传来数据Controller的 getParament接受不到JSON传来的数据
问题:SSM前端数据接受正常 ajax报错:Unrecognized field xxx , not marked as ignorable分析:这种情况是因为使用jackson进行json转换时,MappingJacksonHttpMessageConverter默认要求必须存在相应的字段。如果没有传来的某个字段或者字段没有提供set方法,就会报错、或者接受不到数据,...原创 2019-03-13 12:31:38 · 492 阅读 · 0 评论 -
Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named '
ssm分页查询出现错误:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'shopCondition' in 'class com.lemo...原创 2019-05-26 16:10:06 · 562 阅读 · 0 评论