久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

jaxb 不生成具有基本整數的枚舉

jaxb doesn#39;t generate enums with base integer(jaxb 不生成具有基本整數的枚舉)
本文介紹了jaxb 不生成具有基本整數的枚舉的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我有以下 xsd:

<xs:simpleType name="resultcode">
    <xs:restriction base="xs:integer">
        <xs:enumeration value="0" id="Approved_no_error">
            <xs:annotation>
                <xs:appinfo>
                    <jxb:typesafeEnumMember name="Approved_no_error"/>
                </xs:appinfo>
            </xs:annotation>
        </xs:enumeration>

JAX-B 什么都不做,沒有錯誤,沒有警告,只是不會生成這個類.如果將基數從 xs:integer 更改為 xs:string 就可以了.但我需要的正是整數值.

JAX-B just does nothing, no errors, no warnings just doesn't generate this class. If change base from xs:integer to xs:string then it's ok. But I need exactly integer values.

我用 maven 生成類:

I generate classes with maven:

<groupId>org.codehaus.mojo</groupId>
    <artifactId>jaxb2-maven-plugin</artifactId>
    <version>1.3</version>
    <executions>
        <execution>
            <id>AuthGateway</id>
            <goals>
                <goal>xjc</goal>
            </goals>

問題 2.JAX-B 和 IDE (IDEA) 不允許在 id 屬性中使用空格.為什么?

And question 2. JAX-B and IDE (IDEA) doesn't allow whitespaces in id attrribute. Why?

<xs:enumeration value="0" id="Approved_no_error"> - 好的
<xs:enumeration value="0" id="Approved no error"> - 不行

這是正確的行為嗎?

推薦答案

您可以使用外部綁定文件來獲取您正在尋找的行為:

You can use an external binding file to get the behaviour that you are looking for:

  • 帶數值的JAXB枚舉
  • http://blog.bdoughan.com/2011/08/jaxb-and-enums.html

這篇關于jaxb 不生成具有基本整數的枚舉的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How to wrap text around components in a JTextPane?(如何在 JTextPane 中的組件周圍環繞文本?)
MyBatis, how to get the auto generated key of an insert? [MySql](MyBatis,如何獲取插入的自動生成密鑰?[MySql])
Inserting to Oracle Nested Table in Java(在 Java 中插入 Oracle 嵌套表)
Java: How to insert CLOB into oracle database(Java:如何將 CLOB 插入 oracle 數據庫)
Why does Spring-data-jdbc not save my Car object?(為什么 Spring-data-jdbc 不保存我的 Car 對象?)
Use threading to process file chunk by chunk(使用線程逐塊處理文件)
主站蜘蛛池模板: 精品欧美乱码久久久久久 | 日韩电影免费在线观看中文字幕 | 久久亚洲91 | 黄色一级免费 | 精品一区二区视频 | 亚洲网址| 亚洲人成人一区二区在线观看 | 国产欧美视频一区二区 | 久久精品国产久精国产 | h片在线看 | 国产xxxx在线 | 国产免费让你躁在线视频 | 91久久久久久久 | 国产精品久久久久久久久久了 | 国产在线一区观看 | 免费精品 | 中文字幕视频三区 | 欧美成人久久 | 狠狠爱免费视频 | 中文字幕视频在线观看 | 精品免费视频 | 9999国产精品欧美久久久久久 | 91精品国产综合久久精品 | 伊人超碰 | 欧美成年人视频在线观看 | 久久中文字幕一区 | 欧美日韩久久精品 | 欧美一区二区激情三区 | 日韩免费av网站 | 欧美成人黄色小说 | 欧美久久影院 | 亚洲一区中文字幕 | 欧美日韩最新 | 51ⅴ精品国产91久久久久久 | 久久精品一级 | 久久91精品国产一区二区三区 | 精品国产精品三级精品av网址 | 国产高清美女一级a毛片久久w | 一道本视频 | 欧美一级免费看 | 亚洲精品一区二区三区在线观看 |