`
文章列表
<!-- 配置事务管理器 --> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory"> <ref bean="mySessionFactory"/> </property
使用Spring 3的@value简化配置文件的读取   Spring 3支持@value注解的方式获取properties文件中的配置值,大简化了读取配置文件的代码。 1、在applicationContext.xml文件中配置properties文件 <bean
  (1) aop 是spring 切面编程, @aspect  在spring-servlet.xml 中配置aop  <beans xmlns="http://www.springframework.org/schema/beans"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"        xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.sp ...
【1】insert 之后 获取id  <insert id="insert" parameterType="com.entity.Geraco" useGeneratedKeys="true" keyProperty="id">   【2】insertByList 多条插入 <insert id="addByList" parameterType="java.util.List"> insert  into user(name)values ...
前几天需要做一个群发message的功能 然后在网上搜了好久,做好之后就想着自己总结一下, 需求就是导入excel 然后解析出excel中内容并显示到页面, 首先是将excel 导入 其实也就是上传到服务器,在截图一中,   然后就是 读取excel  在pom.xml中配置 <artifactId> poi-ooxml </artifactId>  <version>3.9</version>    然后读取     try { InputStream input = new FileInputStream (pat ...
页面为保图片,图片内容为base64编码的String 然后post的时候  后台出现 can not present 首先想到的是参数不匹配 然后对了好久发现没有问题 后来发现可以试文件参数太大  被限制了 然后一查 发现是 tomcat 默认的参数 大小为1M 将maxPostSize="0" 配置 即可解决
在web。xml中有过滤器filter characterEncodingFilter 配置 但在页面ajax get请求的时候 后台接受中文为为乱码 首先是JavaScript encodeURIComponent() 函数 然后后台再解码一下 发现可以获取到中文了 后来 发现问题的所在是 tomcat 中间编码的时候 不是utf-8 需要在tomcat 的serve.xml中 加一个配置 urIEncoding="utf-8" 然后乱码就可以解决了
Global site tag (gtag.js) - Google Analytics