title: What is the equivalent of a Dropwizard Task in Spring Boot
body: <p>Is there an equivalent concept of a <a href="http://dropwizard.readthedocs.org/en/latest/manual/core.html#tasks" rel="nofollow">Dropwizard Task</a> in Spring Boot?</p>
  
  <blockquote>
    <p>A Task is a run-time action your application provides access to on the
    administrative port via HTTP. All Dropwizard applications start with
    the gc task, which explicitly triggers the JVM’s garbage collection.
    (This is useful, for example, for running full garbage collections
    during off-peak times or while the given application is out of
    rotation.) The execute method of a Task can be annotated with <code>@Timed</code>,
    <code>@Metered</code>, and <code>@ExceptionMetered</code>. Dropwizard will automatically record
    runtime information about your tasks. Running a task can be done by
    sending a <code>POST</code> request to <code>/tasks/{task-name}</code> on the admin port</p>
  </blockquote>
  
  <p>The use case I have is creating a simple "task" to perform <a href="http://www.h2database.com/html/tutorial.html#upgrade_backup_restore" rel="nofollow">an online backup of an embedded H2 database</a> on the <a href="http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production-ready-customizing-management-server-port" rel="nofollow">admin interface</a> in a Spring Boot application. The key requirement is that I do not want to expose this endpoint over the main HTTP port and network interface. </p>