Skip to content

Instantly share code, notes, and snippets.

@xcaspar
Created July 21, 2015 08:18
Show Gist options
  • Save xcaspar/255176fa319e97f35587 to your computer and use it in GitHub Desktop.
Save xcaspar/255176fa319e97f35587 to your computer and use it in GitHub Desktop.

遇到的问题

####1. MAVEN更新依赖包问题 在包版本号相同且你本地已经有相应的jar包,此时clean install自己的工程是不会更新已有且版本号相同的jar的,应添加强制更新参数: clean install –U

####2. Hessian使用BigDecimal问题** 使用hessian远程调用对象时,如果对象中包含BigDecimal属性,则得到的值会是0。解决方法:
在 hessian.jar 的 META-INF/hessian 目录下加入 serializers 和 deserializers 这两个文件, 两个文件的内容分别如下: java.math.BigDecimal=com.caucho.hessian.io.StringValueSerializer
java.math.BigDecimal=com.caucho.hessian.io.BigDecimalDeserializer

####3. 报Spring-asm类异常问题 由于项目使用的是spring-core使用的是3.2版本,spring官方表示如果使用3.2及3.2以上的spring版本,无需再引用spring-asm包

####4. Springmvc redirect跳转传值问题 需求是:在一个RequestMapping业务逻辑处理中,想在报错的时候重定向到一个订单详情页,同时往前台传错误编码,前台根据错误编码来显示错误信息。尝试将参数放到model、redirectAttribute里,结果跳转的url都添加了此错误编码参数,这并不是想要的。目前的解决方法是放到session里,从session中获取。SpringMVC的redirect方法都是以get请求进行url访问的,所以你添加的参数都会添加到url里。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment