Skip to content

Commit

Permalink
Merge pull request #28 from pavelfomin/feature/reformat
Browse files Browse the repository at this point in the history
Add .editorconfig and reformat the source code
  • Loading branch information
pavelfomin committed Oct 27, 2023
2 parents 737828a + e941caa commit 3a6e76c
Show file tree
Hide file tree
Showing 26 changed files with 1,444 additions and 1,392 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Master maintained in load-ship-common https://git.target.com/load-ship/load-ship-common/blob/main/.editorconfig
root = true

[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf
indent_style = space
indent_size = 4

# 2 space indentation
[*.{xml,html,json,y*ml}]
indent_size = 2
10 changes: 5 additions & 5 deletions src/main/java/com/droidablebee/springboot/rest/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
@SpringBootApplication
@EnableCaching
public class Application {
@SuppressWarnings("unused")
private static final Logger log = LoggerFactory.getLogger(Application.class);
@SuppressWarnings("unused")
private static final Logger log = LoggerFactory.getLogger(Application.class);

public static void main(String[] args) {
SpringApplication.run(Application.class);
}
public static void main(String[] args) {
SpringApplication.run(Application.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ public class WebConfiguration implements WebMvcConfigurer {

@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.defaultContentType(MediaType.APPLICATION_JSON);
configurer.defaultContentType(MediaType.APPLICATION_JSON);
}

/**
* Enable @Valid validation exception handler for @PathVariable, @RequestParam and @RequestHeader.
*/
@Bean
public MethodValidationPostProcessor methodValidationPostProcessor() {
return new MethodValidationPostProcessor();
return new MethodValidationPostProcessor();
}
}
138 changes: 69 additions & 69 deletions src/main/java/com/droidablebee/springboot/rest/domain/Address.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,73 +10,73 @@
@Entity
public class Address {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "address_id")
private Long id;

@NotNull
private String line1;
private String line2;
@NotNull
private String city;
@NotNull
private String state;
@NotNull
private String zip;

public Address() {
}
public Address(String line1, String city, String state, String zip) {

this.line1 = line1;
this.city = city;
this.state = state;
this.zip = zip;
}

public Long getId() {
return id;
}

public String getLine1() {
return line1;
}

public void setLine1(String line1) {
this.line1 = line1;
}

public String getLine2() {
return line2;
}

public void setLine2(String line2) {
this.line2 = line2;
}

public String getCity() {
return city;
}

public void setCity(String city) {
this.city = city;
}

public String getState() {
return state;
}

public void setState(String state) {
this.state = state;
}

public String getZip() {
return zip;
}

public void setZip(String zip) {
this.zip = zip;
}
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "address_id")
private Long id;

@NotNull
private String line1;
private String line2;
@NotNull
private String city;
@NotNull
private String state;
@NotNull
private String zip;

public Address() {
}

public Address(String line1, String city, String state, String zip) {

this.line1 = line1;
this.city = city;
this.state = state;
this.zip = zip;
}

public Long getId() {
return id;
}

public String getLine1() {
return line1;
}

public void setLine1(String line1) {
this.line1 = line1;
}

public String getLine2() {
return line2;
}

public void setLine2(String line2) {
this.line2 = line2;
}

public String getCity() {
return city;
}

public void setCity(String city) {
this.city = city;
}

public String getState() {
return state;
}

public void setState(String state) {
this.state = state;
}

public String getZip() {
return zip;
}

public void setZip(String zip) {
this.zip = zip;
}
}
Loading

0 comments on commit 3a6e76c

Please sign in to comment.