public String intercept(ActionInvocation invocation) throws Exception {
String result = invocation.invoke();
Map<String, Object> params = invocation.getProxy().getInvocation()
.getInvocationContext().getParameters(); for (Entry<String, Object> e : params.entrySet()) {
System.out.println("key:" + e.getKey());
System.out.println("value:" + e.getValue());
} return result;
}         这是代码
         但是打印出来的是这样的
         key:levelId
value:[Ljava.lang.String;@8fbffc
key:specialId
value:[Ljava.lang.String;@18569e4

解决方案 »

  1.   

    怎么让 打印出来的value 是真实的值呢 高手帮忙! 感谢
      

  2.   

    <script>alert('你好')</script>
      

  3.   

    System.out.println("value:" + e.getValue().toString);
      

  4.   


    这个试过 打印出来是这样
    key:levelId
    value:[Ljava.lang.String;@a3648a
    key:specialId
    value:[Ljava.lang.String;@11dcc76
      

  5.   

    System.out.println("value:" + e.getValue().toString());
      

  6.   

    那你的那个是字符串数字
    你可以先转换成数据对象 然后分别输出来
    String[] value = (String[])e.getValue();
    for(int i=0;i<value.length;i++){
        System.out.println(value[i]);}
      

  7.   

    try this for(Entry<String, String> e: params.entrySet())