@NacosValue This annotation reads the content of the configuration file, and has a lower priority than the yaml file in the springboot project. Is this involved?
Because I want to set the default value for the environment variable, but I don't want to set it in this way:
@NacosValue(value = "${xyzs:abcd}") Is there a better way to use colon splicing? Wait online...
@NacosValue 该注解读取配置文件内容,优先级低于 springboot 项目中的 yaml 文件,是设计如此吗?
因为我要给环境变量设置默认值,但是不想使用这样的方式设置:
@NacosValue(value = "${xyzs:abcd}") 使用冒号拼接,有更好的方式吗?线上等…………
你使用的是那个依赖
你使用的是那个依赖
使用的是
compile group: 'com.alibaba.boot', name: 'nacos-config-spring-boot-starter', version: '0.2.7'
Most helpful comment
自行这里的文档看一下:https://github.com/nacos-group/nacos-spring-boot-project/wiki/spring-boot-0.2.2-%E4%BB%A5%E5%8F%8A-0.1.2%E7%89%88%E6%9C%AC%E6%96%B0%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8%E6%89%8B%E5%86%8C