Going back to snapshots

This commit is contained in:
buildmaster
2019-06-20 21:26:50 +00:00
parent cc0b3341a5
commit 0a4e7b5d7b
19 changed files with 34 additions and 36 deletions

View File

@@ -122,7 +122,8 @@ public class TraceWebAutoConfiguration {
String basePath = webEndpointProperties.getBasePath();
String pattern = endpoints.stream().map(PathMappedEndpoint::getRootPath)
.map(path -> path + "|" + path + "/.*")
.collect(Collectors.joining("|", getPathPrefix(contextPath, basePath),
.collect(Collectors.joining("|",
getPathPrefix(contextPath, basePath),
getPathSuffix(contextPath, basePath)));
if (StringUtils.hasText(pattern)) {
return Optional.of(Pattern.compile(pattern));
@@ -148,8 +149,9 @@ public class TraceWebAutoConfiguration {
private static String getPathSuffix(String contextPath, String actuatorBasePath) {
String result = ")";
if (StringUtils.hasText(contextPath) || (StringUtils.hasText(actuatorBasePath)
&& !"/".equals(actuatorBasePath))) {
if (StringUtils.hasText(contextPath) ||
(StringUtils.hasText(actuatorBasePath)
&& !"/".equals(actuatorBasePath))) {
result += ")?";
}
return result;

View File

@@ -181,8 +181,7 @@ public class SkipPatternProviderConfigTest {
.skipPattern();
then(pattern).isNotEmpty();
then(pattern.get().pattern())
.isEqualTo("foo(/|/(info|info/.*|health|health/.*))?");
then(pattern.get().pattern()).isEqualTo("foo(/|/(info|info/.*|health|health/.*))?");
}
@Test