You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/09/08 15:32:39 UTC

[GitHub] [servicecomb-java-chassis] wujimin commented on issue #2556: path的参数解析

wujimin commented on issue #2556:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2556#issuecomment-915344237


   正确的方式是通过collectionFormat声明格式  
   spring的处理是有歧义的,需要是一个数组,那么传递来了`q=a,b,c`,实际应该是一个数组有三个元素,还是一个数组有一个元素呢?  
   只有声明collectionFormat 为csv,才是明确表示一个数组有三个元素
   如果collectionFormat 为multi,这是表示一个数组有一个元素,此时想要表示一个数组有三个元素,应该传递`q=a&q=b&q=c`
   
   扩展机制参考:org.apache.servicecomb.common.rest.codec.query.QueryCodecCsv


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org