micronaut 学习一 基本安装

一般来说,使用框架就是使用类库同时按照框架的类库套路编写代码,但是从越来越复杂的实际
场景来说,cli以及脚手架工具,可以帮助我们简化好多操作。
以下是micronaut cli 工具的安装以及一个简单试用

windows 系统环境不太方便

安装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 帮助命令

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

稍慢,等等。。。

  • 安装命令
sdk install micronaut
  • 查看帮助命令
mn  --help

效果

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.html

posted on 2019-10-17 09:53  荣锋亮  阅读(1255)  评论(0编辑  收藏  举报

导航