Closed
Description
i upgrade springboot to 2.0.0.RC2 and use spring-cloud-config to 2.0.0.BUILD-SNAPSHOT
i define InfoConfig
@Data
@ConfigurationProperties(prefix = "test")
public class InfoConfig {
private String info;
}
and i have controller
@RefreshScope
@RestController
@EnableConfigurationProperties(InfoConfig.class)
public class InfoController {
@Autowired
private InfoConfig infoConfig;
@Value("${test.value}")
private String value;
@GetMapping(value = "/info")
public String info() {
return infoConfig.getInfo();
}
@GetMapping(value = "/value")
public String value() {
return value;
}
}
when i call curl -XPOST '127.0.0.1:8081/actuator/refresh'
,
response is ["config.client.version","test.value","test.info"]
i think both change test.value
and test.info
but i request /info
and /value
, i found test.value
is changed, but infoConfig.getInfo()
not change.
and my project is https://github.com/lord-of-code/spring-cloud-not-refresh-bean
this is a bug ? or i use cloud-config mistake in springboot 2 and springcloud 2
in springboot 1.5.x and springcloud 1.x, it seems can both change by /refresh
request.
Activity
ryanjbaxter commentedon Feb 26, 2018
@dragontree101 sounds similar to spring-cloud/spring-cloud-commons#328 (comment). If so you can close this issue and follow the one in spring cloud commons.
dragontree101 commentedon Feb 26, 2018
ok thanks, i will close this issue and follow this problem in spring cloud sommons.