Я отключил конечную точку очистки в своем файле application.yml и пометил false также для свойства enableByDefault. Я не должен получить к нему доступ через команду curl. но все еще с помощью команды curl, я могу получить доступ к конечной точке очистки. здесь чего-то не хватает?
http://localhost:9001/app/cleanup/1000
management:
security:
enabled: false
context-path: /app
endpoints:
web:
base-path: /app
exposure:
include: health, loggers, cleanup
enabled-by-default: false
endpoint:
cleanup:
enabled: false
@Component
@Slf4j
@Endpoint(id = "cleanup", enableByDefault = false)
@RequiredArgsConstructor
public class CleanuEndpoint {
@RequestMapping(produces = {
ActuatorMediaType.V1_JSON,
MediaType.APPLICATION_JSON_VALUE})
@ResponseBody
@ReadOperation
public Object updateId(@PathVariable Long Id) {
log.info("updateId() - END= cleanUp={}, id={}",cleanUp, id);
return delegate.invoke();
}
}