Register as a new user and use Qiita more conveniently You get articles that match your needsYou can efficiently read back useful informationWhat you can do with signing up
JPAにおいて、@GeneratedValueを使って主キーにユニークな値を自動で生成し、@Idを持つフィルドに適用できます。この主キーの値を生成するために、以下4種類の方法があります。 ・GenerationType.IDENTITY ・GenerationType.SEQUENCE ・GenerationType.TABLE ・GenerationType.AUTO DBMS毎にそれらの違いを検証して見ました。 検証環境 Spring Boot 1.4.3.RELEASE PostgreSQL 9.3.15 MySQL Community Server 5.7.17 Oracle Database Express Edition 11g Release 2 GenerationType.IDENTITY テーブルのidentity列を利用して,主キー値を生成します。 @Entity @
Spring Bootの2がリリースされたので、Spring Boot 2.0 Migration Guide を参考に既存のSpring Boot 1.5のプロジェクトをマイグレーションしてみた。行なったときの段取りとポイントを簡単にまとめました。 spring-boot-starter-web、spring-boot-starter-data-jpa、spring-boot-starter-actuator、spring-boot-starter-thymeleafを主に使っている。結論だけ先に言うと、spring-boot-starter-actuatorのマイグレーションがめんどくさかったです。 モチベーションこれからのJava時代に備えてSpring Bootの 1.5.9 を使っていたのだけど、2018/05時点において、公式からは Spring Boot 1.5のJava9サ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く