Which Component
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-alibaba-nacos-config</artifactId>
<version>2025.1.0.0</version>
</dependency>
spring-alibaba-nacos-config + Spring Boot v4.0.6 (without any Cloud)
Describe what problem you have encountered
Demo Code
@RestController
class UserService {
@Value(value = "${app.enable-cache}")
// @NacosConfig(group = "DEFAULT", dataId = "nacos-demo.yaml", key = "app.enable-cache")
// @NacosValue(value = "${app.enable-cache}", autoRefreshed = true)
private boolean enableCache;
@GetMapping("/info")
String getInfo() {
if (enableCache) {
return "Info for cached";
}
return "Infos";
}
}
@NacosConfig and @Value (None auto-refresh) work normally, but @NacosValue cannot be used.
Describe what information you have read
Initial investigation shows that com.alibaba.cloud.nacos.annotation.NacosAnnotationProcessor only includes listener for @NacosConfig, @NacosConfigListener, and NacosConfigKeysListener, but does not include the @NacosValue annotation.
So, my question is: does the spring-alibaba-nacos-config module not yet support the @NacosValue annotation, or is this annotation simply outside the scope of this module?
Which Component
spring-alibaba-nacos-config + Spring Boot v4.0.6 (without any Cloud)
Describe what problem you have encountered
Demo Code
@NacosConfigand@Value(None auto-refresh) work normally, but@NacosValuecannot be used.Describe what information you have read
Initial investigation shows that
com.alibaba.cloud.nacos.annotation.NacosAnnotationProcessoronly includes listener for@NacosConfig,@NacosConfigListener, andNacosConfigKeysListener, but does not include the@NacosValueannotation.So, my question is: does the
spring-alibaba-nacos-configmodule not yet support the@NacosValueannotation, or is this annotation simply outside the scope of this module?