简体   繁体   中英

How do I install Spring Boot CLI in Ubuntu?

I am trying to install Spring Boot CLI in Ubuntu. I am new to spring boot and was trying to learn it. I have already installed Gradle and groovy but did not find anything online to install Spring boot CLI.

please follow the code

sudo apt install unzip zip
curl -s https://get.sdkman.io | bash
source "/home/username/.sdkman/bin/sdkman-init.sh"=
sdk install springboot
spring version

Spring boot CLI 安装指南链接Spring boot CLI

Here is detailed instruction on how to do it, much more useful than official one, at least for manual installation. One more thing - to make path change permanent you might need to logout - login, as "source /etc/profile" will be effective only for currently opened terminal.

You can read the docs for installation steps:

Manual installation:

  1. Download the Spring CLI distribution: you can find the latest version link here .
  2. Extract the downloaded zip file to any path of your choice.
  3. Prerequisite : Make sure you have Java JDK v1.8 or above (check INSTALL.txt file from extracted archive in Step-1). You can check your JDK version using command: java --version .
  4. Add the spring CLI script 's path to $PATH environment variable: For example, you can add below lines to your .bashrc file in * nix systems:
export SPRING_HOME=/path/to/your/extracted-spring-cli/spring-2.4.0
export PATH=$SPRING_HOME/bin:$PATH

After saving the .bashrc file, run $ source .bashrc to reload the environment variables you just added.

  1. (optional; and not for Windows user) Shell auto-completion scripts are provided for BASH and ZSH with the extracted archive in Step-1. Add symlinks to the appropriate location for your environment. For example, something like:
  ln -s /path/to/your/extracted-spring-cli/spring-2.4.0/shell-completion/bash/spring /etc/bash_completion.d/spring
  ln -s /path/to/your/extracted-spring-cli/spring-2.4.0/shell-completion/zsh/_spring /usr/local/share/zsh/site-functions/_spring

To check if you are using BASH or ZSH, run the command: $ echo $SHELL .

  1. DONE : To test if you have successfully installed the CLI you can run the following command: spring --version .

Use this link to get a detailed instruction on how to download the Spring framework successfully, It really helped me a lot after long time of making research.

https://www.decodejava.com/download-and-install-spring-framework.htm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM