How can we disable actuator completely? If we disable the actuator endpoint does it mean that actuator has disabled that functionality as well? I doubt that.
I have nothing defined in my application.properties which means only /health and /info should be exposed. But in my code
package com.rbc.rbc.controllers;
import io.micrometer.core.instrument.Counter;
import io.micrometer.core.instrument.Measurement;
import io.micrometer.core.instrument.Meter;
import io.micrometer.core.instrument.Metrics;
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
public class RestController1 {
    SimpleMeterRegistry sm;
    @GetMapping("/welcome")
    public void test(){
        SimpleMeterRegistry m=(SimpleMeterRegistry)(Metrics.globalRegistry.getRegistries().toArray())[0];
        List<Meter> met=m.getMeters();
        for (Meter mtr:met) {
            System.out.println(mtr.getId().getName());
            if(mtr.getId().getName().equals("http.server.requests")){
            mtr.measure().forEach(mi -> {
                System.out.println(mi.getStatistic());
                System.out.println(mi.getValue());
            });
        }}
    }
}
I am still able to see the metrics programmatically. Does that mean that only the endpoint is disabled but the metrics are still collected? Is there a way to disable it completely. I am saying so because I do not want the metrics to be collected I need only the health endpoint for now.