2010-09-20 44 views
1

http://download.oracle.com/javase/6/docs/api/javax/xml/bind/annotation/XmlSeeAlso.html@XmlSeeAlso有一個以上的參數

根據這一點,我應該能夠使我的根元素有一個以上的類的引用。然而,當我嘗試,我得到這個例外:

[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 

這是一個常規問題,或Java問題?

回答

2

想出來 - 如果你想在註解中使用多個元素,你必須使用groovy符號 - 將封閉類更改爲[]而不是{}修復問題