Skip to content

Common dependencies and code for microservices at Hi!t-Consulting

License

Notifications You must be signed in to change notification settings

hiit-consulting-fr/ms-common

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ms-common

build GitHub GitHub release (latest SemVer)

Common dependencies and code for microservices at Hi!t-Consulting

Capabilities

Request Logging

The RequestLoggingFilter logs outgoing responses. It logs the following information:

200 | 12.94 ms | GET /api/v1/user/me
(1)     (2)       (3)         
  1. HTTP status code
  2. Response time in milliseconds
  3. HTTP method and path

Cache Control header

The CacheAnnotationInterceptor can add the Cache-Control header to responses.

To use it, annotate a controller method with @CacheControl and specify the maxAge in seconds.

@CacheControl(maxAge = 60)
@GetMapping
public String get() {
  return "Hello";
}