Polishing.

Reformat code.

See #606.
This commit is contained in:
Mark Paluch
2021-04-29 12:14:16 +02:00
parent 546eda53bd
commit 41b4b03469
24 changed files with 54 additions and 72 deletions

View File

@@ -15,13 +15,13 @@
*/
package example.springdata.rest.headers;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import lombok.Data;
import lombok.RequiredArgsConstructor;
/**
* @author Oliver Gierke
*/
@@ -30,7 +30,7 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public class Address {
@GeneratedValue @Id//
@GeneratedValue @Id //
private Long id;
private final String street, zipCode, city, state;

View File

@@ -15,6 +15,9 @@
*/
package example.springdata.rest.headers;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import java.time.LocalDateTime;
import javax.persistence.CascadeType;
@@ -25,9 +28,6 @@ import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Version;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
@@ -52,7 +52,7 @@ public class Customer {
private final String firstname, lastname;
private final Gender gender;
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true)//
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true) //
private final Address address;
Customer() {

View File

@@ -15,13 +15,13 @@
*/
package example.springdata.rest.headers;
import static org.assertj.core.api.Assertions.*;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Integration tests to bootstrap the application.
*

View File

@@ -21,13 +21,11 @@ import static org.springframework.restdocs.RestDocumentation.*;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
import java.net.URI;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.restdocs.config.RestDocumentationConfigurer;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;