Spring Bootでデータベース操作をする。 今回は準備編としてSpring Bootでのデータベース接続と、サンプルのドメインオブジェクトを作成する。 依存関係の追加 今回はH2を使う。 まずはMavenの依存関係を追加する。 <dependencies> <!-- append start --> <dependency> <!-- a --> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> <dependency> <!-- b --> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> </dependency> <dependency> <
![Spring Boot/第三回 Spring Bootでデータベース操作(準備編) - なべ’s blog](https://cdn-ak-scissors.b.st-hatena.com/image/square/f00f253b1731b7513492c0a65c19e38a73de2822/height=288;version=1;width=512/http%3A%2F%2Fecx.images-amazon.com%2Fimages%2FI%2F51NngrEolCL.jpg)