Skip to content

Determine Spring Boot version on startup correctly when using Jigsaw #16182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 112 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
9746228
Determine Spring Boot version on startup correctly when using Java 9
hsellik Mar 9, 2019
d07a6ff
Fix binding of bean with no bean definition
snicoll Mar 9, 2019
7153525
Annotation @JsonTest with @ExtendWith(SpringExtension.class)
wilkinsona Mar 9, 2019
89bb973
Merge branch '2.1.x'
wilkinsona Mar 9, 2019
7d03174
Polish
wilkinsona Mar 10, 2019
f574213
Mark log file endpoint as producing text/plain
wilkinsona Mar 11, 2019
7675802
Merge branch '2.1.x'
wilkinsona Mar 11, 2019
c30f981
Fix detection of Autowired constructor with Kotlin
snicoll Mar 11, 2019
341859b
Start building against Spring Framework 5.2 snapshots
snicoll Mar 11, 2019
b34b217
Upgrade to Kotlin 1.3.21
snicoll Mar 11, 2019
821ee0c
Ensure that @Bean methods are only declared on @Configuration classes
wilkinsona Mar 11, 2019
361437f
Merge branch '1.5.x' into 2.0.x
wilkinsona Mar 11, 2019
8c3cec8
Merge branch '2.0.x' into 2.1.x
wilkinsona Mar 11, 2019
fd0a11b
Reuse Kotlin parameter names if possible
snicoll Mar 11, 2019
09d5108
Polish
snicoll Mar 11, 2019
c2eeeb0
Work around javac bug
wilkinsona Mar 11, 2019
f0ef693
Merge branch '2.0.x' into 2.1.x
wilkinsona Mar 11, 2019
aa2008b
Merge branch '2.1.x'
wilkinsona Mar 11, 2019
fed145e
Replace manual dependency management by Kotlin's bom
snicoll Mar 11, 2019
404f5d3
Align Gradle plugin's tests with Kotlin 1.3's restructuring
wilkinsona Mar 11, 2019
d92c2f7
DefaultProperties profiles shouldn't take precedence over config files
mbhave Mar 11, 2019
03beed6
Fix ScheduledTasksEndpointTests BaseConfiguration
philwebb Mar 12, 2019
45ae97a
Merge branch '2.0.x' into 2.1.x
philwebb Mar 12, 2019
ccfe20d
Merge branch '2.1.x'
philwebb Mar 12, 2019
9c3af10
Fix ScheduledTasksEndpointAutoConfigurationTests
philwebb Mar 12, 2019
f02887b
Merge branch '2.0.x' into 2.1.x
philwebb Mar 12, 2019
fc3aa43
Update copyright year for changed files
philwebb Mar 12, 2019
dd3e815
Merge branch '2.1.x'
philwebb Mar 12, 2019
64a2e8d
Update copyright year for changed files
philwebb Mar 12, 2019
50425bd
Rollback to Maven Invoker 3.1.0
philwebb Mar 12, 2019
bcec2bb
Add more indentation settings to .editorconfig
izeye Mar 12, 2019
1e2177d
Merge pull request #16203 from izeye
snicoll Mar 12, 2019
dfead88
Merge branch '2.1.x'
snicoll Mar 12, 2019
4b98fa7
Alias proxyBeanMethods on annotations meta-annotated with @Configuration
wilkinsona Mar 12, 2019
72ee0ac
Prohibit upgrade to Maven Invoker 3.2.0
wilkinsona Mar 12, 2019
8a0dc61
Polish prohibited version of Couchbase's client
wilkinsona Mar 12, 2019
3e9416c
Merge branch '2.1.x'
wilkinsona Mar 12, 2019
bcfbabe
Polish
izeye Mar 11, 2019
7f582cc
Merge pull request #16193 from izeye
snicoll Mar 12, 2019
8ff0a9c
Merge branch '2.1.x'
snicoll Mar 12, 2019
00bda4d
Add dependency management for micrometer-registry-stackdriver
izeye Mar 8, 2019
7b78367
Merge pull request #16178 from izeye
snicoll Mar 12, 2019
3831aee
Merge branch '2.1.x'
snicoll Mar 12, 2019
c9c554b
Update build and setup configuration to use HTTPS
spring-operator Mar 6, 2019
50d0b4d
Polish
snicoll Mar 12, 2019
19275fd
Drop AnyEdit from Eclipse setup as it is not available over HTTPS
wilkinsona Mar 12, 2019
28cf633
Merge pull request #16106 from Spring Operator
wilkinsona Mar 12, 2019
078bd89
Merge branch '2.0.x' into 2.1.x
snicoll Mar 12, 2019
5101342
Add support for Mustache, FreeMarker and Thymeleaf in WebFluxTest
ayudovin Mar 8, 2019
161c0b9
Polish contribution
snicoll Mar 12, 2019
015de55
Merge pull request #16170 from ayudovin
snicoll Mar 12, 2019
a44a55e
Merge branch '2.1.x'
snicoll Mar 12, 2019
6b6ac28
Update ambiguous documentation about ConfigurationProperties
viktoriya-kutsarova Mar 7, 2019
f07de1b
Polish "Update ambiguous documentation about ConfigurationProperties"
snicoll Mar 12, 2019
d77f69c
Merge pull request #16166 from viktoriya-kutsarova
snicoll Mar 12, 2019
628e441
Merge branch '2.1.x'
snicoll Mar 12, 2019
0f71f22
Polish
snicoll Mar 12, 2019
68bfb02
Reduce need for bean method proxying and disable where not needed
wilkinsona Feb 8, 2019
39971bb
Add dependency needed by javadoc generation on JDK 11
wilkinsona Mar 12, 2019
4716943
Fix typo in spring-boot-features.adoc
orangeroad0922 Mar 12, 2019
7658019
Polish "Fix typo in spring-boot-features.adoc"
snicoll Mar 12, 2019
b7ca103
Merge pull request #16213 from orangeroad0922
snicoll Mar 12, 2019
347daf6
Merge branch '2.1.x'
snicoll Mar 12, 2019
bde2f85
Trim trailing whitespace from spring.server.servlet.context-path
mrifni Mar 7, 2019
b229010
Polish "Trim trailing whitespace from spring.server.servlet.context-p…
snicoll Mar 12, 2019
55e5baf
Merge pull request #16165 from mrifni
snicoll Mar 12, 2019
e8cb75b
Enable git remote linking automatically on CF
mbhave Mar 13, 2019
81def1f
Polish
snicoll Mar 13, 2019
2b4845b
Add dependency needed by javadoc generation on JDK 11
snicoll Mar 13, 2019
a6ccdbe
Handle missing exceptions in WebMvcMetricsFilter
izeye Feb 22, 2019
6138041
Polish
bclozel Mar 13, 2019
8866a25
Polish Undertow tests
bclozel Mar 13, 2019
9906ef2
Merge branch '2.0.x' into 2.1.x
bclozel Mar 13, 2019
5a66dc8
Merge branch '2.1.x'
bclozel Mar 13, 2019
ae3ea18
Align test with change to exception in latest Framework snapshots
wilkinsona Mar 13, 2019
fcde648
Fix typo in logging.group property description
xak2000 Mar 13, 2019
07d95ce
Merge pull request #16224 from xak2000
snicoll Mar 13, 2019
9da20b7
Merge branch '2.1.x'
snicoll Mar 13, 2019
a96a79e
Check for multiple processors in OnClassCondition
JWThewes Mar 6, 2019
4d73211
Polish "Check for multiple processors in OnClassCondition"
snicoll Mar 13, 2019
210c51e
Merge pull request #16115 from JWThewes
snicoll Mar 13, 2019
0872eb0
Remove use of ReflectionUtils.doWithMethods from ConfigurationBeanFac…
wilkinsona Mar 13, 2019
2cdc93c
Make TestRestTemplate withBasicAuth fault tolerant
mbhave Mar 13, 2019
223f2be
Inject InfoContributors instead of exposing them on InfoEndpoint
mbhave Mar 13, 2019
b39b990
Use isEmpty() where possible
dreis2211 Mar 13, 2019
c4b8328
Merge pull request #16225 from dreis2211
snicoll Mar 14, 2019
fcdc414
Remove use of `@Autowired` for configuration properties bean
snicoll Mar 14, 2019
de21d71
Remove support of `@Autowired` for configuration properties bean
snicoll Mar 14, 2019
d2164a1
Document constructor binding
snicoll Mar 14, 2019
0e0ea7f
Fix checkstyle violation
snicoll Mar 14, 2019
c115ee1
Fix build failure
snicoll Mar 14, 2019
e8ed128
Update Kotlin documentation
sdeleuze Mar 15, 2019
19cc584
Polish "Update Kotlin documentation"
snicoll Mar 15, 2019
5781f4f
Merge pull request #16235 from sdeleuze
snicoll Mar 15, 2019
adaa49c
Polish
snicoll Mar 15, 2019
2f3e5d6
Test server port shouldn't affect management port when random
nosan Mar 6, 2019
b7b2798
Merge pull request #16108 from nosan
mbhave Mar 16, 2019
1893eee
Merge branch '2.1.x'
mbhave Mar 16, 2019
c5b5f75
Polish
izeye Mar 13, 2019
28175c8
Merge pull request #16219 from izeye
mbhave Mar 16, 2019
3d0219c
Merge branch '2.1.x'
mbhave Mar 16, 2019
997f07d
Add default no-op method to SpringApplicationRunListener
ayudovin Mar 5, 2019
d625025
Polish "Add default no-op method to SpringApplicationRunListener"
snicoll Mar 16, 2019
caf7110
Merge pull request #16104 from ayudovin
snicoll Mar 16, 2019
4bac6c6
Order the search locations in javadoc by precedence order
mhewedy Mar 5, 2019
372802a
Polish "Order the search locations in javadoc by precedence order"
snicoll Mar 16, 2019
24d478d
Merge pull request #16099 from mhewedy
snicoll Mar 16, 2019
09ad80b
Merge branch '2.1.x'
snicoll Mar 16, 2019
e3269a7
Switch FaviconRequestHandler visibility to package private
mrifni Mar 17, 2019
9b0ed0c
Merge pull request #16250 from mrifni
snicoll Mar 17, 2019
474eed0
Fix DTD usage of Checkstyle's import control
snicoll Mar 18, 2019
aefed32
Merge remote-tracking branch 'origin/master'
hsellik Mar 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 5 additions & 1 deletion .bomr/bomr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ bomr:
- project: couchbase-client
versions:
# Jar contains dependencies' classes resulting in duplicates
- '2.7.3'
- '[2.7.3]'
- project: maven-invoker-plugin
versions:
# NPE in InstallMojo.installProjectPom (InstallMojo.java:387)
- '[3.2.0]'
verify:
ignored-dependencies:
# Avoid confliciting transitive requirements for
Expand Down
7 changes: 1 addition & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
root=true

