当前位置: 代码迷 >> J2EE >> spring整合struts2注解方式result有关问题
  详细解决方案

spring整合struts2注解方式result有关问题

热度:90   发布时间:2016-04-21 23:02:46.0
spring整合struts2注解方式result问题
用配置文件的时候是这样写的
<result type="json">
      <param name="contentType">text/html</param>
      <param name="root">msg</param>
     </result>

可是用注解方式之后这个param怎么写呢?org.apache.struts2.convention.annotation这个包下没有Param这个类,注解没法写param啊,有什么解决方法呢?
Spring Struts JSON

------解决方案--------------------
给个例子:

@Action(value="showSmallImg", results={@Result(name="smallImg", type="stream", params={"contentType","image/jpeg","inputName","${smallImg}","bufferSize","1024"})})
  相关解决方案