mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Merge branch '2.0.x'
This commit is contained in:
commit
ba1ef52e39
|
@ -105,6 +105,9 @@ public class WebMvcMetricsAutoConfiguration {
|
|||
return new MetricsWebMvcConfigurer(meterRegistry, tagsProvider);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link WebMvcConfigurer} to add metrics interceptors.
|
||||
*/
|
||||
static class MetricsWebMvcConfigurer implements WebMvcConfigurer {
|
||||
|
||||
private final MeterRegistry meterRegistry;
|
||||
|
|
|
@ -106,16 +106,6 @@ public class JerseyAutoConfiguration implements ServletContextAware {
|
|||
customize();
|
||||
}
|
||||
|
||||
private String resolveApplicationPath() {
|
||||
if (StringUtils.hasLength(this.jersey.getApplicationPath())) {
|
||||
return this.jersey.getApplicationPath();
|
||||
}
|
||||
else {
|
||||
return findApplicationPath(AnnotationUtils.findAnnotation(
|
||||
this.config.getApplication().getClass(), ApplicationPath.class));
|
||||
}
|
||||
}
|
||||
|
||||
private void customize() {
|
||||
this.customizers.orderedStream()
|
||||
.forEach((customizer) -> customizer.customize(this.config));
|
||||
|
@ -127,6 +117,14 @@ public class JerseyAutoConfiguration implements ServletContextAware {
|
|||
return this::resolveApplicationPath;
|
||||
}
|
||||
|
||||
private String resolveApplicationPath() {
|
||||
if (StringUtils.hasLength(this.jersey.getApplicationPath())) {
|
||||
return this.jersey.getApplicationPath();
|
||||
}
|
||||
return findApplicationPath(AnnotationUtils.findAnnotation(
|
||||
this.config.getApplication().getClass(), ApplicationPath.class));
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(name = "jerseyFilterRegistration")
|
||||
@ConditionalOnProperty(prefix = "spring.jersey", name = "type", havingValue = "filter")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
Loading…
Reference in New Issue
Block a user