Testing strategy
This commit is contained in:
parent
5e6888c904
commit
fc79489375
4
pom.xml
4
pom.xml
@ -40,6 +40,10 @@
|
|||||||
<artifactId>spring-cloud-starter-consul-discovery</artifactId>
|
<artifactId>spring-cloud-starter-consul-discovery</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.h2database</groupId>
|
||||||
|
<artifactId>h2</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.postgresql</groupId>
|
<groupId>org.postgresql</groupId>
|
||||||
|
|||||||
@ -4,6 +4,8 @@ import java.util.Date;
|
|||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "events")
|
@Table(name = "events")
|
||||||
public class Event {
|
public class Event {
|
||||||
@ -12,6 +14,7 @@ public class Event {
|
|||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
private long id;
|
private long id;
|
||||||
|
|
||||||
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
@Column(name = "date")
|
@Column(name = "date")
|
||||||
private Date when;
|
private Date when;
|
||||||
|
|
||||||
|
|||||||
21
src/test/resources/application.properties
Normal file
21
src/test/resources/application.properties
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
server.port=9098
|
||||||
|
spring.application.name: servicedemo
|
||||||
|
management.security.enabled=false
|
||||||
|
|
||||||
|
spring.datasource.driver-class-name=org.h2.Driver
|
||||||
|
spring.datasource.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1
|
||||||
|
spring.datasource.username=sa
|
||||||
|
spring.datasource.password=sa
|
||||||
|
|
||||||
|
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation= true
|
||||||
|
spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.PostgreSQLDialect
|
||||||
|
|
||||||
|
# Hibernate ddl auto (create, create-drop, validate, update)
|
||||||
|
spring.jpa.hibernate.ddl-auto= update
|
||||||
|
|
||||||
|
spring.cloud.consul.token = 4d19eb8c-0e53-3c5b-c479-04b41af55e9d
|
||||||
|
|
||||||
|
spring.cloud.discovery.enabled=false
|
||||||
|
spring.cloud.consul.enabled=false
|
||||||
|
spring.cloud.consul.config.enabled=false
|
||||||
Loading…
Reference in New Issue
Block a user