diff --git a/api/src/main/java/com/alibaba/nacos/api/config/ConfigType.java b/api/src/main/java/com/alibaba/nacos/api/config/ConfigType.java index d70e2a98d8f..cab303b3598 100644 --- a/api/src/main/java/com/alibaba/nacos/api/config/ConfigType.java +++ b/api/src/main/java/com/alibaba/nacos/api/config/ConfigType.java @@ -53,7 +53,12 @@ public enum ConfigType { /** * config type is "yaml". */ - YAML("yaml"); + YAML("yaml"), + + /** + * not a real type. + */ + UNSET("unset"); String type; diff --git a/api/src/main/java/com/alibaba/nacos/api/config/annotation/NacosConfigListener.java b/api/src/main/java/com/alibaba/nacos/api/config/annotation/NacosConfigListener.java index 0025557394a..810833d5928 100644 --- a/api/src/main/java/com/alibaba/nacos/api/config/annotation/NacosConfigListener.java +++ b/api/src/main/java/com/alibaba/nacos/api/config/annotation/NacosConfigListener.java @@ -57,9 +57,9 @@ /** * Nacos Config type. * - * @return "properties" + * @return default value is {@link ConfigType#UNSET} */ - ConfigType type() default ConfigType.PROPERTIES; + ConfigType type() default ConfigType.UNSET; /** * Specify {@link NacosConfigConverter Nacos configuraion convertor} class to convert target type instance. diff --git a/api/src/main/java/com/alibaba/nacos/api/config/annotation/NacosConfigurationProperties.java b/api/src/main/java/com/alibaba/nacos/api/config/annotation/NacosConfigurationProperties.java index 37b6507be89..0e6bc518daa 100644 --- a/api/src/main/java/com/alibaba/nacos/api/config/annotation/NacosConfigurationProperties.java +++ b/api/src/main/java/com/alibaba/nacos/api/config/annotation/NacosConfigurationProperties.java @@ -72,9 +72,9 @@ /** * config style. * - * @return default value is {@link ConfigType#PROPERTIES} + * @return default value is {@link ConfigType#UNSET} */ - ConfigType type() default ConfigType.PROPERTIES; + ConfigType type() default ConfigType.UNSET; /** * It indicates the properties of current doBind bean is auto-refreshed when Nacos configuration is changed.