DEV Community

Shinu Suresh
Shinu Suresh

Posted on

Spring Initializr CLI

Here is a simple way to start using spring.start.io from CLI

Simple helloworld web with gradle

curl https://start.spring.io/starter.zip \                                                                          
    -d type=gradle-project 
    -d dependencies=web \
    -d name=helloworld \
    -d artifactId=helloworld \
    -o helloworld.zip
unzip helloworld.zip
Enter fullscreen mode Exit fullscreen mode

Adding dependencies and more options

curl https://start.spring.io/starter.zip \
  -d type=gradle-project \
  -d javaVersion=11 \
  -d dependencies=web,native,data-rest \
  -d applicationName=NativeWebApp \
  -d description='Web app with data rest and Native support' \
  -d artifactId=nativeweb \
  -d packageName=com.test.web \
  -d baseDir=nativeweb \
  -o nativeweb.zip
unzip nativeweb.zip
Enter fullscreen mode Exit fullscreen mode

How to find options

curl  https://start.spring.io
Enter fullscreen mode Exit fullscreen mode

Top comments (0)