我刚刚将@Cacheable(value = "testCaching", key = "#id")
添加到@RestController
中的方法中,如下所示:
@Cacheable(value = "testCaching", key = "#id")
public Book getCachedMsg(@PathVariable("id") final int id, final HttpServletResponse response)
并收到以下错误:
java.lang.IllegalArgumentException: Name for argument type [int] not available, and parameter name information not found in class file either.
有人知道原因吗?
答案 0 :(得分:0)
试试这个:
ctx.addAttributeValue("member", userDn.toString());