本文整理汇总了Java中org.springframework.boot.actuate.autoconfigure.ManagementServerProperties类的典型用法代码示例。如果您正苦于以下问题:Java ManagementServerProperties类的具体用法?Java ManagementServerProperties怎么用?Java ManagementServerProperties使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ManagementServerProperties类属于org.springframework.boot.actuate.autoconfigure包,在下文中一共展示了ManagementServerProperties类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: skipPatternForManagementServerProperties
import org.springframework.boot.actuate.autoconfigure.ManagementServerProperties; //导入依赖的package包/类
@Bean
@ConditionalOnBean(ManagementServerProperties.class)
public SkipPatternProvider skipPatternForManagementServerProperties(
final ManagementServerProperties managementServerProperties) {
return new SkipPatternProvider() {
@Override
public Pattern skipPattern() {
return getPatternForManagementServerProperties(
managementServerProperties, SkipPatternProviderConfig.this.skipPattern);
}
};
}
示例2: getPatternForManagementServerProperties
import org.springframework.boot.actuate.autoconfigure.ManagementServerProperties; //导入依赖的package包/类
/**
* Sets or appends {@link ManagementServerProperties#getContextPath()} to the
* skip pattern. If neither is available then sets the default one
*/
static Pattern getPatternForManagementServerProperties(
ManagementServerProperties managementServerProperties, String skipPattern) {
if (StringUtils.hasText(skipPattern) &&
StringUtils.hasText(managementServerProperties.getContextPath())) {
return Pattern.compile(skipPattern + "|" +
managementServerProperties.getContextPath() + ".*");
} else if (StringUtils.hasText(managementServerProperties.getContextPath())) {
return Pattern.compile(managementServerProperties.getContextPath() + ".*");
}
return defaultSkipPattern(skipPattern);
}
示例3: should_pick_skip_pattern_when_its_not_empty_and_management_context_is_empty
import org.springframework.boot.actuate.autoconfigure.ManagementServerProperties; //导入依赖的package包/类
@Test
public void should_pick_skip_pattern_when_its_not_empty_and_management_context_is_empty() throws Exception {
String skipPattern = "foo.*|bar.*";
Pattern pattern = SkipPatternProviderConfig.getPatternForManagementServerProperties(new ManagementServerProperties(), skipPattern);
then(pattern.pattern()).isEqualTo("foo.*|bar.*");
}
示例4: should_pick_default_pattern_when_both_management_context_and_skip_patterns_are_empty
import org.springframework.boot.actuate.autoconfigure.ManagementServerProperties; //导入依赖的package包/类
@Test
public void should_pick_default_pattern_when_both_management_context_and_skip_patterns_are_empty() throws Exception {
String skipPattern = "";
Pattern pattern = SkipPatternProviderConfig.getPatternForManagementServerProperties(new ManagementServerProperties(), skipPattern);
then(pattern.pattern()).isEqualTo(TraceFilter.DEFAULT_SKIP_PATTERN);
}
示例5: postProcessAfterInitialization
import org.springframework.boot.actuate.autoconfigure.ManagementServerProperties; //导入依赖的package包/类
/***
* 修改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;
}
示例6: defaultSkipPatternBeanIfManagementServerPropsArePresent
import org.springframework.boot.actuate.autoconfigure.ManagementServerProperties; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean(ManagementServerProperties.class)
public SkipPatternProvider defaultSkipPatternBeanIfManagementServerPropsArePresent() {
return defaultSkipPatternProvider(this.skipPattern);
}
示例7: managementServerPropertiesWithContextPath
import org.springframework.boot.actuate.autoconfigure.ManagementServerProperties; //导入依赖的package包/类
private ManagementServerProperties managementServerPropertiesWithContextPath() {
ManagementServerProperties managementServerProperties = new ManagementServerProperties();
managementServerProperties.setContextPath("/management/context");
return managementServerProperties;
}