В основном я думал, что смогу получить xsd-файл Spring XML,
затем получите класс bean-компонента с помощью xjc и используйте jaxb для анализа Spring XML.
Но когда я сделал ниже, cmd получил ошибку:
C:\Users\lz46054.NAM\Software\jaxb-ri-2.3.0\jaxb-ri\bin>**xjc -d C:\Users\lz46054.
NAM\Software\jaxb-ri-2.3.0\jaxb-ri\bin -p com.spring.bean spring-beans-2.0.xsd**
*parsing a schema...
[ERROR] Property "Ref" is already defined. Use <jaxb:property> to resolve thi
s conflict.
line 554 of file:/C:/Users/lz46054.NAM/Software/jaxb-ri-2.3.0/jaxb-ri/bin/spri
ng-beans-2.0.xsd
[ERROR] The following location is relevant to the above error
line 583 of file:/C:/Users/lz46054.NAM/Software/jaxb-ri-2.3.0/jaxb-ri/bin/spri
ng-beans-2.0.xsd
[ERROR] Property "Value" is already defined. Use <jaxb:property> to resolve t
his conflict.
line 556 of file:/C:/Users/lz46054.NAM/Software/jaxb-ri-2.3.0/jaxb-ri/bin/spri
ng-beans-2.0.xsd
[ERROR] The following location is relevant to the above error
line 590 of file:/C:/Users/lz46054.NAM/Software/jaxb-ri-2.3.0/jaxb-ri/bin/spri
ng-beans-2.0.xsd
[ERROR] Property "Ref" is already defined. Use <jaxb:property> to resolve thi
s conflict.
line 922 of file:/C:/Users/lz46054.NAM/Software/jaxb-ri-2.3.0/jaxb-ri/bin/spri
ng-beans-2.0.xsd
[ERROR] The following location is relevant to the above error
line 940 of file:/C:/Users/lz46054.NAM/Software/jaxb-ri-2.3.0/jaxb-ri/bin/spri
ng-beans-2.0.xsd
[ERROR] Property "Value" is already defined. Use <jaxb:property> to resolve t
his conflict.
line 924 of file:/C:/Users/lz46054.NAM/Software/jaxb-ri-2.3.0/jaxb-ri/bin/spri
ng-beans-2.0.xsd
[ERROR] The following location is relevant to the above error
line 947 of file:/C:/Users/lz46054.NAM/Software/jaxb-ri-2.3.0/jaxb-ri/bin/spri
ng-beans-2.0.xsd
[ERROR] Property "Key" is already defined. Use <jaxb:property> to resolve thi
s conflict.
line 1019 of file:/C:/Users/lz46054.NAM/Software/jaxb-ri-2.3.0/jaxb-ri/bin/spr
ing-beans-2.0.xsd
[ERROR] The following location is relevant to the above error
line 1022 of file:/C:/Users/lz46054.NAM/Software/jaxb-ri-2.3.0/jaxb-ri/bin/spr
ing-beans-2.0.xsd
Failed to parse a schema.*
Как исправить вышеуказанную проблему? И Spring уже предоставил API для чтения файла конфигурации? (Без загрузки реального класса)