<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                在Guns中,枚舉一般分兩類,一種是狀態枚舉,一種是異常枚舉,`狀態枚舉`的作用是枚舉狀態,列出狀態的所有值,例如 ``` /** * 菜單的狀態 * * @author fengshuonan * @Date 2017年1月22日 下午12:14:59 */ public enum MenuStatus { ENABLE(1, "啟用"), DISABLE(0, "禁用"); int code; String message; MenuStatus(int code, String message) { this.code = code; this.message = message; } ... } ``` `異常枚舉`的作用是枚舉所有出現的業務異常,例如, ``` /** * 所有業務異常的枚舉 * * @author fengshuonan * @date 2016年11月12日 下午5:04:51 */ public enum BizExceptionEnum implements ServiceExceptionEnum{ /** * 錯誤的請求 */ SESSION_TIMEOUT(400, "會話超時"), SERVER_ERROR(500, "服務器異常"); BizExceptionEnum(int code, String message) { this.code = code; this.message = message; } private Integer code; private String message; ... } ``` 使用枚舉可以方便維護一些狀態的值和管理所有的業務異常,所以在有`狀態`或者新的`業務異常`的時候推薦寫到枚舉里
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看