-
Notifications
You must be signed in to change notification settings - Fork 2
Client service #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client service #12
Conversation
@AllArgsConstructor | ||
@Data | ||
@ToString | ||
public class ApartmentRecord { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
@@ -1,2 +1,2 @@ | |||
spring.application.name=realtor-service | |||
feign.hystrix.enabled=true | |||
feign.hystrix.enabled=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use \n
in end of each file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess, to separate different types of configuration and keep clean code, but lets @banadiga answer this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will affect next changes. In a case when we add a new property to the end of the file, we will get a diff with 2 line (but we changed only one.)
@@ -1,5 +1,7 @@ | |||
package com.lohika.jclub.storage.client; | |||
|
|||
import org.springframework.hateoas.ResourceSupport; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
@@ -0,0 +1 @@ | |||
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not commit .mvn/wrapper/maven-wrapper.properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also there is client-service/.mvn/wrapper/maven-wrapper.jar
that is binary file, and which also should be removed.
|
||
@Slf4j | ||
@RestController | ||
public class ClientController { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would like to see some integration tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will create tests in next change-set using test-containers.
PagedResources<Apartment> list = storageServiceClient.list(); | ||
Collection<Apartment> content = list.getContent(); | ||
return new PagedResources<>(content, list.getMetadata()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant line
|
||
@GetMapping("/apartmentsPaged") | ||
public PagedResources<Apartment> getApartmentsPaged(Pageable pageable, | ||
PagedResourcesAssembler assembler) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which line length do you use ? Looks like you may move up this argument and save pretty code style.
@@ -0,0 +1 @@ | |||
feign.hystrix.enabled=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to client-service/src/main/resources/application.properties
@@ -1,2 +1,2 @@ | |||
spring.application.name=realtor-service | |||
feign.hystrix.enabled=true | |||
feign.hystrix.enabled=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will affect next changes. In a case when we add a new property to the end of the file, we will get a diff with 2 line (but we changed only one.)
Added client service
registered in zuul
updated configuration