Base Commands

These commands are always available within the context of a micronaut project.

Create-Bean

Table 1. Create-Bean Flags
FlagDescriptionExample

-l, —lang

The language used for the bean class

—lang groovy

-f, —force

Whether to overwrite existing files

—force

The create-bean command generates a simple Singleton class. It does not create an associated test.

  1. $ mn create-bean EmailService
  2. | Rendered template Bean.java to destination src/main/java/example/EmailService.java

Create-Job

Table 2. Create-Job Flags
FlagDescriptionExample

-l, —lang

The language used for the job class

—lang groovy

-f, —force

Whether to overwrite existing files

—force

The create-job command generates a simple Scheduled class. It follows a *Job convention for generating the class name. It does not create an associated test.

  1. $ mn create-job UpdateFeeds --lang groovy
  2. | Rendered template Job.groovy to destination src/main/groovy/example/UpdateFeedsJob.groovy