2017-09-07 1 views
1

Rest Service 용 Spring 프레임 워크를 사용하고 있습니다. @PathVariable ID가있는 하나의 Rest API가 있습니다. 하지만 Proguard 난독 화 후에는 'id'매개 변수가 'parama'와 같이 변경되어 REST가 @RequestMapping의 정의와 일치하지 않기 때문에 작동하지 않게됩니다. 매개 변수 이름을 유지하기 위해 어떻게 해결할 수 있습니까? -keepparameternamesProguard가 난독 화 한 후 @PathVariable 매개 변수 이름을 유지하는 방법

@RequestMapping(value = "/{id}", method = RequestMethod.GET) 
public void getAccount(@PathVariable int id) { 
     ... 
} 

답변

0

는 "LocalVariableTable"및 공공 도서관 방법 "LocalVariableTypeTable"속성의 매개 변수 이름을 유지합니다.

-keepparameternames 
-keepattributes SourceFile,LineNumberTable,*Annotation* 
-keepclasseswithmembers class test.rest.controller.* { 
    public <methods>; 
} 
: 여기

내 난독 구성입니다
관련 문제