RestfulToolkit icon indicating copy to clipboard operation
RestfulToolkit copied to clipboard

url中有静态常量时,解析出的url不正确

Open JoeyLearnsToCode opened this issue 6 years ago • 0 comments

前提:有一个controller类有注解@RequestMapping(WebConsts.PREFIX),其中PREFIX是在WebConsts类中定义的常量,值为/api。 问题:这个controller类中的接口方法解析后得出的url并不是预期的/api/foobar,而是/WebConsts.PREFIX/foobar。也就是说在解析url时,并没有对其中的静态常量进行取值,而是直接使用其引用名。

JoeyLearnsToCode avatar Jan 12 '19 06:01 JoeyLearnsToCode