actuator /refresh is not being provided in SpringBoot 2.0.1

I am creating a demo project for Spring-Config-Server and Spring-Config-Client.

In SpringBoot 1.5.6.RELEASE everything is working fine.

However, when I am upgrading project to 2.0.1.RELEASE it does not provide the actuator endpoints.


Actuator endpoint provided in 1.5.6.RELEASE

Mapped "{[/refresh || /refresh.json],methods=[POST]}"
Mapped "{[/dump || /dump.json],methods=[GET]
Mapped "{[/heapdump || /heapdump.json],methods=[GET]
Mapped "{[/autoconfig || /autoconfig.json],methods=[GET]
Mapped "{[/resume || /resume.json],methods=[POST]}"
Mapped "{[/configprops || /configprops.json],methods=[GET]
Mapped "{[/features || /features.json],methods=[GET]
Mapped "{[/loggers/{name:.*}],methods=[GET]
Mapped "{[/restart || /restart.json],methods=[POST]}"
...and many more

Actuator endpoint provided in 2.0.1.RELEASE

Mapped "{[/actuator/health],methods=[GET]
Mapped "{[/actuator/info],methods=[GET]
Mapped "{[/actuator],methods=[GET]

pom.xml : 2.0.1.RELEASE

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.1.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <spring-cloud.version>Finchley.RC1</spring-cloud.version>
    </properties>

<dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-config</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <repositories>
        <repository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>https://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

The only difference bw 1.5.6 pom is version and spring-cloud.version = Dalston.SR2

Could someone please help?

After a bit of research, I have found the cause why the endpoints are not shown in Spring Boot 2.0 is as per docs

By default, all endpoints except for shutdown are enabled

so, we need to enable them manually.

I have added management.endpoints.web.exposure.include=* in application.properties file and now all the endpoints are back.

Note: If you are using .yml make sure to use "*" not *

Getting Started, Like most Spring Getting Started guides, you can start from scratch and complete each needs the Config Client, Spring Boot Actuator, and Spring Web dependencies. For convenience, we have provided build files (a pom.xml file and a By default, the configuration values are read on the client's startup and not again. The actuator functionality is being provided by adding "spring-boot-starter-actuator" to the project. At this point, security is disable, so the project does not import spring-security. Using spring-boot 1.5.x, all actuator Endpoints (automatic provided, as the /info, as well as my specific defined endpoints), are working correctly.

Exposure of endpoints on HTTP is now configurable by using properties

management.endpoints.web.exposure.include
management.endpoints.web.exposure.exclude

You can expose endpoints by there ID mentioned by Actuator.

# Include all endpoints 
management.endpoints.web.exposure.include=*
# Exclude specifics 
management.endpoints.web.exposure.exclude=env

Hidden Gems of Spring and Spring Boot, (that's what the spring documentation states) — I did not use this annotation but Spring Cloud Embedded Config server and /actuator/refresh Properties to be added in Spring boot version for enabling all the actuator end points other On pivotal cloud foundry now config server is available as a service. Spring Boot - Cloud : /actuator/refresh working but not able to get the changed values on the fly I use spring-boot 2.0.1,and my request is /refresh and it's

Even after adding the below line, wont help sometimes management.endpoints.web.exposure.include=*

Try this:- Refresh works on OPTIONS method, not with POST method for few cases.

Calling refresh on actuator refresh endpoint results in Application , Hi there, In my current project we're making use of spring cloud Now the problem we're having is, if in any case configuration server is not available (or git and log levels /refresh for re-loading the boot strap context and refreshing the So now, we're getting Application run failed instead of Application  Go to start.spring.io, create a new spring boot application with Web and Actuator dependencies and then run the application. You will not get any info when you hit localhost:8080/health or localhos

Refresh Property Config at Runtime in Spring Cloud Config, We will be doing so using spring boot actuator refresh endpoint. for So, we will not be using discovery server related configuration. A simple way to refresh configuration property is to use /refresh endpoint provided by spring boot actuator​.But this is a manual process and need to be triggered for all the  It appears to be not detecting path parameters and also producing an additional optional body parameter (though the UI does not treat it as optional). Given a few months, will this work differently or is there something I should add to my config to have these discovered properly? Using Spring Boot 2.0.1 and SpringFox Swagger 2.9.0

Spring Boot Actuator, Spring Boot Actuator is available since April 2014, together with the first Spring It takes advantage of Spring Security constructs, but needs to be Also, most endpoints are sensitive – meaning they're not fully public, or in  The status is returned as expected but not the detailed information. From the code the getStatus method has Jackson annotation but the getDetails is lacking annotation. Problem found using SpringBoot spring-boot-starter-parent version 2.0.1.RELEASE.

Spring boot actuator endpoints, Spring boot actuator provide inbuilt HTTP endpoints to any application for In this Spring boot actuator tutorial, learn about in-built HTTP endpoints available for any boot all auto-configuration candidates and the reason why they 'were' or 'were not' This is not working when spring boot version 2.2.4 is being used. We built our own OAuth 2.0 resource security starter before Spring Boot provided auto-configuration, and we ended up with the following defaults : Basic for the actuator (no matter which port/context-path it runs on) OAuth 2.0 bearer token required for anything else

Comments
  • Hm, that's really weird. The docs state that the endpoints are enabled by default, which was definitely not the case for me (and it seems for you too!). Perhaps the docs are wrong?
  • You need to understand the difference between enabled and exposed via web endpoint. Enabled endpoint is not necessarily exposed via web. Currently by default most endpoints are enabled. Most of them are also exposed via JMX, but only "info" and "health" are exposed via web (http). Documentation clearly states all of this if you read it.