cleanup work
This commit is contained in:
+51
-52
@@ -1,59 +1,58 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>dozer-tutorial</artifactId>
|
||||
<version>1.0</version>
|
||||
<name>Dozer</name>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.3</version>
|
||||
<configuration>
|
||||
<source>7</source>
|
||||
<target>7</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.5</version>
|
||||
</dependency>
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>dozer-tutorial</artifactId>
|
||||
<version>1.0</version>
|
||||
|
||||
<name>dozer</name>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<version>1.7.5</version>
|
||||
</dependency>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.3</version>
|
||||
<configuration>
|
||||
<source>7</source>
|
||||
<target>7</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>1.9.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<version>1.7.5</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sf.dozer</groupId>
|
||||
<artifactId>dozer</artifactId>
|
||||
<version>5.5.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<dependency>
|
||||
<groupId>net.sf.dozer</groupId>
|
||||
<artifactId>dozer</artifactId>
|
||||
<version>5.5.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
package com.baeldung.dozer;
|
||||
|
||||
public class Dest {
|
||||
private String name;
|
||||
private int age;
|
||||
private String name;
|
||||
private int age;
|
||||
|
||||
public Dest() {
|
||||
public Dest() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Dest(String name, int age) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.age = age;
|
||||
}
|
||||
public Dest(String name, int age) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
package com.baeldung.dozer;
|
||||
|
||||
public class Dest2 {
|
||||
private int id;
|
||||
private int points;
|
||||
private int id;
|
||||
private int points;
|
||||
|
||||
public Dest2() {
|
||||
public Dest2() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Dest2(int id, int points) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.points = points;
|
||||
}
|
||||
public Dest2(int id, int points) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.points = points;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getPoints() {
|
||||
return points;
|
||||
}
|
||||
public int getPoints() {
|
||||
return points;
|
||||
}
|
||||
|
||||
public void setPoints(int points) {
|
||||
this.points = points;
|
||||
}
|
||||
public void setPoints(int points) {
|
||||
this.points = points;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Dest2 [id=" + id + ", points=" + points + "]";
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Dest2 [id=" + id + ", points=" + points + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,39 +10,35 @@ import org.dozer.MappingException;
|
||||
|
||||
public class MyCustomConvertor implements CustomConverter {
|
||||
|
||||
@Override
|
||||
public Object convert(Object dest, Object source, Class<?> arg2,
|
||||
Class<?> arg3) {
|
||||
if (source == null) {
|
||||
return null;
|
||||
}
|
||||
if (source instanceof Personne3) {
|
||||
Personne3 person = (Personne3) source;
|
||||
Date date = new Date(person.getDtob());
|
||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
|
||||
String isoDate = format.format(date);
|
||||
return new Person3(person.getName(), isoDate);
|
||||
@Override
|
||||
public Object convert(Object dest, Object source, Class<?> arg2, Class<?> arg3) {
|
||||
if (source == null) {
|
||||
return null;
|
||||
}
|
||||
if (source instanceof Personne3) {
|
||||
Personne3 person = (Personne3) source;
|
||||
Date date = new Date(person.getDtob());
|
||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
|
||||
String isoDate = format.format(date);
|
||||
return new Person3(person.getName(), isoDate);
|
||||
|
||||
} else if (source instanceof Person3) {
|
||||
Person3 person = (Person3) source;
|
||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
|
||||
Date date = null;
|
||||
try {
|
||||
date = format.parse(person.getDtob());
|
||||
} else if (source instanceof Person3) {
|
||||
Person3 person = (Person3) source;
|
||||
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
|
||||
Date date = null;
|
||||
try {
|
||||
date = format.parse(person.getDtob());
|
||||
|
||||
} catch (ParseException e) {
|
||||
throw new MappingException("Converter MyCustomConvertor "
|
||||
+ "used incorrectly:" + e.getMessage());
|
||||
}
|
||||
long timestamp = date.getTime();
|
||||
return new Personne3(person.getName(), timestamp);
|
||||
} catch (ParseException e) {
|
||||
throw new MappingException("Converter MyCustomConvertor " + "used incorrectly:" + e.getMessage());
|
||||
}
|
||||
long timestamp = date.getTime();
|
||||
return new Personne3(person.getName(), timestamp);
|
||||
|
||||
} else {
|
||||
throw new MappingException("Converter MyCustomConvertor "
|
||||
+ "used incorrectly. Arguments passed in were:" + dest
|
||||
+ " and " + source);
|
||||
} else {
|
||||
throw new MappingException("Converter MyCustomConvertor " + "used incorrectly. Arguments passed in were:" + dest + " and " + source);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
package com.baeldung.dozer;
|
||||
|
||||
public class Person {
|
||||
private String name;
|
||||
private String nickname;
|
||||
private int age;
|
||||
private String name;
|
||||
private String nickname;
|
||||
private int age;
|
||||
|
||||
public Person() {
|
||||
public Person() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Person(String name, String nickname, int age) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.nickname = nickname;
|
||||
this.age = age;
|
||||
}
|
||||
public Person(String name, String nickname, int age) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.nickname = nickname;
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
package com.baeldung.dozer;
|
||||
|
||||
public class Person2 {
|
||||
private String name;
|
||||
private String nickname;
|
||||
private int age;
|
||||
private String name;
|
||||
private String nickname;
|
||||
private int age;
|
||||
|
||||
public Person2() {
|
||||
public Person2() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Person2(String name, String nickname, int age) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.nickname = nickname;
|
||||
this.age = age;
|
||||
}
|
||||
public Person2(String name, String nickname, int age) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.nickname = nickname;
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,39 +1,38 @@
|
||||
package com.baeldung.dozer;
|
||||
|
||||
public class Person3 {
|
||||
private String name;
|
||||
private String dtob;
|
||||
private String name;
|
||||
private String dtob;
|
||||
|
||||
public Person3() {
|
||||
public Person3() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Person3(String name, String dtob) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.dtob = dtob;
|
||||
}
|
||||
public Person3(String name, String dtob) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.dtob = dtob;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDtob() {
|
||||
return dtob;
|
||||
}
|
||||
public String getDtob() {
|
||||
return dtob;
|
||||
}
|
||||
|
||||
public void setDtob(String dtob) {
|
||||
this.dtob = dtob;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Person3 [name=" + name + ", dtob=" + dtob + "]";
|
||||
}
|
||||
public void setDtob(String dtob) {
|
||||
this.dtob = dtob;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Person3 [name=" + name + ", dtob=" + dtob + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,43 +1,43 @@
|
||||
package com.baeldung.dozer;
|
||||
|
||||
public class Personne {
|
||||
private String nom;
|
||||
private String surnom;
|
||||
private int age;
|
||||
private String nom;
|
||||
private String surnom;
|
||||
private int age;
|
||||
|
||||
public Personne() {
|
||||
public Personne() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Personne(String nom, String surnom, int age) {
|
||||
super();
|
||||
this.nom = nom;
|
||||
this.surnom = surnom;
|
||||
this.age = age;
|
||||
}
|
||||
public Personne(String nom, String surnom, int age) {
|
||||
super();
|
||||
this.nom = nom;
|
||||
this.surnom = surnom;
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public String getNom() {
|
||||
return nom;
|
||||
}
|
||||
public String getNom() {
|
||||
return nom;
|
||||
}
|
||||
|
||||
public void setNom(String nom) {
|
||||
this.nom = nom;
|
||||
}
|
||||
public void setNom(String nom) {
|
||||
this.nom = nom;
|
||||
}
|
||||
|
||||
public String getSurnom() {
|
||||
return surnom;
|
||||
}
|
||||
public String getSurnom() {
|
||||
return surnom;
|
||||
}
|
||||
|
||||
public void setSurnom(String surnom) {
|
||||
this.surnom = surnom;
|
||||
}
|
||||
public void setSurnom(String surnom) {
|
||||
this.surnom = surnom;
|
||||
}
|
||||
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,45 +3,45 @@ package com.baeldung.dozer;
|
||||
import org.dozer.Mapping;
|
||||
|
||||
public class Personne2 {
|
||||
private String nom;
|
||||
private String surnom;
|
||||
private int age;
|
||||
private String nom;
|
||||
private String surnom;
|
||||
private int age;
|
||||
|
||||
public Personne2() {
|
||||
public Personne2() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Personne2(String nom, String surnom, int age) {
|
||||
super();
|
||||
this.nom = nom;
|
||||
this.surnom = surnom;
|
||||
this.age = age;
|
||||
}
|
||||
public Personne2(String nom, String surnom, int age) {
|
||||
super();
|
||||
this.nom = nom;
|
||||
this.surnom = surnom;
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
@Mapping("name")
|
||||
public String getNom() {
|
||||
return nom;
|
||||
}
|
||||
@Mapping("name")
|
||||
public String getNom() {
|
||||
return nom;
|
||||
}
|
||||
|
||||
@Mapping("nickname")
|
||||
public String getSurnom() {
|
||||
return surnom;
|
||||
}
|
||||
@Mapping("nickname")
|
||||
public String getSurnom() {
|
||||
return surnom;
|
||||
}
|
||||
|
||||
public void setNom(String nom) {
|
||||
this.nom = nom;
|
||||
}
|
||||
public void setNom(String nom) {
|
||||
this.nom = nom;
|
||||
}
|
||||
|
||||
public void setSurnom(String surnom) {
|
||||
this.surnom = surnom;
|
||||
}
|
||||
public void setSurnom(String surnom) {
|
||||
this.surnom = surnom;
|
||||
}
|
||||
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
package com.baeldung.dozer;
|
||||
|
||||
public class Personne3 {
|
||||
private String name;
|
||||
private long dtob;
|
||||
private String name;
|
||||
private long dtob;
|
||||
|
||||
public Personne3() {
|
||||
public Personne3() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Personne3(String name, long dtob) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.dtob = dtob;
|
||||
}
|
||||
public Personne3(String name, long dtob) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.dtob = dtob;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public long getDtob() {
|
||||
return dtob;
|
||||
}
|
||||
public long getDtob() {
|
||||
return dtob;
|
||||
}
|
||||
|
||||
public void setDtob(long dtob) {
|
||||
this.dtob = dtob;
|
||||
}
|
||||
public void setDtob(long dtob) {
|
||||
this.dtob = dtob;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Personne3 [name=" + name + ", dtob=" + dtob + "]";
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Personne3 [name=" + name + ", dtob=" + dtob + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
package com.baeldung.dozer;
|
||||
|
||||
public class Source {
|
||||
private String name;
|
||||
private int age;
|
||||
private String name;
|
||||
private int age;
|
||||
|
||||
public Source() {
|
||||
}
|
||||
public Source() {
|
||||
}
|
||||
|
||||
public Source(String name, int age) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.age = age;
|
||||
}
|
||||
public Source(String name, int age) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
package com.baeldung.dozer;
|
||||
|
||||
public class Source2 {
|
||||
private String id;
|
||||
private double points;
|
||||
private String id;
|
||||
private double points;
|
||||
|
||||
public Source2() {
|
||||
public Source2() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Source2(String id, double points) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.points = points;
|
||||
}
|
||||
public Source2(String id, double points) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.points = points;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public double getPoints() {
|
||||
return points;
|
||||
}
|
||||
public double getPoints() {
|
||||
return points;
|
||||
}
|
||||
|
||||
public void setPoints(double points) {
|
||||
this.points = points;
|
||||
}
|
||||
public void setPoints(double points) {
|
||||
this.points = points;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Source2 [id=" + id + ", points=" + points + "]";
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Source2 [id=" + id + ", points=" + points + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,13 +4,11 @@ import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
import org.springframework.boot.test.SpringApplicationContextLoader;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.client.ClientHttpResponse;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
import org.springframework.web.client.ResponseErrorHandler;
|
||||
import org.springframework.web.client.ResponseExtractor;
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package com.baeldung;
|
||||
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
import cucumber.api.java.en.And;
|
||||
import cucumber.api.java.en.Then;
|
||||
import cucumber.api.java.en.When;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
|
||||
public class StepDefs extends SpringIntegrationTest {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user