[*.java]
indent_style = tab
indent_size = 4
continuation_indent_size = 8

[*.xml]
[*.{groovy,java,kt,xml}]
indent_style = tab
indent_size = 4
continuation_indent_size = 8
44 changes: 14 additions & 30 deletions eclipse/spring-boot-project.setup
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<setup:Project
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xmi="https://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jdt="http://www.eclipse.org/oomph/setup/jdt/1.0"
xmlns:maven="http://www.eclipse.org/oomph/setup/maven/1.0"
xmlns:predicates="http://www.eclipse.org/oomph/predicates/1.0"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
xmlns:setup.p2="http://www.eclipse.org/oomph/setup/p2/1.0"
xmlns:setup.workingsets="http://www.eclipse.org/oomph/setup/workingsets/1.0"
xmlns:workingsets="http://www.eclipse.org/oomph/workingsets/1.0"
xsi:schemaLocation="http://www.eclipse.org/oomph/setup/jdt/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/JDT.ecore http://www.eclipse.org/oomph/setup/maven/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Maven.ecore http://www.eclipse.org/oomph/predicates/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Predicates.ecore http://www.eclipse.org/oomph/setup/workingsets/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/SetupWorkingSets.ecore http://www.eclipse.org/oomph/workingsets/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/WorkingSets.ecore"
xmlns:jdt="https://www.eclipse.org/oomph/setup/jdt/1.0"
xmlns:maven="https://www.eclipse.org/oomph/setup/maven/1.0"
xmlns:predicates="https://www.eclipse.org/oomph/predicates/1.0"
xmlns:setup="https://www.eclipse.org/oomph/setup/1.0"
xmlns:setup.p2="https://www.eclipse.org/oomph/setup/p2/1.0"
xmlns:setup.workingsets="https://www.eclipse.org/oomph/setup/workingsets/1.0"
xmlns:workingsets="https://www.eclipse.org/oomph/workingsets/1.0"
xsi:schemaLocation="https://www.eclipse.org/oomph/setup/jdt/1.0 https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/JDT.ecore https://www.eclipse.org/oomph/setup/maven/1.0 https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Maven.ecore https://www.eclipse.org/oomph/predicates/1.0 https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Predicates.ecore https://www.eclipse.org/oomph/setup/workingsets/1.0 https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/SetupWorkingSets.ecore https://www.eclipse.org/oomph/workingsets/1.0 https://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/WorkingSets.ecore"
name="spring.boot"
label="Spring Boot">
<setupTask
Expand Down Expand Up @@ -60,8 +60,6 @@
name="org.eclipse.platform.feature.group"/>
<requirement
name="org.eclipse.jdt.feature.group"/>
<requirement
name="AnyEditTools.feature.group"/>
<requirement
name="io.spring.javaformat.eclipse.feature.feature.group"/>
<requirement
Expand All @@ -81,19 +79,17 @@
<requirement
name="org.springframework.ide.eclipse.boot.feature.feature.group"/>
<repository
url="http://download.eclipse.org/technology/epp/packages/oxygen/R/"/>
<repository
url="http://download.eclipse.org/releases/oxygen/"/>
url="https://download.eclipse.org/technology/epp/packages/oxygen/R/"/>
<repository
url="http://andrei.gmxhome.de/eclipse/"/>
url="https://download.eclipse.org/releases/oxygen/"/>
<repository
url="https://dl.bintray.com/spring/javaformat-eclipse/"/>
<repository
url="http://download.eclipse.org/egit/github/updates/"/>
url="https://download.eclipse.org/egit/github/updates/"/>
<repository
url="http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-buildhelper/0.15.0/N/0.15.0.201207090124/"/>
url="https://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-buildhelper/0.15.0/N/0.15.0.201207090124/"/>
<repository
url="http://dist.springsource.com/release/TOOLS/update/e4.7"/>
url="https://dist.springsource.com/release/TOOLS/update/e4.7"/>
<description>
Install the tools needed in the IDE to work with the
source code for ${scope.project.label}
Expand Down Expand Up @@ -147,18 +143,6 @@
pattern="spring-boot-.*-test.*"/>
</workingSet>
</setupTask>
<setupTask
xsi:type="setup:CompoundTask"
name="de.loskutov.anyedit.AnyEditTools">
<setupTask
xsi:type="setup:PreferenceTask"
key="/instance/de.loskutov.anyedit.AnyEditTools/org.eclipse.jdt.ui.editor.tab.width"
value="4"/>
<setupTask
xsi:type="setup:PreferenceTask"
key="/instance/de.loskutov.anyedit.AnyEditTools/saveAndAddLine"
value="true"/>
</setupTask>
<setupTask
xsi:type="setup:CompoundTask"
name="org.eclipse.jdt.ui">
Expand Down
2 changes: 1 addition & 1 deletion mvnw
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
Expand Down
2 changes: 1 addition & 1 deletion mvnw.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM https://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* @author Christian Dupuis
* @since 2.0.0
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(RabbitTemplate.class)
@ConditionalOnBean(RabbitTemplate.class)
@ConditionalOnEnabledHealthIndicator("rabbit")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* @author Vedran Pavic
* @since 2.0.0
*/
@Configuration
@Configuration(proxyBeanMethods = false)
public class AuditAutoConfiguration {

@Bean
Expand All @@ -63,7 +63,7 @@ public AuthorizationAuditListener authorizationAuditListener() throws Exception
return new AuthorizationAuditListener();
}

