下面列出了org.springframework.boot.actuate.autoconfigure.ManagementServerProperties 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/***
* 修改actuator的默认contextPath
*/
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
if(bean instanceof ManagementServerProperties){
/*ManagementServerProperties props = (ManagementServerProperties) bean;
if(StringUtils.isBlank(props.getContextPath())){
props.setContextPath(BootWebUtils.CONTROLLER_PREFIX+"/management");
}*/
/*if(props.getAddress()==null){
props.setAddress(NetUtils.getInetAddress("127.0.0.1", null));
}*/
}
return bean;
}