This is a short explanation of how to use Spring boot CLI to create project and run in the macOS.

Install spring boot using homebrew in the macOS:

brew tap pivotal/tap && brew install springboot

The simple application

@RestController
public class Application {
    @RequestMapping("/")
    public String hello(){
        return "Hello Ojtiha!"
    }
}

Run the application using spring

spring run app.groovy

Now in the browser, navigate to the http://localhost:80808.

If you want to create standard alone jar application

spring jar hello.jar app.groovy

to run the jar

java -jar hello.jar

To create spring boot java project:

spring init -d=web web-app.zip

Here all the projects where you can create applications directly

spring init --list

You can use curl to directly create

curl http://start.spring.io/starter.zip -o app.zip