Using velocity split() to split a string into an array doesnt seem to work

前端 未结 5 1766
猫巷女王i
猫巷女王i 2021-01-11 12:17

I HATE velocity and rarely ever use it but sometimes I am called upon at my job to do so. I can never really figure out just how to use it.

I have this



        
5条回答
  •  日久生厌
    2021-01-11 12:56

    ## Splitting by Pipes
    #set($prodId = $product.productId)
    #foreach($id in $prodId.split("[|]"))
    $id
    #end
    

提交回复
热议问题