Skip to content

Commit 27f5d5d

Browse files
committed
Merge remote-tracking branch 'remotes/spring-projects/master' into pluggable-layouts
2 parents 760d97a + dbc538d commit 27f5d5d

File tree

491 files changed

+17780
-4101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

491 files changed

+17780
-4101
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
language: java
2+
jdk:
3+
- oraclejdk8
24
services: mongodb
35

46
install: true

pom.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
<modules>
8181
<module>spring-boot-dependencies</module>
8282
<module>spring-boot-parent</module>
83-
<module>spring-boot-versions</module>
8483
<module>spring-boot-tools</module>
8584
<module>spring-boot</module>
8685
<module>spring-boot-autoconfigure</module>
@@ -110,7 +109,6 @@
110109
<modules>
111110
<module>spring-boot-dependencies</module>
112111
<module>spring-boot-parent</module>
113-
<module>spring-boot-versions</module>
114112
<module>spring-boot-tools</module>
115113
</modules>
116114
<build>

spring-boot-actuator/pom.xml

Lines changed: 66 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<modelVersion>4.0.0</modelVersion>
45
<parent>
56
<groupId>org.springframework.boot</groupId>
@@ -41,21 +42,51 @@
4142
<artifactId>spring-context</artifactId>
4243
</dependency>
4344
<!-- Optional -->
45+
<dependency>
46+
<groupId>com.google.guava</groupId>
47+
<artifactId>guava</artifactId>
48+
<optional>true</optional>
49+
</dependency>
50+
<dependency>
51+
<groupId>com.hazelcast</groupId>
52+
<artifactId>hazelcast</artifactId>
53+
<optional>true</optional>
54+
</dependency>
55+
<dependency>
56+
<groupId>com.hazelcast</groupId>
57+
<artifactId>hazelcast-spring</artifactId>
58+
<optional>true</optional>
59+
</dependency>
4460
<dependency>
4561
<groupId>com.sun.mail</groupId>
4662
<artifactId>javax.mail</artifactId>
4763
<optional>true</optional>
4864
</dependency>
65+
<dependency>
66+
<groupId>com.timgroup</groupId>
67+
<artifactId>java-statsd-client</artifactId>
68+
<optional>true</optional>
69+
</dependency>
4970
<dependency>
5071
<groupId>io.dropwizard.metrics</groupId>
5172
<artifactId>metrics-core</artifactId>
5273
<optional>true</optional>
5374
</dependency>
75+
<dependency>
76+
<groupId>javax.cache</groupId>
77+
<artifactId>cache-api</artifactId>
78+
<optional>true</optional>
79+
</dependency>
5480
<dependency>
5581
<groupId>javax.servlet</groupId>
5682
<artifactId>javax.servlet-api</artifactId>
5783
<optional>true</optional>
5884
</dependency>
85+
<dependency>
86+
<groupId>net.sf.ehcache</groupId>
87+
<artifactId>ehcache</artifactId>
88+
<optional>true</optional>
89+
</dependency>
5990
<dependency>
6091
<groupId>org.apache.activemq</groupId>
6192
<artifactId>activemq-broker</artifactId>
@@ -96,6 +127,21 @@
96127
<artifactId>spring-data-solr</artifactId>
97128
<optional>true</optional>
98129
</dependency>
130+
<dependency>
131+
<groupId>org.springframework.integration</groupId>
132+
<artifactId>spring-integration-jmx</artifactId>
133+
<optional>true</optional>
134+
</dependency>
135+
<dependency>
136+
<groupId>org.springframework.integration</groupId>
137+
<artifactId>spring-integration-core</artifactId>
138+
<optional>true</optional>
139+
</dependency>
140+
<dependency>
141+
<groupId>org.elasticsearch</groupId>
142+
<artifactId>elasticsearch</artifactId>
143+
<optional>true</optional>
144+
</dependency>
99145
<dependency>
100146
<groupId>org.springframework.security</groupId>
101147
<artifactId>spring-security-web</artifactId>
@@ -168,19 +214,30 @@
168214
<optional>true</optional>
169215
</dependency>
170216
<!-- Test -->
217+
<dependency>
218+
<groupId>org.springframework.boot</groupId>
219+
<artifactId>spring-boot</artifactId>
220+
<type>test-jar</type>
221+
<scope>test</scope>
222+
</dependency>
171223
<dependency>
172224
<groupId>ch.qos.logback</groupId>
173225
<artifactId>logback-classic</artifactId>
174226
<scope>test</scope>
175227
</dependency>
176228
<dependency>
177-
<groupId>org.crashub</groupId>
178-
<artifactId>crash.connectors.telnet</artifactId>
229+
<groupId>org.apache.tomcat.embed</groupId>
230+
<artifactId>tomcat-embed-logging-juli</artifactId>
179231
<scope>test</scope>
180232
</dependency>
181233
<dependency>
182-
<groupId>org.springframework</groupId>
183-
<artifactId>spring-test</artifactId>
234+
<groupId>org.aspectj</groupId>
235+
<artifactId>aspectjrt</artifactId>
236+
<scope>test</scope>
237+
</dependency>
238+
<dependency>
239+
<groupId>org.crashub</groupId>
240+
<artifactId>crash.connectors.telnet</artifactId>
184241
<scope>test</scope>
185242
</dependency>
186243
<dependency>
@@ -189,14 +246,13 @@
189246
<scope>test</scope>
190247
</dependency>
191248
<dependency>
192-
<groupId>org.springframework.boot</groupId>
193-
<artifactId>spring-boot</artifactId>
194-
<type>test-jar</type>
249+
<groupId>org.springframework</groupId>
250+
<artifactId>spring-test</artifactId>
195251
<scope>test</scope>
196252
</dependency>
197253
<dependency>
198-
<groupId>org.apache.tomcat.embed</groupId>
199-
<artifactId>tomcat-embed-logging-juli</artifactId>
254+
<groupId>org.springframework.data</groupId>
255+
<artifactId>spring-data-elasticsearch</artifactId>
200256
<scope>test</scope>
201257
</dependency>
202258
</dependencies>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2014 the original author or authors.
2+
* Copyright 2012-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,25 +14,29 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.groovy;
17+
package org.springframework.boot.actuate.autoconfigure;
1818

