spring-boot

Curl で Spring Boot アプリの雛形を取得する

こんな感じ。

(Maven)
$ diary curl -s https://start.spring.io/starter.zip -o myapp.zip

(Gradle)
$ diary curl -s https://start.spring.io/starter.zip -o myapp.zip -d type=gradle-project

(Gradle かつウェブ - spring-boot-starter-web が build.gradle に含まれる)
$ curl -s https://start.spring.io/starter.zip -o myapp.zip -d type=gradle-project -d dependencies=web

使用可能なオプションについてより詳細に情報がほしければ、単に start.spring.iocurl で叩けばよい。

$ curl start.spring.io 
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
:: Spring Initializr ::  https://start.spring.io

This service generates quickstart projects that can be easily customized.
Possible customizations include a project's dependencies, Java version, and
build system or build structure. See below for further details.

The services uses a HAL based hypermedia format to expose a set of resources
to interact with. If you access this root resource requesting application/json
as media type the response will contain the following links:
+-----------------+-----------------------------------------+
| Rel             | Description                             |
+-----------------+-----------------------------------------+
| gradle-build    | Generate a Gradle build file            |
| gradle-project  | Generate a Gradle based project archive |
| maven-build     | Generate a Maven pom.xml                |
| maven-project * | Generate a Maven based project archive  |
+-----------------+-----------------------------------------+
...