我终于解决了。我在控制器中添加了一个新方法:
public String getName() { String nome_classe = entityClass.getSimpleName(); System.out.println("getName nome_class = "+nome_classe); return nome_classe;}现在我以这种方式使用注释:
@PreAuthorize("hasPermission(#user, 'cadastra_'+#this.this.name)")