1919
import java.lang.annotation.Documented;
2020
import java.lang.annotation.ElementType;
21+
import java.lang.annotation.Inherited;
2122
import java.lang.annotation.Retention;
2223
import java.lang.annotation.RetentionPolicy;
2324
import java.lang.annotation.Target;
2425

25-
import org.springframework.boot.cli.compiler.autoconfigure.JmsCompilerAutoConfiguration;
26+
import org.springframework.beans.factory.annotation.Qualifier;
2627

2728
/**
28-
* Pseudo annotation used to trigger {@link JmsCompilerAutoConfiguration}.
29+
* Qualifier annotation for a metric repository that is used by the actuator (to
30+
* distinguish it from others that might be installed by the user).
2931
*
30-
* @deprecated since 1.2.0 in favor of {@code EnableJms}
32+
* @author Dave Syer
3133
*/
32-
@Target(ElementType.TYPE)
33-
@Documented
34+
@Qualifier
35+
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE,
36+
ElementType.ANNOTATION_TYPE })
3437
@Retention(RetentionPolicy.RUNTIME)
35-
@Deprecated
36-
public @interface EnableJmsMessaging {
38+
@Inherited
39+
@Documented
40+
public @interface ActuatorMetricReader {
3741

3842
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2014 the original author or authors.
2+
* Copyright 2012-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,25 +14,29 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.boot.groovy;
17+
package org.springframework.boot.actuate.autoconfigure;
1818

1919
import java.lang.annotation.Documented;
2020
import java.lang.annotation.ElementType;
21+
import java.lang.annotation.Inherited;
2122
import java.lang.annotation.Retention;
2223
import java.lang.annotation.RetentionPolicy;
2324
import java.lang.annotation.Target;
2425

25-
import org.springframework.boot.cli.compiler.autoconfigure.RabbitCompilerAutoConfiguration;
26+
import org.springframework.beans.factory.annotation.Qualifier;
2627

2728
/**
28-
* Pseudo annotation used to trigger {@link RabbitCompilerAutoConfiguration}.
29+
* Qualifier annotation for a metric repository that is used by the actuator (to
30+
* distinguish it from others that might be installed by the user).
2931
*
30-
* @deprecated since 1.2.0 in favor of {@code EnableRabbit}
32+
* @author Dave Syer
3133
*/
32-
@Target(ElementType.TYPE)
33-
@Documented
34+
@Qualifier
35+
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE,
36+
ElementType.ANNOTATION_TYPE })
3437
@Retention(RetentionPolicy.RUNTIME)
35-
@Deprecated
36-
public @interface EnableRabbitMessaging {
38+
@Inherited
39+
@Documented
40+
public @interface ActuatorMetricWriter {
3741

3842
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
/*
2+
* Copyright 2012-2015 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.springframework.boot.actuate.autoconfigure;
18+
19+
import javax.cache.Caching;
20+
21+
import net.sf.ehcache.Ehcache;
22+
23+
import org.springframework.boot.actuate.cache.CacheStatistics;
24+
import org.springframework.boot.actuate.cache.CacheStatisticsProvider;
25+
import org.springframework.boot.actuate.cache.ConcurrentMapCacheStatisticsProvider;
26+
import org.springframework.boot.actuate.cache.DefaultCacheStatistics;
27+
import org.springframework.boot.actuate.cache.EhCacheStatisticsProvider;
28+
import org.springframework.boot.actuate.cache.GuavaCacheStatisticsProvider;
29+
import org.springframework.boot.actuate.cache.HazelcastCacheStatisticsProvider;
30+
import org.springframework.boot.actuate.cache.JCacheStatisticsProvider;
31+
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
32+
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
33+
import org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration;
34+
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
35+
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
36+
import org.springframework.cache.Cache;
37+
import org.springframework.cache.CacheManager;
38+
import org.springframework.cache.concurrent.ConcurrentMapCache;
39+
import org.springframework.cache.jcache.JCacheCache;
40+
import org.springframework.cache.support.NoOpCacheManager;
41+
import org.springframework.context.annotation.Bean;
42+
import org.springframework.context.annotation.Configuration;
43+
44+
import com.hazelcast.core.IMap;
45+
46+
/**
47+
* {@link EnableAutoConfiguration Auto-configuration} for {@link CacheStatisticsProvider}
48+
* beans.
49+
*
50+
* @author Stephane Nicoll
51+
* @author Phillip Webb
52+
* @since 1.3.0
53+
*/
54+
@Configuration
55+
@AutoConfigureAfter(CacheAutoConfiguration.class)
56+
@ConditionalOnBean(CacheManager.class)
57+
public class CacheStatisticsAutoConfiguration {
58+
59+
@Configuration
60+
@ConditionalOnClass({ Caching.class, JCacheCache.class })
61+
static class JCacheCacheStatisticsProviderConfiguration {
62+
63+
@Bean
64+
public JCacheStatisticsProvider jCacheStatisticsProvider() {
65+
return new JCacheStatisticsProvider();
66+
}
67+
68+
}
69+
70+
@Configuration
71+
@ConditionalOnClass(Ehcache.class)
72+
static class EhCacheCacheStatisticsProviderConfiguration {
73+
74+
@Bean
75+
public EhCacheStatisticsProvider ehCacheCacheStatisticsProvider() {
76+
return new EhCacheStatisticsProvider();
77+
}
78+
79+
}
80+
81+
@Configuration
82+
@ConditionalOnClass(IMap.class)
83+
static class HazelcastCacheStatisticsConfiguration {
84+
85+
@Bean
86+
public HazelcastCacheStatisticsProvider hazelcastCacheStatisticsProvider() {
87+
return new HazelcastCacheStatisticsProvider();
88+
}
89+
}
90+
91+
@Configuration
92+
@ConditionalOnClass(com.google.common.cache.Cache.class)
93+
static class GuavaCacheStatisticsConfiguration {
94+
95+
@Bean
96+
public GuavaCacheStatisticsProvider guavaCacheStatisticsProvider() {
97+
return new GuavaCacheStatisticsProvider();
98+
}
99+
100+
}
101+
102+
@Configuration
103+
@ConditionalOnClass(ConcurrentMapCache.class)
104+
static class ConcurrentMapCacheStatisticsConfiguration {
105+
106+
@Bean
107+
public ConcurrentMapCacheStatisticsProvider concurrentMapCacheStatisticsProvider() {
108+
return new ConcurrentMapCacheStatisticsProvider();
109+
}
110+
111+
}
112+
113+
@Configuration
114+
@ConditionalOnClass(NoOpCacheManager.class)
115+
static class NoOpCacheStatisticsConfiguration {
116+
117+
private static final CacheStatistics NO_OP_STATS = new DefaultCacheStatistics();
118+
119+
@Bean
120+
public CacheStatisticsProvider<Cache> noOpCacheStatisticsProvider() {
121+
return new CacheStatisticsProvider<Cache>() {
122+
@Override
123+
public CacheStatistics getCacheStatistics(CacheManager cacheManager,
124+
Cache cache) {
125+
if (cacheManager instanceof NoOpCacheManager) {
126+
return NO_OP_STATS;
127+
}
128+
return null;
129+
}
130+
};
131+
}
132+
133+
}
134+
135+
}

0 commit comments

Comments
 (0)