Skip to content

Releases: hashimati/MicrostarterCli

Microstarter CLI 0.2.12

06 Jul 11:35
Compare
Choose a tag to compare

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

05 Jul 17:13
Compare
Choose a tag to compare

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

01 Nov 20:33
Compare
Choose a tag to compare

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

11 Oct 21:33
Compare
Choose a tag to compare

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

12 Aug 13:11
Compare
Choose a tag to compare

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

05 Aug 07:15
Compare
Choose a tag to compare

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:

  1. Supporting Micronaut 4.x.x.
  2. Upgrading MicrostarterCLI to Micronaut 4.0.2.
  3. Using JDK 17 in the codebase.

Note: If you use Micronaut 3.x.x, use MicrostarterCLI 0.2.6

Microstarter CLI 0.2.6

11 Mar 19:26
Compare
Choose a tag to compare

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:

  1. Supporting Micronaut Security API Key.
  2. Bug Fixes: Fixing Flyway.

Generating API Key Demo:

  1. Generate a Micronaut application using the init command:
> mc init --name apikey --package io.hashimati --lang GROOVY
  1. 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
  1. 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

10 Jan 18:51
Compare
Choose a tag to compare

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:

  1. Fruit Service.
  2. Vegetable Service
  3. Eureka Service Discovery Server.
  4. 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

21 Nov 18:23
Compare
Choose a tag to compare

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

20 Nov 18:42
Compare
Choose a tag to compare

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;
    }
}