parent
2a0451c461
commit
c8c3f59e93
|
@ -33,17 +33,17 @@ public class AppOpticsProperties extends StepRegistryProperties {
|
||||||
/**
|
/**
|
||||||
* URI to ship metrics to.
|
* URI to ship metrics to.
|
||||||
*/
|
*/
|
||||||
public String uri = "https://api.appoptics.com/v1/measurements";
|
private String uri = "https://api.appoptics.com/v1/measurements";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AppOptics API token.
|
* AppOptics API token.
|
||||||
*/
|
*/
|
||||||
public String apiToken;
|
private String apiToken;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tag that will be mapped to "@host" when shipping metrics to AppOptics.
|
* Tag that will be mapped to "@host" when shipping metrics to AppOptics.
|
||||||
*/
|
*/
|
||||||
public String hostTag = "instance";
|
private String hostTag = "instance";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of measurements per request to use for this backend. If more measurements
|
* Number of measurements per request to use for this backend. If more measurements
|
||||||
|
|
|
@ -58,7 +58,8 @@ public class DiskSpaceHealthIndicatorProperties {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setThreshold(DataSize threshold) {
|
public void setThreshold(DataSize threshold) {
|
||||||
Assert.isTrue(!threshold.isNegative(), "threshold must be greater than 0");
|
Assert.isTrue(!threshold.isNegative(),
|
||||||
|
"threshold must be greater than or equal to 0");
|
||||||
this.threshold = threshold;
|
this.threshold = threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,9 +116,9 @@ public class MvcWebEndpointIntegrationTests extends
|
||||||
assertThat(getMatchResult("/spring.do")).isNull();
|
assertThat(getMatchResult("/spring.do")).isNull();
|
||||||
}
|
}
|
||||||
|
|
||||||
private RequestMatchResult getMatchResult(String s) {
|
private RequestMatchResult getMatchResult(String servletPath) {
|
||||||
MockHttpServletRequest request = new MockHttpServletRequest();
|
MockHttpServletRequest request = new MockHttpServletRequest();
|
||||||
request.setServletPath(s);
|
request.setServletPath(servletPath);
|
||||||
AnnotationConfigServletWebServerApplicationContext context = createApplicationContext();
|
AnnotationConfigServletWebServerApplicationContext context = createApplicationContext();
|
||||||
context.register(TestEndpointConfiguration.class);
|
context.register(TestEndpointConfiguration.class);
|
||||||
context.refresh();
|
context.refresh();
|
||||||
|
|
|
@ -426,12 +426,7 @@ class OnBeanCondition extends FilteringSpringBootCondition
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasAtLeastOne(List<?>... lists) {
|
private boolean hasAtLeastOne(List<?>... lists) {
|
||||||
for (List<?> list : lists) {
|
return Arrays.stream(lists).anyMatch((list) -> !list.isEmpty());
|
||||||
if (!list.isEmpty()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String annotationName() {
|
protected String annotationName() {
|
||||||
|
|
|
@ -36,11 +36,10 @@ import org.springframework.web.context.WebApplicationContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides a {@link BookmarkManager} for Neo4j's bookmark support based on Caffeine if
|
* Provides a {@link BookmarkManager} for Neo4j's bookmark support based on Caffeine if
|
||||||
* available. Depending on the applications kind (web or not) the bookmark manager will be
|
* available. Depending on the application's type (web or not) the bookmark manager will
|
||||||
* bound to the application or the request, as recommend by Spring Data Neo4j.
|
* be bound to the application or the request, as recommend by Spring Data Neo4j.
|
||||||
*
|
*
|
||||||
* @author Michael Simons
|
* @author Michael Simons
|
||||||
* @since 2.1.0
|
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@ConditionalOnClass({ Caffeine.class, CaffeineCacheManager.class })
|
@ConditionalOnClass({ Caffeine.class, CaffeineCacheManager.class })
|
||||||
|
|
|
@ -330,7 +330,7 @@ public class ServerProperties {
|
||||||
private DataSize maxHttpPostSize = DataSize.ofMegabytes(2);
|
private DataSize maxHttpPostSize = DataSize.ofMegabytes(2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maximum size in bytes of the HTTP message header.
|
* Maximum size of the HTTP message header.
|
||||||
*/
|
*/
|
||||||
private DataSize maxHttpHeaderSize = DataSize.ofBytes(0);
|
private DataSize maxHttpHeaderSize = DataSize.ofBytes(0);
|
||||||
|
|
||||||
|
|
|
@ -151,6 +151,7 @@ public class DeferredLog implements Log {
|
||||||
/**
|
/**
|
||||||
* Switch from deferred logging to immediate logging to the specified destination.
|
* Switch from deferred logging to immediate logging to the specified destination.
|
||||||
* @param destination the new log destination
|
* @param destination the new log destination
|
||||||
|
* @since 2.1.0
|
||||||
*/
|
*/
|
||||||
public void switchTo(Class<?> destination) {
|
public void switchTo(Class<?> destination) {
|
||||||
switchTo(LogFactory.getLog(destination));
|
switchTo(LogFactory.getLog(destination));
|
||||||
|
@ -159,6 +160,7 @@ public class DeferredLog implements Log {
|
||||||
/**
|
/**
|
||||||
* Switch from deferred logging to immediate logging to the specified destination.
|
* Switch from deferred logging to immediate logging to the specified destination.
|
||||||
* @param destination the new log destination
|
* @param destination the new log destination
|
||||||
|
* @since 2.1.0
|
||||||
*/
|
*/
|
||||||
public void switchTo(Log destination) {
|
public void switchTo(Log destination) {
|
||||||
synchronized (this.lines) {
|
synchronized (this.lines) {
|
||||||
|
|
|
@ -167,7 +167,7 @@ public abstract class AbstractJsonParserTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void escapeQuote() {
|
public void escapeDoubleQuote() {
|
||||||
String input = "{\"foo\": \"\\\"bar\\\"\"}";
|
String input = "{\"foo\": \"\\\"bar\\\"\"}";
|
||||||
Map<String, Object> map = this.parser.parseMap(input);
|
Map<String, Object> map = this.parser.parseMap(input);
|
||||||
assertThat(map.get("foo")).isEqualTo("\"bar\"");
|
assertThat(map.get("foo")).isEqualTo("\"bar\"");
|
||||||
|
|
Loading…
Reference in New Issue