001/** 002 * Copyright (c) 2015-2022, Michael Yang 杨福海 (fuhai999@gmail.com). 003 * <p> 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * <p> 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * <p> 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package io.jboot.app.config.support.apollo; 017 018import io.jboot.app.config.JbootConfigKit; 019import io.jboot.app.config.annotation.ConfigModel; 020 021@ConfigModel(prefix = "jboot.config.apollo") 022public class ApolloServerConfig { 023 024 private boolean enable = false; 025 private String meta; 026 private String appId; 027 private String namespace; 028 029 030 public boolean isEnable() { 031 return enable; 032 } 033 034 public void setEnable(boolean enable) { 035 this.enable = enable; 036 } 037 038 public String getAppId() { 039 return appId; 040 } 041 042 public void setAppId(String appId) { 043 this.appId = appId; 044 } 045 046 public String getMeta() { 047 return meta; 048 } 049 050 public void setMeta(String meta) { 051 this.meta = meta; 052 } 053 054 public String getNamespace() { 055 return namespace; 056 } 057 058 public void setNamespace(String namespace) { 059 this.namespace = namespace; 060 } 061 062 public boolean isConfigOk() { 063 return JbootConfigKit.areNotBlank(appId, meta); 064 } 065}