Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/config/trivy.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
db:
repository: "public.ecr.aws/aquasecurity/trivy-db:2"
java-repository: "public.ecr.aws/aquasecurity/trivy-java-db:1"
java-repository: "public.ecr.aws/aquasecurity/trivy-java-db:1"
2 changes: 1 addition & 1 deletion .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ jobs:
CVE_CRITICAL: ${{needs.BuildAndScan.outputs.CVE_CRITICAL}}
CVE_HIGH: ${{needs.BuildAndScan.outputs.CVE_HIGH}}
CVE_MEDIUM: ${{needs.BuildAndScan.outputs.CVE_MEDIUM}}
secrets: inherit
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/send-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,56 @@ Here is a quick overview of the files and directories included in this repositor
## 🚀 Features

### 📜 OpenAPI

- Example OpenAPI specification file (`template-payments-java-repository.openapi.yaml`) to document your RESTful APIs.
- Compatible with tools like Swagger and Postman.

### ⚙️ Helm

- Template Helm charts for deploying your Java application on Kubernetes.
- Includes `values.yaml` for parameter configuration and pre-defined deployment manifests.

### 🔧 Gradle

- `build.gradle` file with dependencies and plugins for building, testing, and running your Java application.
- Compatible with Java 21+.

### ☕ Java

- Example Java application structure with a simple `HelloWorld` class.

### ✅ JUnit

- Example JUnit test cases under the `test/` directory to help you get started with unit testing.

---

## 🛠️ Getting Started

### Prerequisites

Ensure the following tools are installed on your machine:

1. **Java 21+**
2. **Gradle** (or use the Gradle wrapper included in the repository)
3. **Docker** (for Helm-related tasks, optional)

### Building & Run

#### Build

```sh
./gradlew clean build
```

#### Run local

```sh
./gradlew bootRun
```

#### Write Locks

```sh
./gradlew dependencies --write-locks
```
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("io.micrometer:micrometer-tracing-bridge-otel:$micrometerVersion")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:$springDocOpenApiVersion")
implementation("io.micrometer:micrometer-tracing-bridge-otel:$micrometerVersion")
implementation("io.micrometer:micrometer-registry-prometheus")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
implementation("org.openapitools:jackson-databind-nullable:$openApiToolsVersion")

Expand Down
5 changes: 5 additions & 0 deletions gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ io.micrometer:micrometer-commons:1.14.2=compileClasspath
io.micrometer:micrometer-core:1.14.2=compileClasspath
io.micrometer:micrometer-jakarta9:1.14.2=compileClasspath
io.micrometer:micrometer-observation:1.14.2=compileClasspath
io.micrometer:micrometer-registry-prometheus:1.14.2=compileClasspath
io.micrometer:micrometer-tracing-bridge-otel:1.4.1=compileClasspath
io.micrometer:micrometer-tracing:1.4.1=compileClasspath
io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-incubator:2.9.0-alpha=compileClasspath
Expand All @@ -30,6 +31,10 @@ io.opentelemetry:opentelemetry-sdk-logs:1.43.0=compileClasspath
io.opentelemetry:opentelemetry-sdk-metrics:1.43.0=compileClasspath
io.opentelemetry:opentelemetry-sdk-trace:1.43.0=compileClasspath
io.opentelemetry:opentelemetry-sdk:1.43.0=compileClasspath
io.prometheus:prometheus-metrics-config:1.3.5=compileClasspath
io.prometheus:prometheus-metrics-core:1.3.5=compileClasspath
io.prometheus:prometheus-metrics-model:1.3.5=compileClasspath
io.prometheus:prometheus-metrics-tracer-common:1.3.5=compileClasspath
io.swagger.core.v3:swagger-annotations-jakarta:2.2.25=compileClasspath
io.swagger.core.v3:swagger-core-jakarta:2.2.25=compileClasspath
io.swagger.core.v3:swagger-models-jakarta:2.2.25=compileClasspath
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
33 changes: 26 additions & 7 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
spring:
application:
name: ${artifactId}
version: ${version}
name: ${artifactId}
version: ${version}
jmx.enabled: true
threads:
virtual:
enabled: true
management:
endpoints:
web:
exposure:
include: health, info, prometheus, metrics
base-path: /actuator
endpoint:
health:
probes.enabled: true
group:
readiness.include: "*"
liveness.include: livenessState,diskSpace,ping
endpoints:
jmx:
exposure.include: "*"
web:
exposure.include: info, health
prometheus:
enabled: true
metrics:
tags:
application: ${artifactId}
export:
prometheus:
enabled: true
step: 1m
descriptions: true
enable:
jvm: true
process: true
system: true
http: true
logback: true
app:
Loading