
com.wavefront.spring.actuate.WavefrontController Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wavefront-spring-boot Show documentation
Show all versions of wavefront-spring-boot Show documentation
Wavefront by VMware integration for Spring Boot
The newest version!
package com.wavefront.spring.actuate;
import java.net.URI;
import java.util.function.Supplier;
import org.springframework.boot.actuate.endpoint.web.annotation.ControllerEndpoint;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
/**
* An endpoint that provides access to the Wavefront dashboard.
*
* @author Stephane Nicoll
*/
@ControllerEndpoint(id = "wavefront")
public class WavefrontController {
private final Supplier dashboardUrlSupplier;
WavefrontController(Supplier dashboardUrlSupplier) {
this.dashboardUrlSupplier = dashboardUrlSupplier;
}
@GetMapping("/")
public ResponseEntity dashboard() {
return ResponseEntity.status(HttpStatus.FOUND)
.headers((headers) -> headers.setLocation(this.dashboardUrlSupplier.get()))
.build();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy