Code: Select all
@Getter
@Setter
@Entity
@Data
public class Country {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false)
private String name;
@Column(nullable = false)
private String region;
@Column(nullable = false)
private String continent;
}
Code: Select all
CREATE TABLE "country" (
"id" INTEGER,
"continent" varchar(255) NOT NULL,
"name" varchar(255) NOT NULL,
"region" varchar(255) NOT NULL,
PRIMARY KEY("id")
);
< /code>
Dies ist meine Anwendungseigenschaften < /p>
spring.datasource.url=jdbc:sqlite:./database.sqlite
spring.datasource.driver-class-name=org.sqlite.JDBC
spring.jpa.database-platform=org.hibernate.community.dialect.SQLiteDialect
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.hbm2ddl.auto=update
spring.jpa.show-sql=true