SlideShare a Scribd company logo
1 of 21
Download to read offline
Production-Ready Features
with
SPRING BOOT ACTUATOR
© Rowell Belen
Automatic auditing, health
monitoring and metrics for
Spring Boot Applications
© Rowell Belen
Maven Config:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
Gradle Config:
dependencies {
compile("org.springframework.boot:spring-boot-starter-actuator")
}
© Rowell Belen
Built-In Endpoints
© Rowell Belen
GET /health - Shows application health information
{
"status": "UP",
"diskSpace": {
"status": "UP",
"total": 10724835328,
"free": 9929453568,
"threshold": 10485760
},
"db": {
"status": "UP",
"database": "PostgreSQL",
"hello": 1
}
}
© Rowell Belen
Custom Health Indicators
import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.stereotype.Component;
@Component
public class WeatherServiceHealthIndicator implements HealthIndicator {
@Override
public Health health() {
int errorCode = checkWeatherService()
if (errorCode != 0) {
return Health.down().withDetail("Error Code", errorCode).build();
}
return Health.up().build();
}
}
© Rowell Belen
GET /metrics - Displays JVM & App Metrics
{
"mem": 440107,
"mem.free": 250901,
"processors": 2,
"instance.uptime": 626420367,
"uptime": 626441178,
"systemload.average": 0.01,
"heap.committed": 325632,
"heap.init": 239616,
"heap.used": 74730,
"heap": 3387904,
"nonheap.committed": 117344,
"nonheap.init": 2496,
"nonheap.used": 114476,
"nonheap": 0,
"threads.peak": 29,
"threads.daemon": 20,
"threads.totalStarted": 21004,
"threads": 27,
"classes": 13008,
"classes.loaded": 13008,
"classes.unloaded": 0,
"gc.ps_scavenge.count": 111,
"gc.ps_scavenge.time": 1263,
"gc.ps_marksweep.count": 3,
"gc.ps_marksweep.time": 807,
"cache.surveys.size": 1
}
© Rowell Belen
GET /metrics - Displays JVM & App Metrics (continued..)
{
"gauge.response.platform-energyid.user.userId.score": 7,
"gauge.response.platform-energyid.user.userId.survey": 10,
"gauge.response.platform-energyid.manage.health": 3,
"gauge.response.platform-energyid.survey": 3,
"counter.status.200.platform-energyid.survey": 3,
"counter.status.200.platform-energyid.manage.health": 10435,
"counter.status.404.platform-energyid.user.userId.score": 36,
"counter.status.404.star-star": 1,
"counter.status.401.platform-energyid.user.userId.survey": 2,
"counter.status.200.platform-energyid.user.userId.score": 4,
"counter.status.200.platform-energyid.user.userId.survey": 1
}
© Rowell Belen
Record Custom Metrics
import org.springframework.boot.actuate.metrics.CounterService;
@Service
public class EnergyScoreService {
private final CounterService counterService;
@Autowired
public EnergyScoreService(CounterService counterService) {
this.counterService = counterService;
}
public void getScore() {
this.counterService.increment("platform.tendril.energyscore.invoked");
}
}
© Rowell Belen
Export Actuator Metrics
@Bean
@ExportMetricWriter
MetricWriter metricWriter() {
return new DataDogStatsdMetricWriter(prefix, "com.datadog...", 8125);
}
@Bean
@ExportMetricWriter
MetricWriter metricWriter(MBeanExporter exporter) {
return new JmxMetricWriter(exporter);
}
© Rowell Belen
GET /info - Displays arbitrary application info
{
"git": {
"commit": {
"message": {
"full": "[MH-780] Support/Expose Tenant Override Survey Questions"
},
"time": 1476993093000,
"id": "173ca32139d14ae383ec46c01fff66385850bfc7",
"id.abbrev": "173ca32",
"user": {
"email": "rbelen@tendrilinc.com",
"name": "Rowell Belen"
}
},
"branch": "HEAD"
},
"build": {
"version": "0.1.0",
"artifact": "platform-energyid-api",
"build": {
"docker": "platform-energyid-api-0.1.0-70-173ca32"
},
"name": "platform-energyid-api",
"group": "com.tendril",
"time": 1476993345000
}
}
© Rowell Belen
GET /env - Exposes Application/Environment properties
{
"profiles": [
"dev"
],
"server.ports": {
"local.server.port": 8080
},
"systemEnvironment": {
"PORT_8080": "31076",
"MARATHON_APP_LABELS": "",
"MARATHON_APP_RESOURCE_CPUS": "0.2",
"MESOS_CONTAINER_NAME": "mesos-60025f2a-3e08-4558-bfa5-daef489a84eb-S49.296367df-cb80-4153-8365-af3fc5f535b3",
"SPRING_PROFILES_ACTIVE": "dev",
"HOST": "10.200.**.**",
"MARATHON_APP_DOCKER_IMAGE": "*******.useast.tni01.com/platform-energyid-api-0.1.0-70-173ca32",
"MARATHON_APP_RESOURCE_MEM": "2048.0",
"MESOS_TASK_ID": "platform-energyid-api-dev.a38b9778-96ff-11e6-bc77-0e76f225482f",
"MARATHON_APP_VERSION": "2016-10-20T19:58:58.461Z",
"MESOS_SANDBOX": "/mnt/mesos/sandbox",
"MARATHON_APP_ID": "/platform-energyid-api-dev",
},
"applicationConfig: [classpath:/application-dev.properties]": {
"spring.datasource.driver-class-name": "org.postgresql.Driver",
"spring.datasource.username": "******",
"spring.datasource.password": "******",
"spring.datasource.url": "jdbc:postgresql://******.useast.tni01.com:5432/energyid",
"app.env": "dev"
}
}
© Rowell Belen
GET /mappings - Displays a collated list of path
mappings
{
"{[/platform-energyid/user/{userId}/survey],methods=[GET]}": {
"bean": "requestMappingHandlerMapping",
"method": "List<Answer> EnergyIdController.getAnswers(String)"
},
"{[/platform-energyid/user/{userId}/score],methods=[GET]}": {
"bean": "requestMappingHandlerMapping",
"method": "public Score EnergyIdController.getUserScore(String)"
},
"{[/platform-energyid/user/{userId}/survey],methods=[POST]}": {
"bean": "requestMappingHandlerMapping",
"method": "public EnergyIdScore EnergyIdController.saveAnswers(List<Answer>)"
},
"{[/platform-energyid/tenant/{tenant}/survey],methods=[GET]}": {
"bean": "requestMappingHandlerMapping",
"method": "public Iterable<Survey> EnergyIdController.getSurvey(java.lang.String)"
},
"{[/platform-energyid/survey],methods=[GET]}": {
"bean": "requestMappingHandlerMapping",
"method": "public Iterable<Survey> EnergyIdController.getSurvey()"
}
}
© Rowell Belen
GET /trace - Displays trace of request/response history
{
"timestamp": 1477616323315,
"info": {
"method": "GET",
"path": "/platform-energyid/manage/health",
"headers": {
"request": {
"host": "10.200.**.***:31***",
"user-agent": "spray-can/1.3.2"
},
"response": {
"X-Application-Context": "application:dev:31542",
"x-api-request-id": "9ec0746c-8e81-42fd-884d-885497958b9f",
"x-duration": "0ms",
"Content-Type": "application/json;charset=UTF-8",
"Transfer-Encoding": "chunked",
"Date": "Fri, 28 Oct 2016 00:58:43 GMT",
"status": "200"
}
}
}
}
© Rowell Belen
GET /logfile - Returns the contents of the logfile
2016-10-20 19:59:16.297 INFO 1 --- [main] c.t.p.energyid.api.MainController : Starting MainController on 0ad70aa2483e with PID 1 (/app/platform-energyid-api-0.1.0.jar started by root in /app)
2016-10-20 19:59:16.384 INFO 1 --- [main] c.t.p.energyid.api.MainController : The following profiles are active: dev
2016-10-20 19:59:17.535 INFO 1 --- [main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@2957fcb0: startup date [Thu Oct 20 19:59:17 UTC 2016]; root of context hierarchy
2016-10-20 19:59:25.096 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cache.annotation.ProxyCachingConfiguration' of type [class org.springframework.cache.annotation.ProxyCachingConfiguration$$EnhancerBySpringCGLIB$$1ee60781] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-10-20 19:59:25.212 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration' of type [class org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration$$EnhancerBySpringCGLIB$$1359cc25] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-10-20 19:59:25.476 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration' of type [class org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$$EnhancerBySpringCGLIB$$4d68cd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-10-20 19:59:25.498 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'stringOrNumberMigrationVersionConverter' of type [class org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$StringOrNumberToMigrationVersionConverter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-10-20 19:59:25.690 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.cache-org.springframework.boot.autoconfigure.cache.CacheProperties' of type [class org.springframework.boot.autoconfigure.cache.CacheProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-10-20 19:59:25.733 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.cache.CacheManagerCustomizers' of type [class org.springframework.boot.autoconfigure.cache.CacheManagerCustomizers] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-10-20 19:59:25.755 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.cache.SimpleCacheConfiguration' of type [class org.springframework.boot.autoconfigure.cache.SimpleCacheConfiguration$$EnhancerBySpringCGLIB$$b4f53f06] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-10-20 19:59:25.820 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'cacheManager' of type [class org.springframework.cache.concurrent.ConcurrentMapCacheManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-10-20 19:59:25.822 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'cacheAutoConfigurationValidator' of type [class org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration$CacheManagerValidator] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-10-20 19:59:26.003 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$d5d3d163] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-10-20 19:59:28.332 INFO 1 --- [main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2016-10-20 19:59:28.430 INFO 1 --- [main] o.apache.catalina.core.StandardService : Starting service Tomcat
2016-10-20 19:59:28.456 INFO 1 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.5
2016-10-20 19:59:28.842 INFO 1 --- [localhost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2016-10-20 19:59:28.842 INFO 1 --- [localhost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 11313 ms
2016-10-20 19:59:30.827 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2016-10-20 19:59:30.832 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'webServlet' to [/h2-console/*]
2016-10-20 19:59:30.845 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'metricsFilter' to: [/*]
2016-10-20 19:59:30.847 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2016-10-20 19:59:30.848 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2016-10-20 19:59:30.848 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2016-10-20 19:59:30.849 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2016-10-20 19:59:30.855 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2016-10-20 19:59:30.856 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestLoggingFilter' to: [/*]
2016-10-20 19:59:30.856 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'applicationContextIdFilter' to: [/*]
2016-10-20 19:59:32.600 INFO 1 --- [main] o.f.core.internal.util.VersionPrinter : Flyway 4.0.3 by Boxfuse
2016-10-20 19:59:33.074 INFO 1 --- [main] o.f.c.i.dbsupport.DbSupportFactory : Database: jdbc:postgresql://adu-myhome-rds01.useast.tni01.com:5432/energyid (PostgreSQL 9.5)
2016-10-20 19:59:33.285 INFO 1 --- [main] o.f.core.internal.command.DbValidate : Successfully validated 3 migrations (execution time 00:00.048s)
2016-10-20 19:59:33.363 INFO 1 --- [main] o.f.core.internal.command.DbMigrate : Current version of schema "public": 1.2
2016-10-20 19:59:33.366 INFO 1 --- [main] o.f.core.internal.command.DbMigrate : Schema "public" is up to date. No migration necessary.
2016-10-20 19:59:33.763 INFO 1 --- [main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2016-10-20 19:59:33.833 INFO 1 --- [main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2016-10-20 19:59:34.162 INFO 1 --- [main] org.hibernate.Version : HHH000412: Hibernate Core {5.0.11.Final}
2016-10-20 19:59:34.170 INFO 1 --- [main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2016-10-20 19:59:34.178 INFO 1 --- [main] org.hibernate.cfg.Environment : HHH000021: Bytecode provider name : javassist
2016-10-20 19:59:34.398 INFO 1 --- [main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2016-10-20 19:59:35.308 INFO 1 --- [main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL94Dialect
2016-10-20 19:59:36.951 INFO 1 --- [main] o.h.e.j.e.i.LobCreatorBuilderImpl : HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
2016-10-20 19:59:36.965 INFO 1 --- [main] org.hibernate.type.BasicTypeRegistry : HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType@33308786
2016-10-20 19:59:38.550 INFO 1 --- [main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2016-10-20 19:59:44.692 INFO 1 --- [main] o.h.h.i.QueryTranslatorFactoryInitiator : HHH000397: Using ASTQueryTranslatorFactory
2016-10-20 19:59:45.169 INFO 1 --- [main] c.t.p.energyid.service.EnergyIdService : Score count: 10
2016-10-20 19:59:45.183 INFO 1 --- [main] c.t.p.energyid.service.EnergyIdService : Survey count: 10
2016-10-20 19:59:45.203 INFO 1 --- [main] c.t.p.energyid.service.EnergyIdService : Answer count: 97
2016-10-20 19:59:45.505 INFO 1 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService
2016-10-20 19:59:45.564 INFO 1 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'asyncExecutor'
2016-10-20 19:59:47.067 INFO 1 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : jolokia: No access restrictor found, access to any MBean is allowed
2016-10-20 19:59:47.850 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@2957fcb0: startup date [Thu Oct 20 19:59:17 UTC 2016]; root of context hierarchy
2016-10-20 19:59:47.868 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Detected ResponseBodyAdvice bean in responseInterceptor
2016-10-20 19:59:48.165 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/platform-energyid/user/{userId}/survey],methods=[GET]}" onto public java.util.List<com.tendril.platform.energyid.persistence.entities.Answer> com.tendril.platform.energyid.api.EnergyIdController.getAnswers(java.lang.String)
2016-10-20 19:59:48.168 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/platform-energyid/user/{userId}/survey],methods=[POST]}" onto public com.tendril.platform.energyid.model.energyid.EnergyIdScore com.tendril.platform.energyid.api.EnergyIdController.saveAnswers(java.lang.String,java.util.List<com.tendril.platform.energyid.persistence.entities.Answer>)
2016-10-20 19:59:48.168 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/platform-energyid/user/{userId}/score],methods=[GET]}" onto public com.tendril.platform.energyid.persistence.entities.Score com.tendril.platform.energyid.api.EnergyIdController.getUserScore(java.lang.String)
2016-10-20 19:59:48.170 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/platform-energyid/tenant/{tenant}/survey],methods=[GET]}" onto public java.lang.Iterable<com.tendril.platform.energyid.persistence.entities.Survey> com.tendril.platform.energyid.api.EnergyIdController.getSurvey(java.lang.String)
2016-10-20 19:59:48.172 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/platform-energyid/survey],methods=[GET]}" onto public java.lang.Iterable<com.tendril.platform.energyid.persistence.entities.Survey> com.tendril.platform.energyid.api.EnergyIdController.getSurvey()
2016-10-20 19:59:48.180 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2016-10-20 19:59:48.189 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2016-10-20 19:59:48.586 INFO 1 --- [main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-10-20 19:59:48.587 INFO 1 --- [main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-10-20 19:59:48.745 INFO 1 --- [main] .m.m.a.ExceptionHandlerExceptionResolver : Detected ResponseBodyAdvice implementation in responseInterceptor
2016-10-20 19:59:48.954 INFO 1 --- [main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-10-20 19:59:51.983 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/flyway || /platform-energyid/manage/flyway.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-10-20 19:59:51.990 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/env/{name:.*}],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String)
2016-10-20 19:59:51.991 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/env || /platform-energyid/manage/env.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-10-20 19:59:51.994 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/jolokia/**]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.actuate.endpoint.mvc.JolokiaMvcEndpoint.handle(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.lang.Exception
2016-10-20 19:59:51.997 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/autoconfig || /platform-energyid/manage/autoconfig.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-10-20 19:59:52.009 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/mappings || /platform-energyid/manage/mappings.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-10-20 19:59:52.011 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/trace || /platform-energyid/manage/trace.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-10-20 19:59:52.012 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/health || /platform-energyid/manage/health.json],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(java.security.Principal)
2016-10-20 19:59:52.014 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/metrics/{name:.*}],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)
2016-10-20 19:59:52.015 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/metrics || /platform-energyid/manage/metrics.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-10-20 19:59:52.027 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/beans || /platform-energyid/manage/beans.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-10-20 19:59:52.031 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/dump || /platform-energyid/manage/dump.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-10-20 19:59:52.032 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/heapdump || /platform-energyid/manage/heapdump.json],methods=[GET],produces=[application/octet-stream]}" onto public void org.springframework.boot.actuate.endpoint.mvc.HeapdumpMvcEndpoint.invoke(boolean,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.io.IOException,javax.servlet.ServletException
2016-10-20 19:59:52.037 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/info || /platform-energyid/manage/info.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-10-20 19:59:52.041 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/logfile || /platform-energyid/manage/logfile.json],methods=[GET || HEAD]}" onto public void org.springframework.boot.actuate.endpoint.mvc.LogFileMvcEndpoint.invoke(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws javax.servlet.ServletException,java.io.IOException
2016-10-20 19:59:52.052 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/shutdown || /platform-energyid/manage/shutdown.json],methods=[POST]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.ShutdownMvcEndpoint.invoke()
2016-10-20 19:59:52.054 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/configprops || /platform-energyid/manage/configprops.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2016-10-20 19:59:54.581 INFO 1 --- [main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2016-10-20 19:59:54.629 INFO 1 --- [main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0
2016-10-20 19:59:55.277 INFO 1 --- [main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2016-10-20 19:59:55.295 INFO 1 --- [main] c.t.p.energyid.api.MainController : Started MainController in 40.573 seconds (JVM running for 42.125)
2016-10-20 19:59:58.773 INFO 1 --- [http-nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring FrameworkServlet 'dispatcherServlet'
2016-10-20 19:59:58.773 INFO 1 --- [http-nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization started
2016-10-20 19:59:58.844 INFO 1 --- [http-nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization completed in 70 ms
2016-10-20 19:59:59.231 INFO 1 --- [http-nio-8080-exec-1] c.t.p.e.interceptor.ResponseInterceptor : [EnergyID API Request b8f299e3-92e1-4812-b498-93471204c2eb - /platform-energyid/manage/health] execution time: -19ms
2016-10-20 20:00:58.626 INFO 1 --- [http-nio-8080-exec-2] c.t.p.e.interceptor.ResponseInterceptor : [EnergyID API Request 940359b0-1f89-4616-8c97-1db78e4d9419 - /platform-energyid/manage/health] execution time: -1ms
2016-10-20 20:01:58.642 INFO 1 --- [http-nio-8080-exec-3] c.t.p.e.interceptor.ResponseInterceptor : [EnergyID API Request 962df856-1a8b-4e4e-84c8-7a51880d898a - /platform-energyid/manage/health] execution time: 0ms
2016-10-20 20:02:58.675 INFO 1 --- [http-nio-8080-exec-4] c.t.p.e.interceptor.ResponseInterceptor : [EnergyID API Request cd3e33f1-1087-47f6-91d0-17fbaed1fe9c - /platform-energyid/manage/health] execution time: -1ms
2016-10-20 20:03:19.830 INFO 1 --- [http-nio-8080-exec-5] c.t.p.e.interceptor.ResponseInterceptor : [EnergyID API Request f923c488-94cd-4e97-83d1-1990edf50902 - /platform-energyid/manage/metrics] execution time: 0ms
2016-10-20 20:03:34.461 INFO 1 --- [http-nio-8080-exec-6] c.t.p.energyid.service.Auth0Service : Resolved Auth0 Client Id: ****************************zjYN
2016-10-20 20:03:34.464 INFO 1 --- [http-nio-8080-exec-6] c.t.p.energyid.service.Auth0Service : Resolved Auth0 Client Secret: ************************************************************QJnt
2016-10-20 20:03:36.838 INFO 1 --- [http-nio-8080-exec-6] c.t.p.energyid.api.EnergyIdController : [2a460977-ac0a-4a2b-8cc5-d830165cd996] [rbelen+stg@tendrilinc.com] Energy ID Score: 4
2016-10-20 20:03:36.907 INFO 1 --- [http-nio-8080-exec-6] c.t.p.e.interceptor.ResponseInterceptor : [EnergyID API Request 2a460977-ac0a-4a2b-8cc5-d830165cd996 - /platform-energyid/user/auth0|574f69ad3747cab00d9aa550/survey] execution time: 2461ms
2016-10-20 20:03:41.445 INFO 1 --- [http-nio-8080-exec-7] c.t.p.energyid.service.Auth0Service : Resolved Auth0 Client Id: ****************************zjYN
2016-10-20 20:03:41.448 INFO 1 --- [http-nio-8080-exec-7] c.t.p.energyid.service.Auth0Service : Resolved Auth0 Client Secret: ************************************************************QJnt
© Rowell Belen
GET /flyway - Shows applied Flyway DB migrations
[
{
"type": "SQL",
"checksum": -1680589936,
"version": "1.0",
"description": "Create Tables",
"script": "V1_0__Create_Tables.sql",
"state": "SUCCESS",
"installedOn": 1476268731466,
"executionTime": 521
},
{
"type": "SQL",
"checksum": 44863635,
"version": "1.1",
"description": "Support Tenant Survey",
"script": "V1_1__Support_Tenant_Survey.sql",
"state": "SUCCESS",
"installedOn": 1476268733651,
"executionTime": 198
}
]
© Rowell Belen
Additional Endpoints...
— GET /beans
— Displays a complete list of all the Spring beans
— GET /dump
— Performs a thread dump
— GET /heapdump
— Returns a GZip compressed heap dump file
See Spring Docs for more...
© Rowell Belen
Securing Actuator Endpoints
© Rowell Belen
Configuration via application.properties
endpoints.enabled=true
endpoints.actuator.enabled=true
endpoints.autoconfig.enabled=false
endpoints.beans.enabled=true
endpoints.configprops.enabled=false
endpoints.docs.enabled=false
endpoints.dump.enabled=true
endpoints.env.enabled=true
endpoints.flyway.enabled=true
endpoints.health.enabled=true
endpoints.info.enabled=true
endpoints.jolokia.enabled=false
endpoints.liquibase.enabled=false
endpoints.logfile.enabled=true
endpoints.mappings.enabled=true
endpoints.metrics.enabled=true
endpoints.metrics.filter.enabled=false
endpoints.shutdown.enabled=false
endpoints.trace.enabled=true
© Rowell Belen
Spring Security
If Spring Security is detected in the project, Basic Auth
is auto-configured.
security.user.name=admin
security.user.password=secret
management.security.roles=SUPERUSER
See Spring Docs for more security options...
© Rowell Belen
/OUT
© Rowell Belen

More Related Content

What's hot

Introduction to RxJS
Introduction to RxJSIntroduction to RxJS
Introduction to RxJSBrainhub
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API07.pallav
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with SpringJoshua Long
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShellBoulos Dib
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introductionRasheed Waraich
 
Testing with JUnit 5 and Spring
Testing with JUnit 5 and SpringTesting with JUnit 5 and Spring
Testing with JUnit 5 and SpringVMware Tanzu
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introductionJonathan Holloway
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootJosué Neis
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!Jakub Kubrynski
 
Closures in Javascript
Closures in JavascriptClosures in Javascript
Closures in JavascriptDavid Semeria
 
Spring annotations notes
Spring annotations notesSpring annotations notes
Spring annotations notesVipul Singh
 
Angular and The Case for RxJS
Angular and The Case for RxJSAngular and The Case for RxJS
Angular and The Case for RxJSSandi Barr
 

What's hot (20)

spring-api-rest.pdf
spring-api-rest.pdfspring-api-rest.pdf
spring-api-rest.pdf
 
Introduction to RxJS
Introduction to RxJSIntroduction to RxJS
Introduction to RxJS
 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
 
Testing with JUnit 5 and Spring
Testing with JUnit 5 and SpringTesting with JUnit 5 and Spring
Testing with JUnit 5 and Spring
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring boot
Spring bootSpring boot
Spring boot
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
 
Spring boot
Spring bootSpring boot
Spring boot
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Closures in Javascript
Closures in JavascriptClosures in Javascript
Closures in Javascript
 
Spring annotations notes
Spring annotations notesSpring annotations notes
Spring annotations notes
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Angular and The Case for RxJS
Angular and The Case for RxJSAngular and The Case for RxJS
Angular and The Case for RxJS
 

Viewers also liked

Installation, Operation & Maintenance Instructions for Kinetrol Rotary Actuat...
Installation, Operation & Maintenance Instructions for Kinetrol Rotary Actuat...Installation, Operation & Maintenance Instructions for Kinetrol Rotary Actuat...
Installation, Operation & Maintenance Instructions for Kinetrol Rotary Actuat...Kinetrol USA
 
Spring boot for buidling microservices
Spring boot for buidling microservicesSpring boot for buidling microservices
Spring boot for buidling microservicesNilanjan Roy
 
Operations and Monitoring with Spring
Operations and Monitoring with SpringOperations and Monitoring with Spring
Operations and Monitoring with SpringEberhard Wolff
 
Spring IO - Spring Boot for DevOps
Spring IO - Spring Boot for DevOpsSpring IO - Spring Boot for DevOps
Spring IO - Spring Boot for DevOpsNicolas Fränkel
 
Http 완벽가이드(3장 http 메시지)
Http 완벽가이드(3장 http 메시지)Http 완벽가이드(3장 http 메시지)
Http 완벽가이드(3장 http 메시지)Choonghyun Yang
 
스프링 REST DOCS 따라해보기
스프링 REST DOCS 따라해보기스프링 REST DOCS 따라해보기
스프링 REST DOCS 따라해보기라한사 아
 
spring.io를 통해 배우는 spring 개발사례
spring.io를 통해 배우는 spring 개발사례spring.io를 통해 배우는 spring 개발사례
spring.io를 통해 배우는 spring 개발사례Daehwan Lee
 
Simplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring CloudSimplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring CloudRamnivas Laddad
 
Spring cloud for microservices architecture
Spring cloud for microservices architectureSpring cloud for microservices architecture
Spring cloud for microservices architectureIgor Khotin
 
Microservices Platforms - Which is Best?
Microservices Platforms - Which is Best?Microservices Platforms - Which is Best?
Microservices Platforms - Which is Best?Payara
 

Viewers also liked (12)

Spring boot actuator
Spring boot   actuatorSpring boot   actuator
Spring boot actuator
 
Installation, Operation & Maintenance Instructions for Kinetrol Rotary Actuat...
Installation, Operation & Maintenance Instructions for Kinetrol Rotary Actuat...Installation, Operation & Maintenance Instructions for Kinetrol Rotary Actuat...
Installation, Operation & Maintenance Instructions for Kinetrol Rotary Actuat...
 
Spring boot for buidling microservices
Spring boot for buidling microservicesSpring boot for buidling microservices
Spring boot for buidling microservices
 
Operations and Monitoring with Spring
Operations and Monitoring with SpringOperations and Monitoring with Spring
Operations and Monitoring with Spring
 
Spring IO - Spring Boot for DevOps
Spring IO - Spring Boot for DevOpsSpring IO - Spring Boot for DevOps
Spring IO - Spring Boot for DevOps
 
Http 완벽가이드(3장 http 메시지)
Http 완벽가이드(3장 http 메시지)Http 완벽가이드(3장 http 메시지)
Http 완벽가이드(3장 http 메시지)
 
스프링 REST DOCS 따라해보기
스프링 REST DOCS 따라해보기스프링 REST DOCS 따라해보기
스프링 REST DOCS 따라해보기
 
spring.io를 통해 배우는 spring 개발사례
spring.io를 통해 배우는 spring 개발사례spring.io를 통해 배우는 spring 개발사례
spring.io를 통해 배우는 spring 개발사례
 
Simplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring CloudSimplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring Cloud
 
Spring cloud for microservices architecture
Spring cloud for microservices architectureSpring cloud for microservices architecture
Spring cloud for microservices architecture
 
Spring Boot 소개
Spring Boot 소개Spring Boot 소개
Spring Boot 소개
 
Microservices Platforms - Which is Best?
Microservices Platforms - Which is Best?Microservices Platforms - Which is Best?
Microservices Platforms - Which is Best?
 

Similar to Spring Boot Actuator Features

dokumen.tips_spring-boot-actuator.pdf
dokumen.tips_spring-boot-actuator.pdfdokumen.tips_spring-boot-actuator.pdf
dokumen.tips_spring-boot-actuator.pdfAppster1
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
 
Mastering Spring Boot's Actuator with Madhura Bhave
Mastering Spring Boot's Actuator with Madhura BhaveMastering Spring Boot's Actuator with Madhura Bhave
Mastering Spring Boot's Actuator with Madhura BhaveVMware Tanzu
 
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...OdessaJS Conf
 
Building and deploying React applications
Building and deploying React applicationsBuilding and deploying React applications
Building and deploying React applicationsAstrails
 
Hands-On Lab: Improve large network visibility and operational efficiency wit...
Hands-On Lab: Improve large network visibility and operational efficiency wit...Hands-On Lab: Improve large network visibility and operational efficiency wit...
Hands-On Lab: Improve large network visibility and operational efficiency wit...CA Technologies
 
How Bitbucket Pipelines Loads Connect UI Assets Super-fast
How Bitbucket Pipelines Loads Connect UI Assets Super-fastHow Bitbucket Pipelines Loads Connect UI Assets Super-fast
How Bitbucket Pipelines Loads Connect UI Assets Super-fastAtlassian
 
Jlook web ui framework
Jlook web ui frameworkJlook web ui framework
Jlook web ui frameworkHongSeong Jeon
 
Web applications with Catalyst
Web applications with CatalystWeb applications with Catalyst
Web applications with Catalystsvilen.ivanov
 
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013Amazon Web Services
 
How to customize Spring Boot?
How to customize Spring Boot?How to customize Spring Boot?
How to customize Spring Boot?GilWon Oh
 
About BLE server profile
About BLE server profile About BLE server profile
About BLE server profile Lin Steven
 
SpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptxSpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptxSUFYAN SATTAR
 
HotPush with Ionic 2 and CodePush
HotPush with Ionic 2 and CodePushHotPush with Ionic 2 and CodePush
HotPush with Ionic 2 and CodePushEvan Schultz
 
First Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven DevelopmentFirst Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven DevelopmentNuvole
 
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdfdokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdfAppster1
 
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdfdokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdfAppster1
 
Projeto-web-services-Spring-Boot-JPA.pdf
Projeto-web-services-Spring-Boot-JPA.pdfProjeto-web-services-Spring-Boot-JPA.pdf
Projeto-web-services-Spring-Boot-JPA.pdfAdrianoSantos888423
 

Similar to Spring Boot Actuator Features (20)

dokumen.tips_spring-boot-actuator.pdf
dokumen.tips_spring-boot-actuator.pdfdokumen.tips_spring-boot-actuator.pdf
dokumen.tips_spring-boot-actuator.pdf
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Mastering Spring Boot's Actuator with Madhura Bhave
Mastering Spring Boot's Actuator with Madhura BhaveMastering Spring Boot's Actuator with Madhura Bhave
Mastering Spring Boot's Actuator with Madhura Bhave
 
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
 
Building and deploying React applications
Building and deploying React applicationsBuilding and deploying React applications
Building and deploying React applications
 
Hands-On Lab: Improve large network visibility and operational efficiency wit...
Hands-On Lab: Improve large network visibility and operational efficiency wit...Hands-On Lab: Improve large network visibility and operational efficiency wit...
Hands-On Lab: Improve large network visibility and operational efficiency wit...
 
How Bitbucket Pipelines Loads Connect UI Assets Super-fast
How Bitbucket Pipelines Loads Connect UI Assets Super-fastHow Bitbucket Pipelines Loads Connect UI Assets Super-fast
How Bitbucket Pipelines Loads Connect UI Assets Super-fast
 
Jlook web ui framework
Jlook web ui frameworkJlook web ui framework
Jlook web ui framework
 
Web applications with Catalyst
Web applications with CatalystWeb applications with Catalyst
Web applications with Catalyst
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
 
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
Zero to Sixty: AWS CloudFormation (DMG201) | AWS re:Invent 2013
 
How to customize Spring Boot?
How to customize Spring Boot?How to customize Spring Boot?
How to customize Spring Boot?
 
About BLE server profile
About BLE server profile About BLE server profile
About BLE server profile
 
SpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptxSpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptx
 
HotPush with Ionic 2 and CodePush
HotPush with Ionic 2 and CodePushHotPush with Ionic 2 and CodePush
HotPush with Ionic 2 and CodePush
 
First Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven DevelopmentFirst Steps in Drupal Code Driven Development
First Steps in Drupal Code Driven Development
 
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdfdokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
 
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdfdokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
 
AWS CodeDeploy
AWS CodeDeployAWS CodeDeploy
AWS CodeDeploy
 
Projeto-web-services-Spring-Boot-JPA.pdf
Projeto-web-services-Spring-Boot-JPA.pdfProjeto-web-services-Spring-Boot-JPA.pdf
Projeto-web-services-Spring-Boot-JPA.pdf
 

Recently uploaded

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 

Recently uploaded (20)

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 

Spring Boot Actuator Features

  • 2. Automatic auditing, health monitoring and metrics for Spring Boot Applications © Rowell Belen
  • 5. GET /health - Shows application health information { "status": "UP", "diskSpace": { "status": "UP", "total": 10724835328, "free": 9929453568, "threshold": 10485760 }, "db": { "status": "UP", "database": "PostgreSQL", "hello": 1 } } © Rowell Belen
  • 6. Custom Health Indicators import org.springframework.boot.actuate.health.Health; import org.springframework.boot.actuate.health.HealthIndicator; import org.springframework.stereotype.Component; @Component public class WeatherServiceHealthIndicator implements HealthIndicator { @Override public Health health() { int errorCode = checkWeatherService() if (errorCode != 0) { return Health.down().withDetail("Error Code", errorCode).build(); } return Health.up().build(); } } © Rowell Belen
  • 7. GET /metrics - Displays JVM & App Metrics { "mem": 440107, "mem.free": 250901, "processors": 2, "instance.uptime": 626420367, "uptime": 626441178, "systemload.average": 0.01, "heap.committed": 325632, "heap.init": 239616, "heap.used": 74730, "heap": 3387904, "nonheap.committed": 117344, "nonheap.init": 2496, "nonheap.used": 114476, "nonheap": 0, "threads.peak": 29, "threads.daemon": 20, "threads.totalStarted": 21004, "threads": 27, "classes": 13008, "classes.loaded": 13008, "classes.unloaded": 0, "gc.ps_scavenge.count": 111, "gc.ps_scavenge.time": 1263, "gc.ps_marksweep.count": 3, "gc.ps_marksweep.time": 807, "cache.surveys.size": 1 } © Rowell Belen
  • 8. GET /metrics - Displays JVM & App Metrics (continued..) { "gauge.response.platform-energyid.user.userId.score": 7, "gauge.response.platform-energyid.user.userId.survey": 10, "gauge.response.platform-energyid.manage.health": 3, "gauge.response.platform-energyid.survey": 3, "counter.status.200.platform-energyid.survey": 3, "counter.status.200.platform-energyid.manage.health": 10435, "counter.status.404.platform-energyid.user.userId.score": 36, "counter.status.404.star-star": 1, "counter.status.401.platform-energyid.user.userId.survey": 2, "counter.status.200.platform-energyid.user.userId.score": 4, "counter.status.200.platform-energyid.user.userId.survey": 1 } © Rowell Belen
  • 9. Record Custom Metrics import org.springframework.boot.actuate.metrics.CounterService; @Service public class EnergyScoreService { private final CounterService counterService; @Autowired public EnergyScoreService(CounterService counterService) { this.counterService = counterService; } public void getScore() { this.counterService.increment("platform.tendril.energyscore.invoked"); } } © Rowell Belen
  • 10. Export Actuator Metrics @Bean @ExportMetricWriter MetricWriter metricWriter() { return new DataDogStatsdMetricWriter(prefix, "com.datadog...", 8125); } @Bean @ExportMetricWriter MetricWriter metricWriter(MBeanExporter exporter) { return new JmxMetricWriter(exporter); } © Rowell Belen
  • 11. GET /info - Displays arbitrary application info { "git": { "commit": { "message": { "full": "[MH-780] Support/Expose Tenant Override Survey Questions" }, "time": 1476993093000, "id": "173ca32139d14ae383ec46c01fff66385850bfc7", "id.abbrev": "173ca32", "user": { "email": "rbelen@tendrilinc.com", "name": "Rowell Belen" } }, "branch": "HEAD" }, "build": { "version": "0.1.0", "artifact": "platform-energyid-api", "build": { "docker": "platform-energyid-api-0.1.0-70-173ca32" }, "name": "platform-energyid-api", "group": "com.tendril", "time": 1476993345000 } } © Rowell Belen
  • 12. GET /env - Exposes Application/Environment properties { "profiles": [ "dev" ], "server.ports": { "local.server.port": 8080 }, "systemEnvironment": { "PORT_8080": "31076", "MARATHON_APP_LABELS": "", "MARATHON_APP_RESOURCE_CPUS": "0.2", "MESOS_CONTAINER_NAME": "mesos-60025f2a-3e08-4558-bfa5-daef489a84eb-S49.296367df-cb80-4153-8365-af3fc5f535b3", "SPRING_PROFILES_ACTIVE": "dev", "HOST": "10.200.**.**", "MARATHON_APP_DOCKER_IMAGE": "*******.useast.tni01.com/platform-energyid-api-0.1.0-70-173ca32", "MARATHON_APP_RESOURCE_MEM": "2048.0", "MESOS_TASK_ID": "platform-energyid-api-dev.a38b9778-96ff-11e6-bc77-0e76f225482f", "MARATHON_APP_VERSION": "2016-10-20T19:58:58.461Z", "MESOS_SANDBOX": "/mnt/mesos/sandbox", "MARATHON_APP_ID": "/platform-energyid-api-dev", }, "applicationConfig: [classpath:/application-dev.properties]": { "spring.datasource.driver-class-name": "org.postgresql.Driver", "spring.datasource.username": "******", "spring.datasource.password": "******", "spring.datasource.url": "jdbc:postgresql://******.useast.tni01.com:5432/energyid", "app.env": "dev" } } © Rowell Belen
  • 13. GET /mappings - Displays a collated list of path mappings { "{[/platform-energyid/user/{userId}/survey],methods=[GET]}": { "bean": "requestMappingHandlerMapping", "method": "List<Answer> EnergyIdController.getAnswers(String)" }, "{[/platform-energyid/user/{userId}/score],methods=[GET]}": { "bean": "requestMappingHandlerMapping", "method": "public Score EnergyIdController.getUserScore(String)" }, "{[/platform-energyid/user/{userId}/survey],methods=[POST]}": { "bean": "requestMappingHandlerMapping", "method": "public EnergyIdScore EnergyIdController.saveAnswers(List<Answer>)" }, "{[/platform-energyid/tenant/{tenant}/survey],methods=[GET]}": { "bean": "requestMappingHandlerMapping", "method": "public Iterable<Survey> EnergyIdController.getSurvey(java.lang.String)" }, "{[/platform-energyid/survey],methods=[GET]}": { "bean": "requestMappingHandlerMapping", "method": "public Iterable<Survey> EnergyIdController.getSurvey()" } } © Rowell Belen
  • 14. GET /trace - Displays trace of request/response history { "timestamp": 1477616323315, "info": { "method": "GET", "path": "/platform-energyid/manage/health", "headers": { "request": { "host": "10.200.**.***:31***", "user-agent": "spray-can/1.3.2" }, "response": { "X-Application-Context": "application:dev:31542", "x-api-request-id": "9ec0746c-8e81-42fd-884d-885497958b9f", "x-duration": "0ms", "Content-Type": "application/json;charset=UTF-8", "Transfer-Encoding": "chunked", "Date": "Fri, 28 Oct 2016 00:58:43 GMT", "status": "200" } } } } © Rowell Belen
  • 15. GET /logfile - Returns the contents of the logfile 2016-10-20 19:59:16.297 INFO 1 --- [main] c.t.p.energyid.api.MainController : Starting MainController on 0ad70aa2483e with PID 1 (/app/platform-energyid-api-0.1.0.jar started by root in /app) 2016-10-20 19:59:16.384 INFO 1 --- [main] c.t.p.energyid.api.MainController : The following profiles are active: dev 2016-10-20 19:59:17.535 INFO 1 --- [main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@2957fcb0: startup date [Thu Oct 20 19:59:17 UTC 2016]; root of context hierarchy 2016-10-20 19:59:25.096 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cache.annotation.ProxyCachingConfiguration' of type [class org.springframework.cache.annotation.ProxyCachingConfiguration$$EnhancerBySpringCGLIB$$1ee60781] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2016-10-20 19:59:25.212 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration' of type [class org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration$$EnhancerBySpringCGLIB$$1359cc25] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2016-10-20 19:59:25.476 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration' of type [class org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$$EnhancerBySpringCGLIB$$4d68cd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2016-10-20 19:59:25.498 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'stringOrNumberMigrationVersionConverter' of type [class org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration$StringOrNumberToMigrationVersionConverter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2016-10-20 19:59:25.690 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'spring.cache-org.springframework.boot.autoconfigure.cache.CacheProperties' of type [class org.springframework.boot.autoconfigure.cache.CacheProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2016-10-20 19:59:25.733 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.cache.CacheManagerCustomizers' of type [class org.springframework.boot.autoconfigure.cache.CacheManagerCustomizers] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2016-10-20 19:59:25.755 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.cache.SimpleCacheConfiguration' of type [class org.springframework.boot.autoconfigure.cache.SimpleCacheConfiguration$$EnhancerBySpringCGLIB$$b4f53f06] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2016-10-20 19:59:25.820 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'cacheManager' of type [class org.springframework.cache.concurrent.ConcurrentMapCacheManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2016-10-20 19:59:25.822 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'cacheAutoConfigurationValidator' of type [class org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration$CacheManagerValidator] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2016-10-20 19:59:26.003 INFO 1 --- [main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$d5d3d163] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2016-10-20 19:59:28.332 INFO 1 --- [main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http) 2016-10-20 19:59:28.430 INFO 1 --- [main] o.apache.catalina.core.StandardService : Starting service Tomcat 2016-10-20 19:59:28.456 INFO 1 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.5 2016-10-20 19:59:28.842 INFO 1 --- [localhost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2016-10-20 19:59:28.842 INFO 1 --- [localhost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 11313 ms 2016-10-20 19:59:30.827 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/] 2016-10-20 19:59:30.832 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'webServlet' to [/h2-console/*] 2016-10-20 19:59:30.845 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'metricsFilter' to: [/*] 2016-10-20 19:59:30.847 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*] 2016-10-20 19:59:30.848 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*] 2016-10-20 19:59:30.848 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*] 2016-10-20 19:59:30.849 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*] 2016-10-20 19:59:30.855 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'webRequestLoggingFilter' to: [/*] 2016-10-20 19:59:30.856 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestLoggingFilter' to: [/*] 2016-10-20 19:59:30.856 INFO 1 --- [localhost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'applicationContextIdFilter' to: [/*] 2016-10-20 19:59:32.600 INFO 1 --- [main] o.f.core.internal.util.VersionPrinter : Flyway 4.0.3 by Boxfuse 2016-10-20 19:59:33.074 INFO 1 --- [main] o.f.c.i.dbsupport.DbSupportFactory : Database: jdbc:postgresql://adu-myhome-rds01.useast.tni01.com:5432/energyid (PostgreSQL 9.5) 2016-10-20 19:59:33.285 INFO 1 --- [main] o.f.core.internal.command.DbValidate : Successfully validated 3 migrations (execution time 00:00.048s) 2016-10-20 19:59:33.363 INFO 1 --- [main] o.f.core.internal.command.DbMigrate : Current version of schema "public": 1.2 2016-10-20 19:59:33.366 INFO 1 --- [main] o.f.core.internal.command.DbMigrate : Schema "public" is up to date. No migration necessary. 2016-10-20 19:59:33.763 INFO 1 --- [main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default' 2016-10-20 19:59:33.833 INFO 1 --- [main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [ name: default ...] 2016-10-20 19:59:34.162 INFO 1 --- [main] org.hibernate.Version : HHH000412: Hibernate Core {5.0.11.Final} 2016-10-20 19:59:34.170 INFO 1 --- [main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found 2016-10-20 19:59:34.178 INFO 1 --- [main] org.hibernate.cfg.Environment : HHH000021: Bytecode provider name : javassist 2016-10-20 19:59:34.398 INFO 1 --- [main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final} 2016-10-20 19:59:35.308 INFO 1 --- [main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL94Dialect 2016-10-20 19:59:36.951 INFO 1 --- [main] o.h.e.j.e.i.LobCreatorBuilderImpl : HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException 2016-10-20 19:59:36.965 INFO 1 --- [main] org.hibernate.type.BasicTypeRegistry : HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType@33308786 2016-10-20 19:59:38.550 INFO 1 --- [main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2016-10-20 19:59:44.692 INFO 1 --- [main] o.h.h.i.QueryTranslatorFactoryInitiator : HHH000397: Using ASTQueryTranslatorFactory 2016-10-20 19:59:45.169 INFO 1 --- [main] c.t.p.energyid.service.EnergyIdService : Score count: 10 2016-10-20 19:59:45.183 INFO 1 --- [main] c.t.p.energyid.service.EnergyIdService : Survey count: 10 2016-10-20 19:59:45.203 INFO 1 --- [main] c.t.p.energyid.service.EnergyIdService : Answer count: 97 2016-10-20 19:59:45.505 INFO 1 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 2016-10-20 19:59:45.564 INFO 1 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'asyncExecutor' 2016-10-20 19:59:47.067 INFO 1 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : jolokia: No access restrictor found, access to any MBean is allowed 2016-10-20 19:59:47.850 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@2957fcb0: startup date [Thu Oct 20 19:59:17 UTC 2016]; root of context hierarchy 2016-10-20 19:59:47.868 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Detected ResponseBodyAdvice bean in responseInterceptor 2016-10-20 19:59:48.165 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/platform-energyid/user/{userId}/survey],methods=[GET]}" onto public java.util.List<com.tendril.platform.energyid.persistence.entities.Answer> com.tendril.platform.energyid.api.EnergyIdController.getAnswers(java.lang.String) 2016-10-20 19:59:48.168 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/platform-energyid/user/{userId}/survey],methods=[POST]}" onto public com.tendril.platform.energyid.model.energyid.EnergyIdScore com.tendril.platform.energyid.api.EnergyIdController.saveAnswers(java.lang.String,java.util.List<com.tendril.platform.energyid.persistence.entities.Answer>) 2016-10-20 19:59:48.168 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/platform-energyid/user/{userId}/score],methods=[GET]}" onto public com.tendril.platform.energyid.persistence.entities.Score com.tendril.platform.energyid.api.EnergyIdController.getUserScore(java.lang.String) 2016-10-20 19:59:48.170 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/platform-energyid/tenant/{tenant}/survey],methods=[GET]}" onto public java.lang.Iterable<com.tendril.platform.energyid.persistence.entities.Survey> com.tendril.platform.energyid.api.EnergyIdController.getSurvey(java.lang.String) 2016-10-20 19:59:48.172 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/platform-energyid/survey],methods=[GET]}" onto public java.lang.Iterable<com.tendril.platform.energyid.persistence.entities.Survey> com.tendril.platform.energyid.api.EnergyIdController.getSurvey() 2016-10-20 19:59:48.180 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) 2016-10-20 19:59:48.189 INFO 1 --- [main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest) 2016-10-20 19:59:48.586 INFO 1 --- [main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2016-10-20 19:59:48.587 INFO 1 --- [main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2016-10-20 19:59:48.745 INFO 1 --- [main] .m.m.a.ExceptionHandlerExceptionResolver : Detected ResponseBodyAdvice implementation in responseInterceptor 2016-10-20 19:59:48.954 INFO 1 --- [main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2016-10-20 19:59:51.983 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/flyway || /platform-energyid/manage/flyway.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-10-20 19:59:51.990 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/env/{name:.*}],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String) 2016-10-20 19:59:51.991 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/env || /platform-energyid/manage/env.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-10-20 19:59:51.994 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/jolokia/**]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.actuate.endpoint.mvc.JolokiaMvcEndpoint.handle(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.lang.Exception 2016-10-20 19:59:51.997 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/autoconfig || /platform-energyid/manage/autoconfig.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-10-20 19:59:52.009 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/mappings || /platform-energyid/manage/mappings.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-10-20 19:59:52.011 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/trace || /platform-energyid/manage/trace.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-10-20 19:59:52.012 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/health || /platform-energyid/manage/health.json],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(java.security.Principal) 2016-10-20 19:59:52.014 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/metrics/{name:.*}],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String) 2016-10-20 19:59:52.015 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/metrics || /platform-energyid/manage/metrics.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-10-20 19:59:52.027 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/beans || /platform-energyid/manage/beans.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-10-20 19:59:52.031 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/dump || /platform-energyid/manage/dump.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-10-20 19:59:52.032 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/heapdump || /platform-energyid/manage/heapdump.json],methods=[GET],produces=[application/octet-stream]}" onto public void org.springframework.boot.actuate.endpoint.mvc.HeapdumpMvcEndpoint.invoke(boolean,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.io.IOException,javax.servlet.ServletException 2016-10-20 19:59:52.037 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/info || /platform-energyid/manage/info.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-10-20 19:59:52.041 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/logfile || /platform-energyid/manage/logfile.json],methods=[GET || HEAD]}" onto public void org.springframework.boot.actuate.endpoint.mvc.LogFileMvcEndpoint.invoke(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws javax.servlet.ServletException,java.io.IOException 2016-10-20 19:59:52.052 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/shutdown || /platform-energyid/manage/shutdown.json],methods=[POST]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.ShutdownMvcEndpoint.invoke() 2016-10-20 19:59:52.054 INFO 1 --- [main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/platform-energyid/manage/configprops || /platform-energyid/manage/configprops.json],methods=[GET],produces=[application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke() 2016-10-20 19:59:54.581 INFO 1 --- [main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup 2016-10-20 19:59:54.629 INFO 1 --- [main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0 2016-10-20 19:59:55.277 INFO 1 --- [main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http) 2016-10-20 19:59:55.295 INFO 1 --- [main] c.t.p.energyid.api.MainController : Started MainController in 40.573 seconds (JVM running for 42.125) 2016-10-20 19:59:58.773 INFO 1 --- [http-nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring FrameworkServlet 'dispatcherServlet' 2016-10-20 19:59:58.773 INFO 1 --- [http-nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization started 2016-10-20 19:59:58.844 INFO 1 --- [http-nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization completed in 70 ms 2016-10-20 19:59:59.231 INFO 1 --- [http-nio-8080-exec-1] c.t.p.e.interceptor.ResponseInterceptor : [EnergyID API Request b8f299e3-92e1-4812-b498-93471204c2eb - /platform-energyid/manage/health] execution time: -19ms 2016-10-20 20:00:58.626 INFO 1 --- [http-nio-8080-exec-2] c.t.p.e.interceptor.ResponseInterceptor : [EnergyID API Request 940359b0-1f89-4616-8c97-1db78e4d9419 - /platform-energyid/manage/health] execution time: -1ms 2016-10-20 20:01:58.642 INFO 1 --- [http-nio-8080-exec-3] c.t.p.e.interceptor.ResponseInterceptor : [EnergyID API Request 962df856-1a8b-4e4e-84c8-7a51880d898a - /platform-energyid/manage/health] execution time: 0ms 2016-10-20 20:02:58.675 INFO 1 --- [http-nio-8080-exec-4] c.t.p.e.interceptor.ResponseInterceptor : [EnergyID API Request cd3e33f1-1087-47f6-91d0-17fbaed1fe9c - /platform-energyid/manage/health] execution time: -1ms 2016-10-20 20:03:19.830 INFO 1 --- [http-nio-8080-exec-5] c.t.p.e.interceptor.ResponseInterceptor : [EnergyID API Request f923c488-94cd-4e97-83d1-1990edf50902 - /platform-energyid/manage/metrics] execution time: 0ms 2016-10-20 20:03:34.461 INFO 1 --- [http-nio-8080-exec-6] c.t.p.energyid.service.Auth0Service : Resolved Auth0 Client Id: ****************************zjYN 2016-10-20 20:03:34.464 INFO 1 --- [http-nio-8080-exec-6] c.t.p.energyid.service.Auth0Service : Resolved Auth0 Client Secret: ************************************************************QJnt 2016-10-20 20:03:36.838 INFO 1 --- [http-nio-8080-exec-6] c.t.p.energyid.api.EnergyIdController : [2a460977-ac0a-4a2b-8cc5-d830165cd996] [rbelen+stg@tendrilinc.com] Energy ID Score: 4 2016-10-20 20:03:36.907 INFO 1 --- [http-nio-8080-exec-6] c.t.p.e.interceptor.ResponseInterceptor : [EnergyID API Request 2a460977-ac0a-4a2b-8cc5-d830165cd996 - /platform-energyid/user/auth0|574f69ad3747cab00d9aa550/survey] execution time: 2461ms 2016-10-20 20:03:41.445 INFO 1 --- [http-nio-8080-exec-7] c.t.p.energyid.service.Auth0Service : Resolved Auth0 Client Id: ****************************zjYN 2016-10-20 20:03:41.448 INFO 1 --- [http-nio-8080-exec-7] c.t.p.energyid.service.Auth0Service : Resolved Auth0 Client Secret: ************************************************************QJnt © Rowell Belen
  • 16. GET /flyway - Shows applied Flyway DB migrations [ { "type": "SQL", "checksum": -1680589936, "version": "1.0", "description": "Create Tables", "script": "V1_0__Create_Tables.sql", "state": "SUCCESS", "installedOn": 1476268731466, "executionTime": 521 }, { "type": "SQL", "checksum": 44863635, "version": "1.1", "description": "Support Tenant Survey", "script": "V1_1__Support_Tenant_Survey.sql", "state": "SUCCESS", "installedOn": 1476268733651, "executionTime": 198 } ] © Rowell Belen
  • 17. Additional Endpoints... — GET /beans — Displays a complete list of all the Spring beans — GET /dump — Performs a thread dump — GET /heapdump — Returns a GZip compressed heap dump file See Spring Docs for more... © Rowell Belen
  • 20. Spring Security If Spring Security is detected in the project, Basic Auth is auto-configured. security.user.name=admin security.user.password=secret management.security.roles=SUPERUSER See Spring Docs for more security options... © Rowell Belen