1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Part2 Part II. Getting Startedの進め方 Spring Boot Reference Guide覚え書き①

Last updated at Posted at 2018-03-07

#マニュアルの進め方

今回はPart2。
ちなみにPart1は概要なので読み飛ばしてもOK。
Part2 Part II. Getting Started

##Mavenとgradle

どちらを選択してもよいのだが、マニュアルを読むことだけを考えるとMavenがおすすめ。
基本的にmaven中心で解説が行われる。
ただし、記事等を探すと今後はgradleがメインになるようでもあるのでどちらも試すのが一番。
少なくともgradleの箇所も読み飛ばさないのがよいでしょう。

##ファイルの作成場所
10.2.6 Quick-start Spring CLI Example
上記項目をやっていて疑問に感じたところを残しておく。
ファイルの作成場所が書かれていないが、こちらはWindowsならユーザーフォルダ内がよい。
spring run app.groovyの実行もファイルを作成したフォルダまでcd フォルダ名
移動後に実行すること。(コマンドプロンプト立ち上げの時点でユーザフォルダ内にいるなら移動の必要はなし)

@RestControllerのアノテーションを付けたものは、文字列などのデータを返すものなのでこちらでは基本的に簡易的に「Hello, World!」を返すプログラムを作成している。

##POMファイルの作成
Creating the POM
###専用のフォルダを作成すべし
「Creating the POM」以降はMavenを利用してフォルダ構成を作ったり、ライブラリを読み込んだりしていくのだがユーザーフォルダ内に作ると複数のフォルダなどが作られごちゃごちゃすることになる。この段階でユーザーフォルダ内に「spring-sample」などの名前のフォルダを作り、cd spring-sampleでフォルダ内に入って作業をするのがよいでしょう。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?