Package io.micronaut.starter.feature
Interface Feature
- All Superinterfaces:
io.micronaut.core.naming.Described
,io.micronaut.core.naming.Named
,io.micronaut.core.order.Ordered
- All Known Subinterfaces:
AgoraPulseFeature
,ApplicationFeature
,AwsApiFeature
,AwsFeature
,AwsLambdaEventFeature
,BuildFeature
,BuildPluginFeature
,CacheFeature
,CamundaCommunityFeature
,ChatBotsFeature
,CloudObjectStorageFeature
,CodeContributingFeature
,CommunityFeature
,ConfigurationFeature
,ContributingInterceptUrlMapFeature
,ContributingStaticResources
,CpuArchitecture
,DatabaseDriverConfigurationFeature
,DataDocumentFeature
,DataFeature
,DefaultConfigurationFeature
,DefaultFeature
,DiscoveryFeature
,DistributedConfigFeature
,EclipseStoreFeature
,FunctionFeature
,GradleSpecificFeature
,GroovyApplicationFeature
,GroovyModuleFeature
,HandlerClassFeature
,HttpClientFeature
,InfrastructureAsCodeFeature
,JavaApplicationFeature
,JmsFeature
,JpaFeature
,JsonFeature
,JunitCompanionFeature
,KotlinApplicationFeature
,KotlinSpecificFeature
,KotlinSupportFeature
,KotlinSymbolProcessingFeature
,Langchain4jEmbeddedStore
,Langchain4jFeature
,Langchain4jLanguageModel
,LanguageFeature
,LanguageSpecificFeature
,LoggingFeature
,MavenSpecificFeature
,MessagingFeature
,MicrometerRegistryFeature
,MicronautCommunityFeature
,MicroStreamFeature
,MigrationFeature
,MinJdkFeature
,MockingFeature
,MqttFeature
,MultiProjectFeature
,ObjectStorageFeature
,OneOfFeature
,OpenTelemetryFeature
,ParentPomFeature
,PicocliTestFeature
,R2dbcFeature
,ReactiveFeature
,ReactiveHttpClientFeature
,ReloadingFeature
,RequireEagerSingletonInitializationFeature
,RequireKaptFeature
,RequiresMavenLocal
,RequiresRepository
,SerializationFeature
,ServerFeature
,SharedTestResourceFeature
,TestFeature
,ThirdPartyLibraryFeature
,ThirdPartyServerFeature
,TracingFeature
,ValidationFeature
,ViewFeature
- All Known Implementing Classes:
AbstractAzureContainerInstanceWorkflow
,AbstractAzureFunction
,AbstractCloudRunWorkflow
,AbstractDekorateFeature
,AbstractDekoratePlatformFeature
,AbstractDekorateServiceFeature
,AbstractDockerRegistryWorkflow
,AbstractFunctionFeature
,AbstractGoogleCloudFunction
,AbstractJmsFeature
,AbstractMicronautServerFeature
,AbstractOpenTelemetry
,AbstractOracleFunctionsWorkflow
,AbstractServletFeature
,Acme
,ActiveMqArtemis
,ActiveMqClassic
,AmazonApiGateway
,AmazonApiGatewayHttp
,AmazonCloudWatchLogging
,AmazonCognito
,AmazonSesEmailFeature
,AnnotationApi
,AnthropicLangchain4jLanguageModel
,AOP
,ApiGatewayV2AwsLambdaHandlerProvider
,AppName
,AppOptics
,Archaius
,Arm
,Asciidoctor
,AssertJ
,Atlas
,Awaitility
,AwsAlexa
,AWSCiWorkflowFeature
,AwsLambda
,AwsLambdaCustomRuntime
,AwsLambdaEventFunctionFeature
,AwsLambdaEventsSerde
,AwsLambdaRelatedFeature
,AwsLambdaS3EventNotification
,AwsLambdaScheduledEvent
,AwsLambdaSnapstart
,AwsParameterStore
,AwsSecretsManager
,AwsV2Sdk
,AzureContainerInstanceGraalWorkflow
,AzureContainerInstanceJavaWorkflow
,AzureCosmosDbFeature
,AzureHttpFunction
,AzureKeyVaultFeature
,AzureLangchain4jLanguageModel
,AzureLogging
,AzureMonitor
,AzureRawFunction
,BasecampAwsChatBot
,BasecampAzureChatBot
,BasecampGcpChatBot
,BasecampHttpChatBot
,BedrockLangchain4jLanguageModel
,Buildless
,Caffeine
,Cassandra
,Cdk
,CdkFeature
,ChatBots
,CIWorkflowFeature
,CloudTrace
,CloudWatch
,Coherence
,CoherenceData
,CoherenceDistributedConfiguration
,CoherenceFeature
,CoherenceGrpcClient
,CoherenceSessionStore
,Config4k
,Console
,Consul
,ControlPanel
,Core
,Crac
,Data
,DataAzureCosmosFeature
,DatabaseDriverFeature
,DataDog
,DataHibernateReactive
,DataJdbc
,DataJpa
,DataMongo
,DataMongoFeature
,DataMongoReactive
,DataR2dbc
,DataSpringJdbcFeature
,DatetimeGroovyModule
,DateUtilGroovyModule
,Dbcp
,DefaultAwsLambdaHandlerProvider
,DekorateHalkyon
,DekorateJaeger
,DekorateKnative
,DekorateKubernetes
,DekorateOpenshift
,DekoratePrometheus
,DekorateServiceCatalog
,DiscoveryClient
,DiscoveryConsul
,DiscoveryCore
,DiscoveryKubernetes
,DistributedConfigConsul
,DockerRegistryWorkflow
,DynamoDb
,Dynatrace
,EaseTestingFeature
,EclipseStore
,EclipseStoreRest
,EHCache
,Elastic
,Elasticsearch
,ElasticSearchLangchain4jEmbeddedStore
,EnforcerPlugin
,Eureka
,ExternalWorker
,Flyway
,Freemarker
,FunctionAwsLambdaHandlerProvider
,Ganglia
,GinqGroovyModule
,GithubCiWorkflowFeature
,GitHubWorkflowFeature
,GitlabCiWorkflowFeature
,GoogleAiGeminiLangchain4jLanguageModel
,GoogleCloudCiWorkflowFeature
,GoogleCloudEventsFunction
,GoogleCloudFunction
,GoogleCloudRawFunction
,GoogleCloudRunGraalWorkflow
,GoogleCloudRunJavaWorkflow
,GoogleLogging
,GoogleSecretManager
,Graalpy
,GraalVM
,GraalVMDockerRegistryWorkflow
,Gradle
,GradleEnterprise
,Graphite
,GraphQL
,Groovy
,GroovyApplication
,GroovyMavenPlusPlugin
,Grpc
,GrpcRandomPort
,GruHttp
,H2
,Hamcrest
,Handlebars
,Hazelcast
,HibernateJpa
,HibernateJpaModelgen
,HibernateReactiveFeature
,HibernateReactiveJpa
,HibernateValidator
,Hikari
,HttpClient
,HttpClientJdk
,HttpClientTest
,HttpPoja
,HttpSession
,HuggingFaceLangchain4jLanguageModel
,Humio
,Hystrix
,Infinispan
,Influx
,JacksonDatabindFeature
,JacksonXml
,Jaeger
,JAsyncSQLFeature
,Java
,JavaApplication
,JavaGradlePlugin
,JavamailFeature
,JaxRs
,JaxRsSecurity
,JdbcFeature
,JdbiFeature
,Jetty
,Jib
,JmsCore
,Jmx
,Jmx
,JobRunrFeature
,Jooq
,Jrebel
,JsonGroovyModule
,JsonPath
,JsonSchemaFeature
,JsonSchemaValidationFeature
,JsonSmart
,JTE
,Junit
,JunitParams
,JunitPlatformSuiteEngine
,Kafka
,KafkaStreams
,Kairos
,Kapt
,Knative
,KoTest
,Kotlin
,KotlinApplication
,KotlinExtensionFunctions
,KotlinSymbolProcessing
,Ktor
,Kubernetes
,KubernetesClient
,KubernetesConfig
,KubernetesInformer
,KubernetesReactorClient
,KubernetesRxJava2Client
,LambdaFunctionUrl
,Liquibase
,LiquibaseSlf4j
,LocalStack
,Log4j2
,Logback
,MailjetEmailFeature
,Management
,MariaDB
,Maven
,MicrometerAnnotations
,MicrometerFeature
,MicrometerObservation
,MicrometerObservationHttp
,MicronautAot
,MicronautBuildPlugin
,MicronautGradleEnterprise
,MicronautGuice
,MicronautHttpValidation
,MicronautRestAssured
,MicronautValidationFeature
,MicroStream
,MicroStreamCache
,MicroStreamRest
,MistralAiLangchain4jLanguageModel
,Mockito
,Mockk
,MockServerClient
,MongoDbLangchain4jEmbeddedStore
,MongoFeature
,MongoReactive
,MongoSync
,Mqtt
,MqttHiveMq
,MqttV3
,Multitenancy
,MySQL
,MySQLCompatibleFeature
,Nats
,Neo4jBolt
,Neo4jLangchain4jEmbeddedStore
,Netty
,NewRelic
,ObjectStorageAws
,ObjectStorageAzure
,ObjectStorageGcp
,ObjectStorageLocal
,ObjectStorageOracleCloud
,OCICiWorkflowFeature
,OllamaLangchain4jLanguageModel
,OpenAiLangchain4jLanguageModel
,OpenApi
,OpenApiAdoc
,OpenApiExplorer
,OpenRewrite
,OpenSearchAmazon
,OpenSearchFeature
,OpenSearchHttpClient5
,OpenSearchLangchain4jEmbeddedStore
,OpenSearchRestClient
,OpenTelemetry
,OpenTelemetryAnnotations
,OpenTelemetryExporterFeature
,OpenTelemetryExporterGoogleCloudTrace
,OpenTelemetryExporterJaeger
,OpenTelemetryExporterLogging
,OpenTelemetryExporterOtlp
,OpenTelemetryExporterZipkin
,OpenTelemetryGoogleCloudTrace
,OpenTelemetryGrpc
,OpenTelemetryHttp
,OpenTelemetryJaeger
,OpenTelemetryXray
,OpenTelemetryZipkin
,Oracle
,OracleAdvancedQueuing
,OracleCloud
,OracleCloudAutonomousDatabase
,OracleCloudLogging
,OracleCloudMicronautNettyClient
,OracleCloudSdk
,OracleCloudVault
,OracleFunction
,OracleFunctionsGraalWorkflow
,OracleFunctionsJavaWorkflow
,OracleLangchain4jEmbeddedStore
,OracleRawFunction
,Pebble
,Permissions
,PgVectorLangchain4jEmbeddedStore
,Picocli
,PicocliGroovyApplication
,PicocliJavaApplication
,PicocliJunit
,PicocliKoTest
,PicocliKotlinApplication
,PicocliSpock
,Platform7
,PostgreSQL
,PostmarkEmailFeature
,ProblemJson
,ProjectLombok
,Prometheus
,PrometheusPushGateway
,Properties
,PubSub
,QdrantLangchain4jEmbeddedStore
,R2dbc
,RabbitMQ
,RandomPort
,RapiDoc
,React
,Reactor
,ReactorHttpClient
,Readme
,RedisLettuce
,Redoc
,Retry
,Ribbon
,Rocker
,Rss
,RssItunes
,RxJava1
,RxJava2
,RxJava2HttpClient
,RxJava2HttpServerNetty
,RxJava3
,RxJava3HttpClient
,Security
,SecurityAnnotations
,SecurityCsrf
,SecurityFeature
,SecurityJWT
,SecurityLdap
,SecurityOAuth2
,SecurityOAuth2Feature
,SecuritySession
,SendGridEmailFeature
,SerializationBsonFeature
,SerializationJacksonFeature
,SerializationJsonpFeature
,ShadePlugin
,Signalfx
,SimpleLogging
,Slack
,Slf4jJulBridge
,Slf4jSimpleLogger
,SourcegenJava
,Soy
,Spock
,Spring
,SpringBoot
,SpringDataJdbc
,SpringDataJpa
,SpringFeature
,SpringWeb
,SqlGroovyModule
,SQLServer
,SQS
,Stackdriver
,StaticResourceFeature
,Statsd
,SwaggerUI
,TelegramAwsChatBot
,TelegramAzureChatBot
,TelegramGcpChatBot
,TelegramHttpChatBot
,TemplateEmailFeature
,TestContainers
,TestResources
,Thymeleaf
,Tomcat
,Tomcat
,Toml
,TomlGroovyModule
,Ucp
,Undertow
,Velocity
,VertexAiGeminiLangchain4jLanguageModel
,VertexAiLangchain4jLanguageModel
,VertxMySql
,VertxPg
,ViewsFieldset
,ViewsFieldsetTck
,Wavefront
,Websocket
,Worker
,X86
,XmlGroovyModule
,Yaml
,YamlGroovyModule
,Zeebe
,Zipkin
@Indexed(Feature.class)
public interface Feature
extends io.micronaut.core.naming.Named, io.micronaut.core.order.Ordered, io.micronaut.core.naming.Described
A feature is a class that affects the outcome of a generated
project.
- Since:
- 2.0.0
- Author:
- James Kleeh
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
apply
(GeneratorContext generatorContext) If this method is called for a given feature that means the feature was explicitly selected, included by default as a result ofDefaultFeature.shouldApply(ApplicationType, io.micronaut.starter.options.Options, java.util.Set)
, or added explicitly by another feature throughFeatureContext.addFeature(Feature)
.default String
default String
default @Nullable String
@NonNull String
getName()
The name of the feature.default int
getOrder()
The order of a feature controls the order in which it applies.default @Nullable String
default String
getTitle()
default boolean
default boolean
default boolean
Some features should not be visible to the user because they are a common parent of other selectable features, or they should always be applied, or any other reason.default void
processSelectedFeatures
(FeatureContext featureContext) If this method is called for a given feature then that feature was explicitly selected or was included by default as a result ofDefaultFeature.shouldApply(ApplicationType, io.micronaut.starter.options.Options, java.util.Set)
.boolean
supports
(ApplicationType applicationType) This method must be implemented to ensure it is only selectable for the desired application types.Methods inherited from interface io.micronaut.core.naming.Described
getDescription
-
Method Details
-
getName
The name of the feature. It must be unique.- Specified by:
getName
in interfaceio.micronaut.core.naming.Named
- Returns:
- the name of the feature
-
isPreview
default boolean isPreview()- Returns:
- Indicates the feature is in preview status and is subject to change.
-
isCommunity
default boolean isCommunity()- Returns:
- Indicates the feature is a community contribution.
-
getTitle
- Returns:
- The title of the feature
-
getDescription
- Specified by:
getDescription
in interfaceio.micronaut.core.naming.Described
-
getOrder
default int getOrder()The order of a feature controls the order in which it applies. The order of a feature is important to ensure that any previous work done by other features that may be required is done. SeeFeaturePhase
for a list of phases to choose from.- Specified by:
getOrder
in interfaceio.micronaut.core.order.Ordered
- Returns:
- The order of the feature
-
processSelectedFeatures
If this method is called for a given feature then that feature was explicitly selected or was included by default as a result ofDefaultFeature.shouldApply(ApplicationType, io.micronaut.starter.options.Options, java.util.Set)
. This method can be implemented to allow features to modify the list of features that will apply to the project. The methodsFeatureContext.addFeature(Feature)
andFeatureContext.exclude(FeaturePredicate)
are the primary ways to add and remove features from the context.FeatureContext.isPresent(Class)
can be used to determine the existence of other features in order to make decisions.- Parameters:
featureContext
- The feature context
-
apply
If this method is called for a given feature that means the feature was explicitly selected, included by default as a result ofDefaultFeature.shouldApply(ApplicationType, io.micronaut.starter.options.Options, java.util.Set)
, or added explicitly by another feature throughFeatureContext.addFeature(Feature)
. At this point the feature list is set and cannot change. This method can be implemented to modify the generated project. The feature can add templates by executingGeneratorContext.addTemplate(String, io.micronaut.starter.template.Template)
, modify configuration by modifyingGeneratorContext.getConfiguration()
orGeneratorContext.getBootstrapConfiguration()
, or modify build properties throughGeneratorContext.getBuildProperties()
.- Parameters:
generatorContext
- THe generator context
-
supports
This method must be implemented to ensure it is only selectable for the desired application types. This method is not used for determining if a default feature should be applied.- Parameters:
applicationType
- The application type- Returns:
- True if the feature can be selected by the user
-
isVisible
default boolean isVisible()Some features should not be visible to the user because they are a common parent of other selectable features, or they should always be applied, or any other reason.- Returns:
- True if the feature should able to be selected by the user
-
getCategory
- Returns:
- The
Category
to which the feature belongs to.
-
getMicronautDocumentation
- Returns:
- Returns a link to Micronaut documentation about the feature. eg. https://micronaut-projects.github.io/micronaut-cache/latest/guide/index.html#hazelcast
-
getThirdPartyDocumentation
- Returns:
- Returns a link to third party. E.g. https://hazelcast.org
-