Skip to content

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

Merged
merged 7 commits into from
Jul 19, 2017
Merged

Client service #12

merged 7 commits into from
Jul 19, 2017

Conversation

tsypuk
Copy link
Contributor

@tsypuk tsypuk commented Jul 6, 2017

Added client service
registered in zuul
updated configuration

@AllArgsConstructor
@Data
@ToString
public class ApartmentRecord {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it used?

Copy link
Contributor Author

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
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why ?

Copy link
Collaborator

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.

Copy link
Member

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it needed?

Copy link
Contributor Author

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
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch )

Copy link
Collaborator

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 {
Copy link
Member

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

Copy link
Contributor Author

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());

Copy link
Collaborator

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) {
Copy link
Collaborator

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
Copy link
Member

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
Copy link
Member

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.)

@tsypuk tsypuk merged commit e8485b0 into master Jul 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants