1
어쨌든 가변 길이 경로를 원하는 저지를 지정해야합니까?자바 저지 가변 길이 경로
저는 예를 들어 다음을 처리하는 저지 자원을 구현하고 싶습니다. 다음 URL :이 이미지 예컨대 :
/images/asdfu213/size;width=100;height=200/reflect;offset=2/rotate;angle=0.45/shear;x=0.3/
에 다른 작업을 추가 할 수있는 사용자로 가변 길이 경로가 저지에 어쨌든입니다
/images/asdfu213/size;width=100;height=200/reflect;offset=2/rotate;angle=0.45/
이를 구현하는 방법?
나는 시도했다 :
@Path("/{id}/{size}/{ops: .*}")
Response process(@PathParam("id)String id, @PathParam("size") PathSegment sizeSegment, @PathParam("op") PathSegment opsSegments)
하지만 모든 매트릭스 PARAMS는 스트라이프되며, 경로가 보존되어 있지만 opsSegments.getPath는
도
@Path("/{id}/{size}/{ops: .*}")
Response process(@PathParam("id")String id, @PathParam("size") PathSegment sizeSegment, @PathParam("op") String opsSegments)
을 시도 비어있는 모든 매트릭스 매개 변수가 벗겨졌습니다
도움이 될 것입니다.
process(@PathParam("ops") List<PathSegment> ops)
와 저지가 당신을 위해 처리 할 수있을만큼 똑똑하다 :