UriComponentsBuilder查询param和fragment

时间:2015-09-23 09:10:25

标签: spring relative-path url-encoding query-parameters

我想使用弹簧库UriComponentsBuilder生成以下路径:' / app#/ fragment1?test = toto'

到目前为止我尝试过:

UriComponentsBuilder ucb = UriComponentsBuilder.fromPath("/app").fragment("fragment1").queryParam("test","toto");

ucb.toUriString(); // -> gives me as result : '/app?test=toto#/fragment1'

知道如何以优雅的方式实现这一目标吗?

1 个答案:

答案 0 :(得分:1)

我会做一些像:

find . -type d -execdir bash -c '[ "$(find {} -mindepth 1 -type d)" ] || echo $PWD/{}' \;