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   荣锋亮  阅读(1295)  评论(0编辑  收藏  举报

编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2018-10-17 使用just-api 进行接口测试
2016-10-17 HTTP Proxy Servlet 代理服务使用

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示