micronaut 學習一 基本安裝

通常來講,使用框架就是使用類庫同時按照框架的類庫套路編寫代碼,可是從愈來愈複雜的實際
場景來講,cli以及腳手架工具,能夠幫助咱們簡化好多操做。
如下是micronaut cli 工具的安裝以及一個簡單試用html

windows 系統環境不太方便spring

安裝sdkman

  • 安裝命令
 
curl -s https://get.sdkman.io | bash
  • 效果
curl -s https://get.sdkman.io | bash
 Looking for a previous installation of SDKMAN...
Looking for unzip...
Looking for zip...
Looking for curl...
Looking for sed...
Installing SDKMAN scripts...
Create distribution directories...
Getting available candidates...
Prime the config file...
Download script archive...
######################################################################## 100.0%
Extract script archive...
Install scripts...
Set version to 5.7.3+337 ...
touch: /Users/dalong/.bash_profile: Permission denied
Attempt update of login bash profile on OSX...
bash: line 272: /Users/dalong/.bash_profile: Permission denied
Added sdkman init snippet to /Users/dalong/.bash_profile
Attempt update of zsh profile...
All done!
Please open a new terminal, or run the following in the existing one:
    source "/Users/dalong/.sdkman/bin/sdkman-init.sh"
Then issue the following command:
    sdk help
Enjoy!!!
 
 

sdk 幫助命令windows

sdk --help
==== BROADCAST =================================================================
* 2019-10-16: Springboot 2.2.0.RELEASE released on SDKMAN! #springboot
* 2019-10-15: Grails 3.3.11 released on SDKMAN! #grailsfw
* 2019-10-14: Micronaut 1.2.4 released on SDKMAN! #micronautfw
================================================================================
Invalid command: --help
Usage: sdk <command> [candidate] [version]
       sdk offline <enable|disable>
   commands:
       install or i <candidate> [version]
       uninstall or rm <candidate> <version>
       list or ls [candidate]
       use or u <candidate> [version]
       default or d <candidate> [version]
       current or c [candidate]
       upgrade or ug [candidate]
       version or v
       broadcast or b
       help or h
       offline [enable|disable]
       selfupdate [force]
       update
       flush <broadcast|archives|temp>
   candidate : the SDK to install: groovy, scala, grails, gradle, kotlin, etc.
                 use list command for comprehensive list of candidates
                 eg: $ sdk list
   version : where optional, defaults to latest stable if not provided
                 eg: $ sdk install groovy
 
 

安裝micronaut

稍慢,等等。。。springboot

  • 安裝命令
sdk install micronaut
  • 查看幫助命令
mn --help

效果bash

Resolving dependencies..
.
| Not all profiles could be resolved remotely. Searching Maven local...
Usage: mn [-hnvVx] [COMMAND]
Micronaut CLI command line interface for generating projects and services.
Commonly used commands are:
  create-app NAME
  create-cli-app NAME
  create-federation NAME --services SERVICE_NAME[,SERVICE_NAME]...
  create-function NAME
Options:
  -h, --help Show this help message and exit.
  -n, --plain-output Use plain text instead of ANSI colors and styles.
  -v, --verbose Create verbose output.
  -V, --version Print version information and exit.
  -x, --stacktrace Show full stack trace when exceptions occur.
Commands:
  create-app Creates an application
  create-cli-app Creates a command line application
  create-federation Creates a federation of services
  create-function Creates a serverless function application
  create-profile Creates a profile
  help Prints help information for a specific command
  list-profiles Lists the available profiles
  profile-info Display information about a given profile

參考資料

https://micronaut.io/download.htmlapp

相關文章
相關標籤/搜索