JAVA-24160 Review log statements for projects - Week 33 - 2023

This commit is contained in:
timis1 2023-08-20 09:30:22 +03:00 committed by n
parent 9814ba18ae
commit 814604f2f4
6 changed files with 27 additions and 27 deletions

View File

@ -30,13 +30,13 @@ public class Java8ComparatorUnitTest {
System.out.println("************** Java 8 Comaparator **************");
Comparator<Player> byRanking = (Player player1, Player player2) -> Integer.compare(player1.getRanking(), player2.getRanking());
System.out.println("Before Sorting : " + footballTeam);
Collections.sort(footballTeam, byRanking);
System.out.println("After Sorting : " + footballTeam);
assertEquals(footballTeam.get(0)
.getName(), "Steven");
assertEquals(footballTeam.get(2)
.getRanking(), 67);
assertEquals(footballTeam.get(0).getName(), "Steven");
assertEquals(footballTeam.get(0).getRanking(), 45);
assertEquals(footballTeam.get(1).getName(), "John");
assertEquals(footballTeam.get(1).getRanking(), 59);
assertEquals(footballTeam.get(2).getName(), "Roger");
assertEquals(footballTeam.get(2).getRanking(), 67);
}
@Test
@ -45,24 +45,24 @@ public class Java8ComparatorUnitTest {
System.out.println("********* byRanking *********");
Comparator<Player> byRanking = Comparator.comparing(Player::getRanking);
System.out.println("Before Sorting : " + footballTeam);
Collections.sort(footballTeam, byRanking);
System.out.println("After Sorting : " + footballTeam);
assertEquals(footballTeam.get(0)
.getName(), "Steven");
assertEquals(footballTeam.get(2)
.getRanking(), 67);
assertEquals(footballTeam.get(0).getName(), "Steven");
assertEquals(footballTeam.get(0).getRanking(), 45);
assertEquals(footballTeam.get(1).getName(), "John");
assertEquals(footballTeam.get(1).getRanking(), 59);
assertEquals(footballTeam.get(2).getName(), "Roger");
assertEquals(footballTeam.get(2).getRanking(), 67);
System.out.println("********* byAge *********");
Comparator<Player> byAge = Comparator.comparing(Player::getAge);
System.out.println("Before Sorting : " + footballTeam);
Collections.sort(footballTeam, byAge);
System.out.println("After Sorting : " + footballTeam);
assertEquals(footballTeam.get(0)
.getName(), "Roger");
assertEquals(footballTeam.get(2)
.getRanking(), 45);
assertEquals(footballTeam.get(0).getName(), "Roger");
assertEquals(footballTeam.get(0).getAge(), 20);
assertEquals(footballTeam.get(1).getName(), "John");
assertEquals(footballTeam.get(1).getAge(), 22);
assertEquals(footballTeam.get(2).getName(), "Steven");
assertEquals(footballTeam.get(2).getAge(), 24);
}
}

View File

@ -10,8 +10,8 @@ eureka.client.registryFetchIntervalSeconds = 5
management.security.sessions=never
logging.level.org.springframework.web.=debug
logging.level.org.springframework.security=debug
logging.level.org.springframework.web.=INFO
logging.level.org.springframework.security=INFO
spring.redis.host=localhost
spring.redis.port=6379

View File

@ -6,8 +6,8 @@ eureka.client.registryFetchIntervalSeconds = 5
management.security.sessions=always
logging.level.org.springframework.web.=debug
logging.level.org.springframework.security=debug
logging.level.org.springframework.web.=INFO
logging.level.org.springframework.security=INFO
spring.redis.host=localhost
spring.redis.port=6379

View File

@ -10,8 +10,8 @@ eureka.client.registryFetchIntervalSeconds = 5
management.security.sessions=never
logging.level.org.springframework.web.=debug
logging.level.org.springframework.security=debug
logging.level.org.springframework.web.=INFO
logging.level.org.springframework.security=INFO
spring.redis.host=localhost
spring.redis.port=6379

View File

@ -4,4 +4,4 @@ server.port=9411
eureka.client.region = default
eureka.client.registryFetchIntervalSeconds = 5
logging.level.org.springframework.web=debug
logging.level.org.springframework.web=INFO

View File

@ -4,7 +4,7 @@ feign.okhttp.enabled=true
server.port=8085
spring.main.allow-bean-definition-overriding=true
logging.level.com.baeldung.cloud.openfeign.client=DEBUG
logging.level.com.baeldung.cloud.openfeign.client=INFO
feign.hystrix.enabled=true
spring.cloud.openfeign.client.config.postClient.url=https://jsonplaceholder.typicode.com/posts/