如何从messages.properties中获取域的label属性。例如,我有一个域名如下
class Books{
String name
String author
String description
String rating
}
在message.properties中,我有以下
Books.name.label=Title
Books.author.label=Author
Books.description.label=Description
Books.rating.label=Rating
我可以做一些像
这样的事情def fieldName = Books.name.label
获得'标题'?有没有办法做到这一点?