本文整理汇总了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);
}
};
}
开发者ID:reshmik,项目名称:Zipkin,代码行数:13,代码来源:TraceWebAutoConfiguration.java
示例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);
}
开发者ID:reshmik,项目名称:Zipkin,代码行数:16,代码来源:TraceWebAutoConfiguration.java
示例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.*");
}
开发者ID:reshmik,项目名称:Zipkin,代码行数:9,代码来源:SkipPatternProviderConfigTest.java
示例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);
}
开发者ID:reshmik,项目名称:Zipkin,代码行数:9,代码来源:SkipPatternProviderConfigTest.java
示例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;
}
开发者ID:wayshall,项目名称:onetwo,代码行数:17,代码来源:ActuatorContextConfig.java
示例6: defaultSkipPatternBeanIfManagementServerPropsArePresent
import org.springframework.boot.actuate.autoconfigure.ManagementServerProperties; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean(ManagementServerProperties.class)
public SkipPatternProvider defaultSkipPatternBeanIfManagementServerPropsArePresent() {
return defaultSkipPatternProvider(this.skipPattern);
}
开发者ID:reshmik,项目名称:Zipkin,代码行数:6,代码来源:TraceWebAutoConfiguration.java
示例7: managementServerPropertiesWithContextPath
import org.springframework.boot.actuate.autoconfigure.ManagementServerProperties; //导入依赖的package包/类
private ManagementServerProperties managementServerPropertiesWithContextPath() {
ManagementServerProperties managementServerProperties = new ManagementServerProperties();
managementServerProperties.setContextPath("/management/context");
return managementServerProperties;
}
开发者ID:reshmik,项目名称:Zipkin,代码行数:6,代码来源:SkipPatternProviderConfigTest.java
注:本文中的org.springframework.boot.actuate.autoconfigure.ManagementServerProperties类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论