This library provides common conventions for ContentGrid Spring Boot applications.
This library is published for Spring Boot 3 and 4. When depending on this library, you need to select the correct variant.
dependencies {
implementation('com.contentgrid.common:contentgrid-common-spring-boot-starter') {
capabilities {
requireFeature('spring-boot-4')
}
}
}Allows some actuator endpoints through spring-security.
- All endpoints are accessible when accessed from the loopback interface
- Publicly exposed endpoints (
/actuator/health&/actuator/info) are always made accessible - Privately exposed endpoints (
/actuator/metrics&/actuator/prometheus) are made accessible when the management server runs on a separate port
Allow configuring multiple trusted JWT issuers that will all be trusted.
The configuration property contentgrid.security.oauth2.trusted-jwt-issuers can be set to a list of JWT issuer URIs.
The configuration automatically backs-away when a SecurityFilterChain is configured.
This is a multi-value alternative to spring.security.oauth2.resourceserver.jwt.issuer-uri.
The default of spring is to accidentally send a HTTP 200 OK response when a connection reset occurs, even when the connection reset is due to a dependency that is called by the server (not only when the client resets the connection).
We patch this to return a proper HTTP 500 instead when we are able to.
When using flyway with PostgreSQL, transactional locking is disabled.
This is to be compatible with CREATE INDEX CONCURRENTLY and other non-transactional statements,
that don't work together with transactional locking.