All Downloads are FREE. Search and download functionalities are using the official Maven repository.

JavaSpring.libraries.spring-boot.openapi2SpringBoot.mustache Maven / Gradle / Ivy

There is a newer version: 7.9.0
Show newest version
package {{basePackage}};

{{#openApiNullable}}
import com.fasterxml.jackson.databind.Module;
import org.openapitools.jackson.nullable.JsonNullableModule;
{{/openApiNullable}}
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.context.annotation.FullyQualifiedAnnotationBeanNameGenerator;

@SpringBootApplication(
    nameGenerator = FullyQualifiedAnnotationBeanNameGenerator.class
)
@ComponentScan(
    basePackages = {"{{basePackage}}", "{{apiPackage}}" , "{{configPackage}}"},
    nameGenerator = FullyQualifiedAnnotationBeanNameGenerator.class
)
public class OpenApiGeneratorApplication {

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

{{#openApiNullable}}
    @Bean(name = "{{basePackage}}.OpenApiGeneratorApplication.jsonNullableModule")
    public Module jsonNullableModule() {
        return new JsonNullableModule();
    }
{{/openApiNullable}}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy