Micronaut CLI? Micronaut CLI ist ein von Micronaut (manma) bereitgestelltes CLI-Tool.
The Micronaut CLI is the recommended way to create new Micronaut projects.
Beim Erstellen eines neuen Micronaut-Projekts wird empfohlen, diese Micronaut-CLI zu verwenden.
Features?
Übrigens, wenn Sie CLI mit Micronaut verwenden, können Sie "--features" wie folgt angeben.
Zum Beispiel, wenn Sie ein Projekt für Groovy erstellen möchten.
$ mn create-app hello-world-groovy --build maven --features=groovy
Was sind die --features
, die hier angegeben werden können? Also habe ich nachgeschlagen.
Diese Umgebung ist hier.
$ mn -V
| Micronaut Version: 1.0.4
| JVM Version: 1.8.0_191
Zunächst, wie zu überprüfen.
Führen Sie den Befehl profile-info
der Micronaut CLI mit angegebenem Profil aus.
Es gibt zwei Profile, "Service" und "Funktion".
Für "Service" -Profil.
$ mn profile-info service
| Profile: service
--------------------
The service profile
| Provided Commands:
--------------------
create-bean Creates a singleton bean
create-client Creates a client interface
create-controller Creates a controller and associated test
create-job Creates a job with scheduled method
create-websocket-client Creates a Websocket client
create-websocket-server Creates a Websocket server
help Prints help information for a specific command
| Provided Features:
--------------------
annotation-api Adds Java annotation API
cassandra Adds support for Cassandra in the application
config-consul Adds support for Distributed Configuration with Consul (https://www.consul.io)
discovery-consul Adds support for Service Discovery with Consul (https://www.consul.io)
discovery-eureka Adds support for Service Discovery with Eureka
graal-native-image Allows Building a Native Image
groovy Creates a Groovy application
hibernate-gorm Adds support for GORM persistence framework
hibernate-jpa Adds support for Hibernate/JPA
http-client Adds support for creating HTTP clients
http-server Adds support for running a Netty server
java Creates a Java application
jdbc-dbcp Configures SQL DataSource instances using Commons DBCP
jdbc-hikari Configures SQL DataSource instances using Hikari Connection Pool
jdbc-tomcat Configures SQL DataSource instances using Tomcat Connection Pool
jib Adds support for Jib builds
jrebel Adds support for class reloading with JRebel (requires separate JRebel installation)
junit Adds support for the JUnit testing framework
kafka Adds support for Kafka
kafka-streams Adds support for Kafka Streams
kotlin Creates a Kotlin application
management Adds support for management endpoints
micrometer Adds support for Micrometer metrics
micrometer-atlas Adds support for Micrometer metrics (w/ Atlas reporter)
micrometer-graphite Adds support for Micrometer metrics (w/ Graphite reporter)
micrometer-prometheus Adds support for Micrometer metrics (w/ Prometheus reporter)
micrometer-statsd Adds support for Micrometer metrics (w/ Statsd reporter)
mongo-gorm Configures GORM for MongoDB for Groovy applications
mongo-reactive Adds support for the Mongo Reactive Streams Driver
neo4j-bolt Adds support for the Neo4j Bolt Driver
neo4j-gorm Configures GORM for Neo4j for Groovy applications
netflix-archaius Adds support for Netflix Archaius in the application
netflix-hystrix Adds support for Netflix Hystrix in the application
netflix-ribbon Adds support for Netflix Ribbon in the application
picocli Adds support for command line parsing (http://picocli.info)
postgres-reactive Adds support for the Reactive Postgres driver in the application
rabbitmq Adds support for RabbitMQ in the application
redis-lettuce Configures the Lettuce driver for Redis
security-jwt Adds support for JWT (JSON Web Token) based Authentication
security-session Adds support for Session based Authentication
spek Adds support for the Spek testing framework
spock Adds support for the Spock testing framework
springloaded Adds support for class reloading with Spring-Loaded
swagger-groovy Configures Swagger (OpenAPI) Integration for Groovy
swagger-java Configures Swagger (OpenAPI) Integration for Java
swagger-kotlin Configures Swagger (OpenAPI) Integration for Kotlin
tracing-jaeger Adds support for distributed tracing with Jaeger (https://www.jaegertracing.io)
tracing-zipkin Adds support for distributed tracing with Zipkin (https://zipkin.io)
Für Funktions
Profil.
$ mn profile-info function
| Profile: function
--------------------
The function profile
| Provided Commands:
--------------------
create-bean Creates a singleton bean
create-job Creates a job with scheduled method
help Prints help information for a specific command
| Provided Features:
--------------------
annotation-api Adds Java annotation API
cassandra Adds support for Cassandra in the application
config-consul Adds support for Distributed Configuration with Consul (https://www.consul.io)
discovery-consul Adds support for Service Discovery with Consul (https://www.consul.io)
discovery-eureka Adds support for Service Discovery with Eureka
graal-native-image Allows Building a Native Image
groovy Creates a Groovy application
hibernate-gorm Adds support for GORM persistence framework
hibernate-jpa Adds support for Hibernate/JPA
http-client Adds support for creating HTTP clients
http-server Adds support for running a Netty server
java Creates a Java application
jdbc-dbcp Configures SQL DataSource instances using Commons DBCP
jdbc-hikari Configures SQL DataSource instances using Hikari Connection Pool
jdbc-tomcat Configures SQL DataSource instances using Tomcat Connection Pool
jib Adds support for Jib builds
jrebel Adds support for class reloading with JRebel (requires separate JRebel installation)
junit Adds support for the JUnit testing framework
kafka Adds support for Kafka
kafka-streams Adds support for Kafka Streams
kotlin Creates a Kotlin application
management Adds support for management endpoints
micrometer Adds support for Micrometer metrics
micrometer-atlas Adds support for Micrometer metrics (w/ Atlas reporter)
micrometer-graphite Adds support for Micrometer metrics (w/ Graphite reporter)
micrometer-prometheus Adds support for Micrometer metrics (w/ Prometheus reporter)
micrometer-statsd Adds support for Micrometer metrics (w/ Statsd reporter)
mongo-gorm Configures GORM for MongoDB for Groovy applications
mongo-reactive Adds support for the Mongo Reactive Streams Driver
neo4j-bolt Adds support for the Neo4j Bolt Driver
neo4j-gorm Configures GORM for Neo4j for Groovy applications
netflix-archaius Adds support for Netflix Archaius in the application
netflix-hystrix Adds support for Netflix Hystrix in the application
netflix-ribbon Adds support for Netflix Ribbon in the application
openfaas Adds support for OpenFaaS
picocli Adds support for command line parsing (http://picocli.info)
postgres-reactive Adds support for the Reactive Postgres driver in the application
rabbitmq Adds support for RabbitMQ in the application
redis-lettuce Configures the Lettuce driver for Redis
security-jwt Adds support for JWT (JSON Web Token) based Authentication
security-session Adds support for Session based Authentication
spek Adds support for the Spek testing framework
spock Adds support for the Spock testing framework
springloaded Adds support for class reloading with Spring-Loaded
swagger-groovy Configures Swagger (OpenAPI) Integration for Groovy
swagger-java Configures Swagger (OpenAPI) Integration for Java
swagger-kotlin Configures Swagger (OpenAPI) Integration for Kotlin
tracing-jaeger Adds support for distributed tracing with Jaeger (https://www.jaegertracing.io)
tracing-zipkin Adds support for distributed tracing with Zipkin (https://zipkin.io)
Wie unten
| Provided Features:
An dieser Stelle sind die verfügbaren Funktionen aufgereiht.
Wenn ich Pat anschaue, habe ich das Gefühl, ich denke "Ist es nicht dasselbe?", Aber wenn ich es mir anschaue, enthält nur das "Funktions" -Profil das folgende.
openfaas Adds support for OpenFaaS
Profile ist also eine Projektvorlage, bei der es sich um eine Sammlung von Befehlen und Strukturen zum Erstellen von Skeletten wie Standardeinstellungen und Build-Abhängigkeiten handelt.
Das Standardprofil ist "Service".
Die Befehle waren deutlich unterschiedlich.
## service Profile
$ mn profile-info service
| Profile: service
--------------------
The service profile
| Provided Commands:
--------------------
create-bean Creates a singleton bean
create-client Creates a client interface
create-controller Creates a controller and associated test
create-job Creates a job with scheduled method
create-websocket-client Creates a Websocket client
create-websocket-server Creates a Websocket server
help Prints help information for a specific command
## function Profile
$ mn profile-info function
| Profile: function
--------------------
The function profile
| Provided Commands:
--------------------
create-bean Creates a singleton bean
create-job Creates a job with scheduled method
help Prints help information for a specific command
Für dieses Profil hat GitHub eine eigene Organisation.
Im Moment sind "Service", "Funktion" und "Verbund" in einer Reihe, so dass sie mit der Zeit zunehmen werden.
Jetzt wissen Sie, was Sie für "--features" angeben können.
Auch hier sieht es gut aus.
Ich meine, es scheint mehr Profile zu geben, die Sie tatsächlich angeben können.
$ mn list-profiles
| Available Profiles
--------------------
cli The cli profile
federation The federation profile
function-aws The function profile for AWS Lambda
kafka The Kafka messaging profile
profile A profile for creating new Micronaut profiles
service The service profile
Sollte ich mich hier nach den "--Features" umsehen, die standardmäßig auf jedes Profil angewendet werden?
https://github.com/micronaut-projects/micronaut-profiles/blob/v1.0.3/service/profile.yml
https://github.com/micronaut-projects/micronaut-profiles/blob/v1.0.3/function-aws/profile.yml