Spring-boot: Add support for delete operation to the actuator endpoint API

Created on 16 Aug 2017  路  4Comments  路  Source: spring-projects/spring-boot


As discussed on the gitter channel with the previous actuator endpoint API I was able to handle DELETE requests like this:
@ResponseBody @RequestMapping(value = "/{region:.+}", method = RequestMethod.DELETE) public CacheRegion purgeSingleCacheRegion(@PathVariable("region") String region) throws MalformedObjectNameException, AttributeNotFoundException, MBeanException, ReflectionException, InstanceNotFoundException {
but seems like with the current actuator endpoint I can only do @ReadOperation and @WriteOperation.
This is an enhancement request to add @DeleteOperation to the API to be able to handle delete requests too.

enhancement

Most helpful comment

I have a proposal in 09f70eb

All 4 comments

We need to have a discussion to validate if we want to move from a R/W model to a CRUD model. Doing the latter probably means renaming ReadOperation and WriteOperation to RetrieveOperation and UpdateOperation respectively. While I understand this may be desirable to issue a http DELETE on an endpoint, we're starting to get closer to what a typical rest endpoint provides and I am a bit nervous about that.

The previous model was essentially a controller so you could do whatever you like there. I'd recommend doing the same in the meantime (nothing wrong with that). Part of the team is offline for sometime so we need to get together to figure things out.

Thanks for reporting it!

The outcome of this also impacts #8342.

I have a proposal in 09f70eb

I'm in favor of @snicoll's proposal

Was this page helpful?
0 / 5 - 0 ratings