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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#
# 🎯 Version Management
#
ARG CORRETTO_VERSION="21-alpine3.17"
ARG CORRETTO_SHA="6ed399441760d860717318db95fc50846bd0173145ec728733e69b782ead78e4"
ARG CORRETTO_VERSION="21-alpine3.20"
ARG CORRETTO_SHA="8b16834e7fabfc62d4c8faa22de5df97f99627f148058d52718054aaa4ea3674"
ARG GRADLE_VERSION="8.10.2"
ARG GRADLE_DOWNLOAD_SHA256="31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26"
ARG APPINSIGHTS_VERSION="3.5.2"
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ Here is a quick overview of the files and directories included in this repositor
```plaintext
.
├── .github/ # GitHub configuration files
├── openapi/ # OpenAPI specification files
├── gradle/ # Gradle wrapper files
├── helm/ # Helm charts for Kubernetes deployments
├── openapi/ # OpenAPI specification files
├── src/ # Source code for the Java application
│ ├── main/
│ └── test/
├── build.gradle.kts # Gradle build file
├── settings.gradle.kts # Gradle settings file
├── Dockerfile # Docker build file
├── README.md # Project documentation
├── settings.gradle.kts # Gradle settings file
└── .gitignore # Git ignore rules
```

Expand All @@ -35,7 +36,7 @@ Here is a quick overview of the files and directories included in this repositor

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

### ☕ Java
- Example Java application structure with a simple `HelloWorld` class.
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ configure<SourceSetContainer> {
}

springBoot {
mainClass.value("it.gov.pagopa.payhub.template.payments.java.repository.PayhubApplication")
mainClass.value("it.gov.pagopa.template.TemplateApplication")
}

openApiGenerate {
generatorName.set("spring")
inputSpec.set("$rootDir/openapi/template-payments-java-repository.openapi.yaml")
outputDir.set("$projectDir/build/generated")
apiPackage.set("it.gov.pagopa.payhub.controller.generated")
modelPackage.set("it.gov.pagopa.payhub.model.generated")
apiPackage.set("it.gov.pagopa.template.controller.generated")
modelPackage.set("it.gov.pagopa.template.model.generated")
configOptions.set(mapOf(
"dateLibrary" to "java8",
"requestMappingMode" to "api_interface",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package it.gov.pagopa.template;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class PayhubApplication {
public class TemplateApplication {

public static void main(String[] args) {
SpringApplication.run(PayhubApplication.class, args);
SpringApplication.run(TemplateApplication.class, args);
}

}
35 changes: 35 additions & 0 deletions src/main/java/it/gov/pagopa/template/config/SwaggerConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package it.gov.pagopa.template.config;

import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
* The Class SwaggerConfig.
*/
@Configuration
public class SwaggerConfig {

/** The title. */
@Value("${swagger.title:${spring.application.name}}")
private String title;

/** The description. */
@Value("${swagger.description:Api and Models}")
private String description;

/** The version. */
@Value("${swagger.version:${spring.application.version}}")
private String version;

@Bean
public OpenAPI customOpenAPI() {
return new OpenAPI().components(new Components()).info(new Info()
.title(title)
.description(description)
.version(version));
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package utils;
package it.gov.pagopa.template.utils;

public class Calculator {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package utils;
package it.gov.pagopa.template.utils;

import static org.junit.jupiter.api.Assertions.*;
import static org.junit.jupiter.api.Assertions.assertEquals;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
Expand Down
Loading