fix_28276 #9
12
pom.xml
12
pom.xml
|
@ -83,15 +83,9 @@
|
|||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-actuator</artifactId>
|
||||
<version>1.3.5.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>4.3.5.RELEASE</version>
|
||||
<groupId>org.eclipse.microprofile.health</groupId>
|
||||
<artifactId>microprofile-health-api</artifactId>
|
||||
<version>4.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
package org.gcube.datatransfer.resolver.services;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.actuate.autoconfigure.EndpointAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.PublicMetricsAutoConfiguration;
|
||||
import org.springframework.boot.actuate.endpoint.MetricsEndpoint;
|
||||
import org.springframework.boot.actuate.endpoint.mvc.EndpointHandlerMapping;
|
||||
import org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter;
|
||||
import org.springframework.boot.actuate.endpoint.mvc.MvcEndpoint;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
@Configuration
|
||||
@Import({ EndpointAutoConfiguration.class, PublicMetricsAutoConfiguration.class })
|
||||
public class SpringBootActuatorConfig {
|
||||
|
||||
@Bean
|
||||
@Autowired
|
||||
public EndpointHandlerMapping endpointHandlerMapping(Collection<? extends MvcEndpoint> endpoints) {
|
||||
return new EndpointHandlerMapping(endpoints);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Autowired
|
||||
public EndpointMvcAdapter metricsEndPoint(MetricsEndpoint delegate) {
|
||||
return new EndpointMvcAdapter(delegate);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package org.gcube.datatransfer.resolver.services;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
import org.eclipse.microprofile.health.HealthCheck;
|
||||
import org.eclipse.microprofile.health.HealthCheckResponse;
|
||||
|
||||
@Path("health")
|
||||
public class UriResolverHealthCheck implements HealthCheck {
|
||||
@Override
|
||||
public HealthCheckResponse call() {
|
||||
return HealthCheckResponse.named("uri-resolver").up().build();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue