• Dave Syer's avatar
    Be more defensive when instantiating custom ServerProperties · 471947b4
    Dave Syer authored
    If the user provides their own ServerProperties bean we want to peek
    at it to see if they set the port (and only that) when we are deciding
    if the actuator context needs to be created. This happens very early
    (in a @Condition) so we need to be very defensive. There are already
    quite a few checks in place to prevent a ServerProperties bean from
    being instantiated unless we really need it, and yet, when it is
    we can do more.
    
    This change creates the bean (and the ManagementProperties) in a
    throwaway BeanFactory using the same BeanDefinition as the main
    context. This ensures that when the main context bean is created
    it will be in the "natural" order and binding to the Environment
    can take place as normal.
    
    Fixes gh-4631
    471947b4
Name
Last commit
Last update
.mvn Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-actuator-docs Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-deployment-tests Loading commit data...
spring-boot-devtools Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-full-build Loading commit data...
spring-boot-integration-tests Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-tools Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...