Releases: hashimati/MicrostarterCli
Microstarter CLI 0.2.12
To install it, copy the "mc.bat," "mc," and "mc.jar" files to your Micronaut Project or configure their files in your environment. Then, the "mc" command will be ready to use.
Pre-Requisite
Java 17
New Features:
Fixing JWT configuration includes expiration and refresh token.
Microstarter CLI 0.2.11
To install it, copy the "mc.bat," "mc," and "mc.jar" files to your Micronaut Project or configure their files in your environment. Then, the "mc" command will be ready to use.
Pre-Requisite
Java 17
New Features:
Compatibility with latest release of Micronaut
Microstarter CLI 0.2.10
To install it, copy the "mc.bat," "mc," and "mc.jar" files to your Micronaut Project or configure their files in your environment. Then, the "mc" command will be ready to use.
Pre-Requisite
Java 17
New Features:
Resolving Serializing Dates
Microstarter CLI 0.2.9
To install it, copy the "mc.bat," "mc," and "mc.jar" files to your Micronaut Project or configure their files in your environment. Then, the "mc" command will be ready to use.
Pre-Requisite
Java 17
New Features:
Serdeable
Microstarter CLI 0.2.8
To install it, copy the "mc.bat," "mc," and "mc.jar" files to your Micronaut Project or configure their files in your environment. Then, the "mc" command will be ready to use.
Pre-Requisite
Java 17
New Features:
Fixing generating AuthenticationProviderUserPassword & ApiKeyTokenValidator to be compatible with Micronaut 4
Microstarter CLI 0.2.7
To install it, copy the "mc.bat," "mc," and "mc.jar" files to your Micronaut Project or configure their files in your environment. Then, the "mc" command will be ready to use.
Pre-Requisite
Java 17
New Features:
- Supporting Micronaut 4.x.x.
- Upgrading MicrostarterCLI to Micronaut 4.0.2.
- Using JDK 17 in the codebase.
Note: If you use Micronaut 3.x.x, use MicrostarterCLI 0.2.6
Microstarter CLI 0.2.6
To install it, copy the "mc.bat," "mc," and "mc.jar" files to your Micronaut Project or configure their files in your environment. Then, the "mc" command will be ready to use.
Pre-Requisite
Java 11+
New Features:
- Supporting Micronaut Security API Key.
- Bug Fixes: Fixing Flyway.
Generating API Key Demo:
- Generate a Micronaut application using the init command:
> mc init --name apikey --package io.hashimati --lang GROOVY
- Run the configure command:
> mc configure
Enter the configuration as follows:
Is the application monolithic? yes
? Enter the server port number between 0 - 65535: 8080
? Enter the service id: apikey-demo
? Select Reactive Framework: reactor
? Select Annotation: Micronaut
? Enter the database name: apikeys
? Select Database Type: H2
? Select Database Backend: JDBC
? Select Data Migration: liquibase
? Select Messaging type: none
? Do you want to add cache-caffeine support? yes
? Do you want to add Micrometer feature? yes
? Select Distributed Tracing: Jaeger
? Do you want to add GraphQL-Java-Tools support? yes
? Do you want to add GRPC support? no
? Do you want to use File Services? no
? Do you want to configure VIEWS? no
- Run the apikey command:
apikey command is a subcommand of the security command. run the apikey command as follows
> mc security apikey
Set the key name to MY-TOKEN
? Enter the header name: MY-TOKEN
Testing the demo using .http
POST http://localhost:8080/api/security/apikey/generateKey
Content-Type: application/json
{
"name": "Ahmed",
"password": "HelloWorld"
}
//This request will generate the token, use it in the next requests by passing it in the My-Token header.
###
POST http://localhost:8080/api/v1/fruit/save
Content-Type: application/json
My-Token: sQGXT7jtRpraam0Qr4Ytlu4ixk45hl2kmnT5bKnbknIYtGwsvm7K1Fpv3knYqk98
{
"name": "Apple"
}
###
GET http://localhost:8080/api/v1/fruit/findAll
My-Token: sQGXT7jtRpraam0Qr4Ytlu4ixk45hl2kmnT5bKnbknIYtGwsvm7K1Fpv3knYqk98
###
Demo Repository
Microstarter CLI 0.2.5
To install it, copy the "mc.bat," "mc," and "mc.jar" files to your Micronaut Project or configure their files in your environment. Then, the "mc" command will be ready to use.
Pre-Requisite
Java 11+
New Features:
This is a significant release that supports Microservices configuration. MicrostarterCLI introduces the following Microservices features:
1. configure command:
The "configure command includes the following configuration:
a. Is Monolithic : This flag informs MicrostarterCLI that the configured Micronaut service is monolithic or microservice.
b. Discovery Client: if the application is "microservice", the MicrostarterCLI will ask the user to configure the Discovery service client. The configuration includes the Discovery Service type, server, and port. The supported discovery services are Eureka and Consul.
c. Configuration Server: Spring Cloud Config and Consul are supported configuration server types.
d. Service Id: this configuration will be used in registering the microservice in the "gateway register" command.
2. eureka command
The "eureka" command bootstraps a "Eureka" server from https://start.spring.io.
Example
> mc eureka -version 2.7.7 --javaVersion 11
3. config Command:
The "config" command bootstraps a "Spring Cloud Config" server from https://start.spring.io.
Example
> mc config -version 2.7.7 --javaVersion 11
4. gateway Command:
The "gateway" command bootstraps a "Spring Cloud Gateway" server from https://start.spring.io.
Example
> mc gateway -version 2.7.7 --javaVersion 11
register Subcommand:
You can use this command to configure a microservice's routes by Application name and service id in the Gateway instance.
Example:
> mc gateway register
5. security Command.
The "security" command supports JWT propagation for microservices.
6. New Banner
Bootstrapping Microservice Example:
This is a simple Micronaut Microservices configured using MicrostarterCLI 0.2.5.
The Microservices consists of:
- Fruit Service.
- Vegetable Service
- Eureka Service Discovery Server.
- Spring Cloud Gateway.
How to generate the example:
1. Generating Eureka Server
run
> mc eureka -version 2.7.7 --javaVersion 11
2. Generate Fruit Service.
First run
> mc init --name FruitService
Then, run:
> cd FruitService
> mc entity -e Fruit
Note: Ensure to select "No" in "Is Monolithic?" question, and configure "eureka" as localhost.
3. Generate Vegetable Service.
First run
> mc init --name VegetableService
Then, run:
> cd VegetableService
> mc entity -e Vegetable
Note: Ensure to select "No" in "Is Monolithic?" question, and configure "eureka" as localhost.
4. Generate Spring Cloud Gateway & Configure the Routes
First, run:
mc gateway -version 2.7.7 --javaVersion 11
Second, Enter the Gateway directory:
> cd gateway
Run the following command twice to configure the routes of FruitService, and VegetableService
> mc gateway register
Example Repository: https://github.com/hashimati/Micostartercli-Microservice
Microstarter CLI 0.2.4
To install it, copy the "mc.bat," "mc," and "mc.jar" files to your Micronaut Project or configure their files in your environment. Then, the "mc" command will be ready to use.
Pre-Requisite
Java 11+
New Feature
- MQTT support:
MQTT Client Command:
> mc mqttClient
MQTT Listener Command
> mc mqttListener
New Features in v.2.2 & v0.2.3:
- Supporting GRPC Application Type.
- Security syntax: to bootstrap security using domain language.
- Views Configurations: thymeleafs, velocity, and feemaker.
- Bug Fixes.
- removing unnecessary printings
Security Syntax and Views Configuration Example:
service CustomerService{
port 8080;
reactive reactor;
package com.finance
build gradle;
database H2;
language java;
dao JDBC;
views views-thymeleafs
migrationTool liquibase;
annotation micronaut;
tracing jaeger;
testFramework junit;
security {
type jwt;
roles CUSTOMER_ROLE, SELLER_ROLE;
}
entity Customer {
name: String;
}
entity Product {
name: String;
price: BigDecimal;
}
entity cart {
items: int;
purchase: Date;
sum: BigDecimal;
}
}
Microstarter CLI 0.2.3
To install it, copy the "mc.bat," "mc," and "mc.jar" files to your Micronaut Project or configure their files in your environment. Then, the "mc" command will be ready to use.
Pre-Requisite
Java 11+
New Features:
- Supporting GRPC Application Type.
- Security syntax: to bootstrap security using domain language.
- Views Configurations: thymeleafs, velocity, and feemaker.
- Bug Fixes.
- removing unnecessary printings
Security Syntax and Views Configuration Example:
service CustomerService{
port 8080;
reactive reactor;
package com.finance
build gradle;
database H2;
language java;
dao JDBC;
views views-thymeleafs
migrationTool liquibase;
annotation micronaut;
tracing jaeger;
testFramework junit;
security {
type jwt;
roles CUSTOMER_ROLE, SELLER_ROLE;
}
entity Customer {
name: String;
}
entity Product {
name: String;
price: BigDecimal;
}
entity cart {
items: int;
purchase: Date;
sum: BigDecimal;
}
}