We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
A very basic approach without security:
import org.springframework.boot.actuate.autoconfigure.ManagementServerProperties import org.springframework.boot.actuate.endpoint.AbstractEndpoint import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.context.ApplicationContext import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration import org.springframework.http.MediaType.APPLICATION_JSON import org.springframework.web.reactive.function.server.ServerResponse import org.springframework.web.reactive.function.server.body import org.springframework.web.reactive.function.server.router import reactor.core.publisher.toMono @Configuration @EnableConfigurationProperties(ManagementServerProperties::class) class ActuatorRoutes( private val properties: ManagementServerProperties, private val ctx: ApplicationContext ) { @Bean fun actuatorRouter() = router { (properties.contextPath and accept(APPLICATION_JSON)).nest { ctx.getBeansOfType(AbstractEndpoint::class.java).forEach { _, v -> GET("/" + v.id, { _ -> ServerResponse.ok().json().body(v.invoke().toMono()) }) } } } }
Sorry, something went wrong.
9687a50
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: