开发者

@XmlSeeAlso with more than one parameter

开发者 https://www.devze.com 2023-01-17 09:16 出处:网络
http://download.oracle.com/javase/6/docs/api/javax/xml/bind/annotation/XmlSeeAlso.html According to this, I should be able to make my root element have more than one class reference. However, when I

http://download.oracle.com/javase/6/docs/api/javax/xml/bind/annotation/XmlSeeAlso.html

According to this, I should be able to make my root element have more than one class reference. However, when I try that, I get this exc开发者_运维问答eption:

[groovyc] Compiling 72 source files to C:\Users\dcole\.grails\1.3.4\projects\trunk\classes
[groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
[groovyc] C:\dev\trunk\grails-app\domain\skillsdb\Employee.groovy: 13: unexpected token: , @ line 13, column 40.
[groovyc]    @XmlSeeAlso({EmployeeDesiredSkill.class, EmployeeDesiredtool.class})
[groovyc]                                           ^
[groovyc]
[groovyc] 1 error
Compilation error: Compilation Failed

Is this a groovy problem, or a java problem?


Figured it out - if you want more than one element in the annotation, you have to use groovy notation for that - changing the class enclosing to a [] instead of {} fixes the problem

0

精彩评论

暂无评论...
验证码 换一张
取 消