下面列出了怎么用org.springframework.boot.actuate.autoconfigure.ManagementServerProperties的API类实例代码及写法,或者点击链接到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;
}