Skip to content

Commit

Permalink
Enable CDS
Browse files Browse the repository at this point in the history
  • Loading branch information
making committed Dec 5, 2024
1 parent f276ebe commit 6276eb4
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
28 changes: 28 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,34 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build-info</goal>
</goals>
</execution>
</executions>
<configuration>
<layers>
<enabled>true</enabled>
</layers>
<additionalProperties>
<spring.boot.version>${project.parent.version}
</spring.boot.version>
<spring.framework.version>${spring-framework.version}
</spring.framework.version>
<spring.security.version>${spring-security.version}
</spring.security.version>
</additionalProperties>
<image>
<env>
<BP_OCI_SOURCE>https://github.com/${env.GITHUB_REPOSITORY}</BP_OCI_SOURCE>
<BP_OCI_REVISION>${env.GITHUB_SHA}</BP_OCI_REVISION>
<BP_JVM_CDS_ENABLED>true</BP_JVM_CDS_ENABLED>
<CDS_TRAINING_JAVA_TOOL_OPTIONS>-Dspring.flyway.enabled=false -Dspring.jpa.properties.hibernate.boot.allow_jdbc_metadata_access=false -Dspring.jpa.hibernate.ddl-auto=none -Dspring.autoconfigure.exclude=org.springframework.modulith.events.jdbc.JdbcEventPublicationAutoConfiguration</CDS_TRAINING_JAVA_TOOL_OPTIONS>
</env>
</image>
</configuration>
</plugin>
<plugin>
<groupId>io.spring.javaformat</groupId>
Expand Down
13 changes: 13 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,29 @@ management.endpoints.web.exposure.include=info,health,prometheus,sbom
management.info.env.enabled=true
management.info.java.enabled=true
management.info.os.enabled=true
management.metrics.distribution.percentiles-histogram.http.client.requests=true
management.metrics.distribution.percentiles-histogram.http.server.requests=true
management.observations.enable.spring.security=false
management.opentelemetry.resource-attributes.git.commit.id.abbrev=${git.commit.id.abbrev:N/A}
management.opentelemetry.resource-attributes.spring.boot.version=${build.spring.boot.version:N/A}
management.opentelemetry.resource-attributes.spring.framework.version=${build.spring.framework.version:N/A}
management.tracing.sampling.probability=1.0
management.zipkin.tracing.endpoint=http://localhost:9411/v1/traces
server.error.include-message=always
server.http2.enabled=true
server.port=8085
server.servlet.session.timeout=10m
spring.application.name=comment-api
spring.config.import=optional:classpath:git.properties,optional:classpath:META-INF/build-info.properties
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.hikari.maximum-pool-size=16
spring.datasource.hikari.minimum-idle=4
spring.datasource.password=comment
spring.datasource.url=jdbc:postgresql://localhost:5432/comment
spring.datasource.username=comment
spring.docker.compose.enabled=true
spring.docker.compose.lifecycle-management=start_only
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=validate
spring.jpa.open-in-view=false
spring.security.oauth2.client.provider.google.issuer-uri=https://accounts.google.com
Expand Down

0 comments on commit 6276eb4

Please sign in to comment.