@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnMissingBean(AuditEventRepository.class)
protected static class AuditEventRepositoryConfiguration {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* @author Vedran Pavic
* @since 2.0.0
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@AutoConfigureAfter(AuditAutoConfiguration.class)
@ConditionalOnEnabledEndpoint(endpoint = AuditEventsEndpoint.class)
@ConditionalOnExposedEndpoint(endpoint = AuditEventsEndpoint.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @author Phillip Webb
* @since 2.0.0
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnEnabledEndpoint(endpoint = BeansEndpoint.class)
@ConditionalOnExposedEndpoint(endpoint = BeansEndpoint.class)
public class BeansEndpointAutoConfiguration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* @author Stephane Nicoll
* @since 2.1.0
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(CacheManager.class)
@ConditionalOnEnabledEndpoint(endpoint = CachesEndpoint.class)
@ConditionalOnExposedEndpoint(endpoint = CachesEndpoint.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* @author Stephane Nicoll
* @since 2.1.0
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass({ Cluster.class, CassandraOperations.class })
@ConditionalOnBean(CassandraOperations.class)
@ConditionalOnEnabledHealthIndicator("cassandra")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* @author Stephane Nicoll
* @since 2.1.0
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass({ Cluster.class, ReactiveCassandraOperations.class, Flux.class })
@ConditionalOnBean(ReactiveCassandraOperations.class)
@ConditionalOnEnabledHealthIndicator("cassandra")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 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.
Expand Down Expand Up @@ -79,7 +79,7 @@ private boolean isHealthEndpointExtension(Object extensionBean) {

private boolean isCloudFoundryHealthEndpointExtension(Object extensionBean) {
return AnnotatedElementUtils.hasAnnotation(extensionBean.getClass(),
HealthEndpointCloudFoundryExtension.class);
EndpointCloudFoundryExtension.class);
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 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.
Expand All @@ -22,20 +22,26 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.EndpointExtension;
import org.springframework.boot.actuate.health.HealthEndpoint;

/**
* Identifies a type as being a Cloud Foundry specific extension for the
* {@link HealthEndpoint}.
* Identifies a type as being a Cloud Foundry specific extension for an {@link Endpoint}.
*
* @author Phillip Webb
* @since 2.0.0
* @author Madhura Bhave
* @since 2.2.0
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@EndpointExtension(filter = CloudFoundryEndpointFilter.class, endpoint = HealthEndpoint.class)
public @interface HealthEndpointCloudFoundryExtension {
@EndpointExtension(filter = CloudFoundryEndpointFilter.class)
public @interface EndpointCloudFoundryExtension {

/**
* The class of the endpoint to provide a Cloud Foundry specific extension for.
* @return the class of the endpoint to extend
*/
Class<?> endpoint();

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 the original author or authors.
* Copyright 2012-2019 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.
Expand All @@ -18,7 +18,7 @@

import reactor.core.publisher.Mono;

import org.springframework.boot.actuate.autoconfigure.cloudfoundry.HealthEndpointCloudFoundryExtension;
import org.springframework.boot.actuate.autoconfigure.cloudfoundry.EndpointCloudFoundryExtension;
import org.springframework.boot.actuate.endpoint.annotation.EndpointExtension;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import org.springframework.boot.actuate.endpoint.web.WebEndpointResponse;
Expand All @@ -34,7 +34,7 @@
* @author Madhura Bhave
* @since 2.0.0
*/
@HealthEndpointCloudFoundryExtension
@EndpointCloudFoundryExtension(endpoint = HealthEndpoint.class)
public class CloudFoundryReactiveHealthEndpointWebExtension {

private final ReactiveHealthEndpointWebExtension delegate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.boot.actuate.autoconfigure.cloudfoundry.CloudFoundryWebEndpointDiscoverer;
import org.springframework.boot.actuate.autoconfigure.cloudfoundry.servlet.CloudFoundryInfoEndpointWebExtension;
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnEnabledEndpoint;
import org.springframework.boot.actuate.autoconfigure.endpoint.condition.ConditionalOnExposedEndpoint;
import org.springframework.boot.actuate.autoconfigure.health.HealthEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.info.InfoEndpointAutoConfiguration;
import org.springframework.boot.actuate.endpoint.ExposableEndpoint;
import org.springframework.boot.actuate.endpoint.invoke.ParameterValueMapper;
import org.springframework.boot.actuate.endpoint.web.EndpointLinksResolver;
Expand All @@ -37,6 +41,10 @@
import org.springframework.boot.actuate.endpoint.web.annotation.ControllerEndpointsSupplier;
import org.springframework.boot.actuate.health.HealthEndpoint;
import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension;
import org.springframework.boot.actuate.info.GitInfoContributor;
import org.springframework.boot.actuate.info.InfoContributor;
import org.springframework.boot.actuate.info.InfoEndpoint;
import org.springframework.boot.actuate.info.InfoPropertiesInfoContributor;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
Expand All @@ -46,6 +54,7 @@
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.cloud.CloudPlatform;
import org.springframework.boot.info.GitProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand All @@ -66,9 +75,10 @@
* @author Madhura Bhave
* @since 2.0.0
*/
@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnProperty(prefix = "management.cloudfoundry", name = "enabled", matchIfMissing = true)
@AutoConfigureAfter(HealthEndpointAutoConfiguration.class)
@AutoConfigureAfter({ HealthEndpointAutoConfiguration.class,
InfoEndpointAutoConfiguration.class })
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE)
@ConditionalOnCloudPlatform(CloudPlatform.CLOUD_FOUNDRY)
public class ReactiveCloudFoundryActuatorAutoConfiguration {
Expand All @@ -84,6 +94,24 @@ public CloudFoundryReactiveHealthEndpointWebExtension cloudFoundryReactiveHealth
reactiveHealthEndpointWebExtension);
}

@Bean
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
@ConditionalOnExposedEndpoint
@ConditionalOnBean({ InfoEndpoint.class, GitProperties.class })
public CloudFoundryInfoEndpointWebExtension cloudFoundryInfoEndpointWebExtension(
GitProperties properties, ObjectProvider<InfoContributor> infoContributors) {
List<InfoContributor> contributors = infoContributors.orderedStream()
.map((infoContributor) -> {
if (infoContributor instanceof GitInfoContributor) {
return new GitInfoContributor(properties,
InfoPropertiesInfoContributor.Mode.FULL);
}
return infoContributor;
}).collect(Collectors.toList());
return new CloudFoundryInfoEndpointWebExtension(new InfoEndpoint(contributors));
}

@Bean
public CloudFoundryWebFluxEndpointHandlerMapping cloudFoundryWebFluxEndpointHandlerMapping(
ParameterValueMapper parameterMapper, EndpointMediaTypes endpointMediaTypes,
Expand Down Expand Up @@ -135,7 +163,7 @@ private CorsConfiguration getCorsConfiguration() {
return corsConfiguration;
}

@Configuration
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(MatcherSecurityWebFilterChain.class)
static class IgnoredPathsSecurityConfiguration {

Expand Down
Loading