我正在使用cas-overlay-template版本5.3(https://github.com/apereo/cas-overlay-template/tree/5.3)
我要自定义authenticationHandler,
@Configuration("AcceptAuthenticationConfiguration")
@EnableConfigurationProperties(CasConfigurationProperties.class)
public class AcceptAuthenticationConfiguration
implements AuthenticationEventExecutionPlanConfigurer {
private static final org.slf4j.Logger LOGGER = LoggerFactory.getLogger(AcceptAuthenticationConfiguration.class);
@Autowired
private CasConfigurationProperties casProperties;
这是我显示casProperies的值的方式:
@RefreshScope
@Bean
public AuthenticationHandler myAuthenticationHandler() {
LOGGER.debug("Location = ", casProperties.getServiceRegistry().getJson().getLocation());
final CustomAuthenticationHandler handler = new CustomAuthenticationHandler("abc", servicesManager, myAuthenticationPrincipalFactory(), 0);
return handler;
}
这里有个问题:变量 casProperties 不会被 cas.properties 文件中的值所覆盖。
我该怎么办?