语境
我在 Grails 2.4.4 中有一个使用Spring Security Rest Plugin 1.5.4 for Grails和Spring Security Core 2.0.0的项目,我收到了这个警告:
Warning |
The [getAssociatedToEntities] action in [security.UserController] accepts a parameter of type [java.util.List]. Interface types and abstract class types are not supported as command objects. This parameter will be ignored.
@Secured("hasAnyRole('READ__USER', 'READ__PROFILE')")
^
这是代码...
BuildConfig
//...
compile "org.grails.plugins:spring-security-core:2.0.0"
compile "org.grails.plugins:spring-security-rest:1.5.4"
//...
UserController (警告来自的代码!)
@Secured("hasAnyRole('READ__USER', 'READ__PROFILE')")
def getAssociatedToEntities(List<Long> e, SearchCommand cmd){
//code omitted
}
问题:
我怎样才能摆脱那个警告?提前致谢!