Skip to content
Permalink
Browse files

How to run in-memory database test

  • Loading branch information...
slem1 committed Oct 24, 2017
1 parent 0ec6c05 commit 87e7519dc06bfb0c88ade609221c6bff690bdfed
@@ -13,12 +13,25 @@
<artifactId>spring-boot-test-howto-business</artifactId>

<dependencies>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.196</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
@@ -0,0 +1,20 @@
package fr.sle.testhowto;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "my_entity")
public class MyEntity {

@Id
@GeneratedValue
@Column(name = "id")
private Long id;

@Column(name = "value")
private String value;
}

0 comments on commit 87e7519

Please sign in to comment.
You can’t perform that action at this time.