diff --git a/algorithms-miscellaneous-1/README.md b/algorithms-miscellaneous-1/README.md index 25e2733538..77c621339a 100644 --- a/algorithms-miscellaneous-1/README.md +++ b/algorithms-miscellaneous-1/README.md @@ -10,4 +10,4 @@ This module contains articles about algorithms. Some classes of algorithms, e.g. - [Introduction to Minimax Algorithm](https://www.baeldung.com/java-minimax-algorithm) - [How to Calculate Levenshtein Distance in Java?](https://www.baeldung.com/java-levenshtein-distance) - [How to Find the Kth Largest Element in Java](https://www.baeldung.com/java-kth-largest-element) -- More articles: [[next -->]](/../algorithms-miscellaneous-2) +- More articles: [[next -->]](/algorithms-miscellaneous-2) diff --git a/algorithms-miscellaneous-2/README.md b/algorithms-miscellaneous-2/README.md index 26737b61f0..265416534e 100644 --- a/algorithms-miscellaneous-2/README.md +++ b/algorithms-miscellaneous-2/README.md @@ -14,4 +14,4 @@ This module contains articles about algorithms. Some classes of algorithms, e.g. - [Displaying Money Amounts in Words](https://www.baeldung.com/java-money-into-words) - [A Collaborative Filtering Recommendation System in Java](https://www.baeldung.com/java-collaborative-filtering-recommendations) - [Implementing A* Pathfinding in Java](https://www.baeldung.com/java-a-star-pathfinding) -- More articles: [[<-- prev]](/../algorithms-miscellaneous-1) [[next -->]](/../algorithms-miscellaneous-3) +- More articles: [[<-- prev]](/algorithms-miscellaneous-1) [[next -->]](/algorithms-miscellaneous-3) diff --git a/algorithms-miscellaneous-5/README.md b/algorithms-miscellaneous-5/README.md index 3e6eeb4c93..e5d46ace1c 100644 --- a/algorithms-miscellaneous-5/README.md +++ b/algorithms-miscellaneous-5/README.md @@ -15,5 +15,5 @@ This module contains articles about algorithms. Some classes of algorithms, e.g. - [Maximum Subarray Problem](https://www.baeldung.com/java-maximum-subarray) - [How to Merge Two Sorted Arrays](https://www.baeldung.com/java-merge-sorted-arrays) - [Median of Stream of Integers using Heap](https://www.baeldung.com/java-stream-integers-median-using-heap) -- More articles: [[<-- prev]](/../algorithms-miscellaneous-4) [[next -->]](/../algorithms-miscellaneous-6) +- More articles: [[<-- prev]](/algorithms-miscellaneous-4) [[next -->]](/algorithms-miscellaneous-6) diff --git a/algorithms-miscellaneous-6/README.md b/algorithms-miscellaneous-6/README.md index e1841fced7..5c2306d794 100644 --- a/algorithms-miscellaneous-6/README.md +++ b/algorithms-miscellaneous-6/README.md @@ -10,4 +10,4 @@ - [Implementing a 2048 Solver in Java](https://www.baeldung.com/2048-java-solver) - [Finding Top K Elements in an Array](https://www.baeldung.com/java-array-top-elements) - [Reversing a Linked List in Java](https://www.baeldung.com/java-reverse-linked-list) -- More articles: [[<-- prev]](/../algorithms-miscellaneous-5) +- More articles: [[<-- prev]](/algorithms-miscellaneous-5) diff --git a/core-java-modules/core-java-9-jigsaw/src/modules/com.baeldung.student.service.dbimpl/com/baeldung/student/service/dbimpl/StudentDbService.java b/core-java-modules/core-java-9-jigsaw/src/modules/com.baeldung.student.service.dbimpl/com/baeldung/student/service/dbimpl/StudentDbService.java index 2519da085b..617a0a7e70 100644 --- a/core-java-modules/core-java-9-jigsaw/src/modules/com.baeldung.student.service.dbimpl/com/baeldung/student/service/dbimpl/StudentDbService.java +++ b/core-java-modules/core-java-9-jigsaw/src/modules/com.baeldung.student.service.dbimpl/com/baeldung/student/service/dbimpl/StudentDbService.java @@ -19,12 +19,12 @@ public class StudentDbService implements StudentService { } public Student update(Student student) { - logger.log(Level.INFO, "Updating sutdent in DB..."); + logger.log(Level.INFO, "Updating student in DB..."); return student; } public String delete(String registrationId) { - logger.log(Level.INFO, "Deleteing sutdent in DB..."); + logger.log(Level.INFO, "Deleting student in DB..."); return registrationId; } } \ No newline at end of file diff --git a/core-java-modules/core-java-collections-3/src/main/java/com/baeldung/collections/removeallperformance/HashSetBenchmark.java b/core-java-modules/core-java-collections-3/src/main/java/com/baeldung/collections/removeallperformance/HashSetBenchmark.java index 8ce58c865e..8f784de26d 100644 --- a/core-java-modules/core-java-collections-3/src/main/java/com/baeldung/collections/removeallperformance/HashSetBenchmark.java +++ b/core-java-modules/core-java-collections-3/src/main/java/com/baeldung/collections/removeallperformance/HashSetBenchmark.java @@ -33,11 +33,15 @@ public class HashSetBenchmark { private List employeeList1 = new ArrayList<>(); private Set employeeSet2 = new HashSet<>(); private List employeeList2 = new ArrayList<>(); + private Set employeeSet3 = new HashSet<>(); + private Set employeeSet4 = new HashSet<>(); private long set1Size = 60000; private long list1Size = 50000; private long set2Size = 50000; private long list2Size = 60000; + private long set3Size = 50000; + private long set4Size = 60000; @Setup(Level.Trial) public void setUp() { @@ -57,6 +61,14 @@ public class HashSetBenchmark { for (long i = 0; i < list2Size; i++) { employeeList2.add(new Employee(i, RandomStringUtils.random(7, true, false))); } + + for (long i = 0; i < set3Size; i++) { + employeeSet3.add(new Employee(i, RandomStringUtils.random(7, true, false))); + } + + for (long i = 0; i < set4Size; i++) { + employeeSet4.add(new Employee(i, RandomStringUtils.random(7, true, false))); + } } @@ -71,6 +83,11 @@ public class HashSetBenchmark { public boolean given_SizeOfHashsetSmallerThanSizeOfCollection_When_RemoveAllFromHashSet_Then_BadPerformance(MyState state) { return state.employeeSet2.removeAll(state.employeeList2); } + + @Benchmark + public boolean given_SizeOfHashsetSmallerThanSizeOfAnotherHashSet_When_RemoveAllFromHashSet_Then_GoodPerformance(MyState state) { + return state.employeeSet3.removeAll(state.employeeSet4); + } public static void main(String[] args) throws Exception { Options options = new OptionsBuilder().include(HashSetBenchmark.class.getSimpleName()) diff --git a/core-java-modules/core-java-concurrency-advanced-3/src/main/java/com/baeldung/deadlockAndLivelock/LivelockExample.java b/core-java-modules/core-java-concurrency-advanced-3/src/main/java/com/baeldung/deadlockAndLivelock/LivelockExample.java index b0d66a92c2..7c3ea6f94e 100644 --- a/core-java-modules/core-java-concurrency-advanced-3/src/main/java/com/baeldung/deadlockAndLivelock/LivelockExample.java +++ b/core-java-modules/core-java-concurrency-advanced-3/src/main/java/com/baeldung/deadlockAndLivelock/LivelockExample.java @@ -73,7 +73,7 @@ public class LivelockExample { public void tryLock(Lock lock, long millis) { try { - lock.tryLock(10, TimeUnit.MILLISECONDS); + lock.tryLock(millis, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { e.printStackTrace(); } diff --git a/core-java-modules/core-java-lang-3/src/main/java/com/baeldung/constantspatterns/Calculator.java b/core-java-modules/core-java-lang-3/src/main/java/com/baeldung/constantspatterns/Calculator.java new file mode 100644 index 0000000000..78b51c1c93 --- /dev/null +++ b/core-java-modules/core-java-lang-3/src/main/java/com/baeldung/constantspatterns/Calculator.java @@ -0,0 +1,37 @@ +package com.baeldung.constantspatterns; + +public class Calculator { + public static final double PI = 3.14159265359; + private static final double UPPER_LIMIT = 0x1.fffffffffffffP+1023; + + public enum Operation { + ADD, SUBTRACT, DIVIDE, MULTIPLY + } + + public double operateOnTwoNumbers(double numberOne, double numberTwo, Operation operation) { + if (numberOne > UPPER_LIMIT) { + throw new IllegalArgumentException("'numberOne' is too large"); + } + if (numberTwo > UPPER_LIMIT) { + throw new IllegalArgumentException("'numberTwo' is too large"); + } + double answer = 0; + + switch (operation) { + case ADD: + answer = numberOne + numberTwo; + break; + case SUBTRACT: + answer = numberOne - numberTwo; + break; + case DIVIDE: + answer = numberOne / numberTwo; + break; + case MULTIPLY: + answer = numberOne * numberTwo; + break; + } + + return answer; + } +} diff --git a/core-java-modules/core-java-lang-3/src/main/java/com/baeldung/constantspatterns/CalculatorConstants.java b/core-java-modules/core-java-lang-3/src/main/java/com/baeldung/constantspatterns/CalculatorConstants.java new file mode 100644 index 0000000000..2237782b00 --- /dev/null +++ b/core-java-modules/core-java-lang-3/src/main/java/com/baeldung/constantspatterns/CalculatorConstants.java @@ -0,0 +1,10 @@ +package com.baeldung.constantspatterns; + +public interface CalculatorConstants { + double PI = 3.14159265359; + double UPPER_LIMIT = 0x1.fffffffffffffP+1023; + + enum Operation { + ADD, SUBTRACT, MULTIPLY, DIVIDE + }; +} diff --git a/core-java-modules/core-java-lang-3/src/main/java/com/baeldung/constantspatterns/GeometryCalculator.java b/core-java-modules/core-java-lang-3/src/main/java/com/baeldung/constantspatterns/GeometryCalculator.java new file mode 100644 index 0000000000..47a0dc5233 --- /dev/null +++ b/core-java-modules/core-java-lang-3/src/main/java/com/baeldung/constantspatterns/GeometryCalculator.java @@ -0,0 +1,32 @@ +package com.baeldung.constantspatterns; + +public class GeometryCalculator implements CalculatorConstants { + public static final double UPPER_LIMIT = 100000000000000000000.0; + + public double operateOnTwoNumbers(double numberOne, double numberTwo, Operation operation) { + if (numberOne > UPPER_LIMIT) { + throw new IllegalArgumentException("'numberOne' is too large"); + } + if (numberTwo > UPPER_LIMIT) { + throw new IllegalArgumentException("'numberTwo' is too large"); + } + double answer = 0; + + switch (operation) { + case ADD: + answer = numberOne + numberTwo; + break; + case SUBTRACT: + answer = numberOne - numberTwo; + break; + case DIVIDE: + answer = numberOne / numberTwo; + break; + case MULTIPLY: + answer = numberOne * numberTwo; + break; + } + + return answer; + } +} diff --git a/core-java-modules/core-java-lang-3/src/main/java/com/baeldung/constantspatterns/calculations/MathConstants.java b/core-java-modules/core-java-lang-3/src/main/java/com/baeldung/constantspatterns/calculations/MathConstants.java new file mode 100644 index 0000000000..1c9c4172ca --- /dev/null +++ b/core-java-modules/core-java-lang-3/src/main/java/com/baeldung/constantspatterns/calculations/MathConstants.java @@ -0,0 +1,16 @@ +package com.baeldung.constantspatterns.calculations; + +public final class MathConstants { + public static final double PI = 3.14159265359; + static final double GOLDEN_RATIO = 1.6180; + static final double GRAVITATIONAL_ACCELERATION = 9.8; + static final double EULERS_NUMBER = 2.7182818284590452353602874713527; + + public enum Operation { + ADD, SUBTRACT, DIVIDE, MULTIPLY + } + + private MathConstants() { + + } +} diff --git a/core-java-modules/core-java-lang-3/src/test/java/com/baeldung/constantspatterns/ConstantPatternUnitTest.java b/core-java-modules/core-java-lang-3/src/test/java/com/baeldung/constantspatterns/ConstantPatternUnitTest.java new file mode 100644 index 0000000000..ba8f237fd3 --- /dev/null +++ b/core-java-modules/core-java-lang-3/src/test/java/com/baeldung/constantspatterns/ConstantPatternUnitTest.java @@ -0,0 +1,23 @@ +package com.baeldung.constantspatterns; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.Test; + +public class ConstantPatternUnitTest { + @Test + public void givenTwoNumbersAndAdd_whenCallingCalculatorOperatOneTwoNumbers_thenCorrectAnswerReturned() { + Calculator calculator = new Calculator(); + double expected = 4; + double answer = calculator.operateOnTwoNumbers(2, 2, Calculator.Operation.ADD); + assertEquals(expected, answer); + } + + @Test + public void givenTwoNumbersAndAdd_whenCallingGeometryCalculatorOperatOneTwoNumbers_thenCorrectAnswerReturned() { + GeometryCalculator calculator = new GeometryCalculator(); + double expected = 4; + double answer = calculator.operateOnTwoNumbers(2, 2, GeometryCalculator.Operation.ADD); + assertEquals(expected, answer); + } +} diff --git a/core-java-modules/core-java-security-2/src/main/java/com/baeldung/hashing/SHACommonUtils.java b/core-java-modules/core-java-security-2/src/main/java/com/baeldung/hashing/SHACommonUtils.java index 0f28408083..699e9141a4 100644 --- a/core-java-modules/core-java-security-2/src/main/java/com/baeldung/hashing/SHACommonUtils.java +++ b/core-java-modules/core-java-security-2/src/main/java/com/baeldung/hashing/SHACommonUtils.java @@ -3,7 +3,7 @@ package com.baeldung.hashing; class SHACommonUtils { public static String bytesToHex(byte[] hash) { - StringBuffer hexString = new StringBuffer(); + StringBuilder hexString = new StringBuilder(2 * hash.length); for (byte h : hash) { String hex = Integer.toHexString(0xff & h); if (hex.length() == 1) diff --git a/ddd/pom.xml b/ddd/pom.xml index a67719f8a6..7d03208802 100644 --- a/ddd/pom.xml +++ b/ddd/pom.xml @@ -104,16 +104,12 @@ org.apache.maven.plugins maven-surefire-plugin - ${maven-surefire-plugin.version} - 2.22.2 - 1.0.1 - 5.6.2 diff --git a/maven-modules/maven-plugins/custom-rule/pom.xml b/maven-modules/maven-plugins/custom-rule/pom.xml index 0fb551e71b..075a5c7943 100644 --- a/maven-modules/maven-plugins/custom-rule/pom.xml +++ b/maven-modules/maven-plugins/custom-rule/pom.xml @@ -51,4 +51,17 @@ 1.0-alpha-9 + + + + maven-verifier-plugin + ${maven.verifier.version} + + ../input-resources/verifications.xml + false + + + + + diff --git a/maven-modules/maven-plugins/pom.xml b/maven-modules/maven-plugins/pom.xml index 4877f00a92..9f28871ec0 100644 --- a/maven-modules/maven-plugins/pom.xml +++ b/maven-modules/maven-plugins/pom.xml @@ -15,7 +15,7 @@ - + custom-rule maven-enforcer diff --git a/persistence-modules/core-java-persistence-2/pom.xml b/persistence-modules/core-java-persistence-2/pom.xml new file mode 100644 index 0000000000..9845d5009d --- /dev/null +++ b/persistence-modules/core-java-persistence-2/pom.xml @@ -0,0 +1,29 @@ + + + 4.0.0 + com.baeldung.core-java-persistence-2 + core-java-persistence-2 + 0.1.0-SNAPSHOT + core-java-persistence-2 + jar + + + com.baeldung + persistence-modules + 1.0.0-SNAPSHOT + + + + + com.h2database + h2 + ${h2.version} + + + + + 1.4.200 + + + \ No newline at end of file diff --git a/persistence-modules/core-java-persistence-2/src/main/java/com/baeldung/getdburl/DBConfiguration.java b/persistence-modules/core-java-persistence-2/src/main/java/com/baeldung/getdburl/DBConfiguration.java new file mode 100644 index 0000000000..51d3a432ac --- /dev/null +++ b/persistence-modules/core-java-persistence-2/src/main/java/com/baeldung/getdburl/DBConfiguration.java @@ -0,0 +1,13 @@ +package com.baeldung.getdburl; + +import java.sql.Connection; +import java.sql.DriverManager; + +public class DBConfiguration { + + public static Connection getConnection() throws Exception { + Class.forName("org.h2.Driver"); + String url = "jdbc:h2:mem:testdb"; + return DriverManager.getConnection(url, "user", "password"); + } +} diff --git a/persistence-modules/core-java-persistence-2/src/test/java/com/baeldung/getdburl/DBConfigurationUnitTest.java b/persistence-modules/core-java-persistence-2/src/test/java/com/baeldung/getdburl/DBConfigurationUnitTest.java new file mode 100644 index 0000000000..845076f070 --- /dev/null +++ b/persistence-modules/core-java-persistence-2/src/test/java/com/baeldung/getdburl/DBConfigurationUnitTest.java @@ -0,0 +1,18 @@ +package com.baeldung.getdburl; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.sql.Connection; + +import org.junit.jupiter.api.Test; + +class DBConfigurationUnitTest { + + @Test + void givenConnectionObject_whenExtractMetaData_thenGetDbURL() throws Exception { + Connection connection = DBConfiguration.getConnection(); + String dbUrl = connection.getMetaData().getURL(); + assertEquals("jdbc:h2:mem:testdb", dbUrl); + } + +} diff --git a/persistence-modules/flyway-repair/pom.xml b/persistence-modules/flyway-repair/pom.xml index 82e5d705f9..2c283cfc04 100644 --- a/persistence-modules/flyway-repair/pom.xml +++ b/persistence-modules/flyway-repair/pom.xml @@ -76,10 +76,6 @@ src/main/resources/application-${spring-boot.run.profiles}.properties - - 2.22.2 - 5.6.2 - 4.13 diff --git a/persistence-modules/flyway/pom.xml b/persistence-modules/flyway/pom.xml index 2379f996d7..c4a3363bdc 100644 --- a/persistence-modules/flyway/pom.xml +++ b/persistence-modules/flyway/pom.xml @@ -66,10 +66,6 @@ 5.2.3 5.0.2 - - 2.22.2 - 5.6.2 - 4.13 diff --git a/persistence-modules/pom.xml b/persistence-modules/pom.xml index 05ef14f188..c7905a178d 100644 --- a/persistence-modules/pom.xml +++ b/persistence-modules/pom.xml @@ -17,6 +17,7 @@ apache-bookkeeper apache-cayenne core-java-persistence + core-java-persistence-2 deltaspike elasticsearch flyway diff --git a/persistence-modules/r2dbc/pom.xml b/persistence-modules/r2dbc/pom.xml index 7083eea64d..01f1b351cd 100644 --- a/persistence-modules/r2dbc/pom.xml +++ b/persistence-modules/r2dbc/pom.xml @@ -69,10 +69,6 @@ 0.8.1.RELEASE 1.4.200 - - 2.22.2 - 5.6.2 - 4.13 diff --git a/persistence-modules/redis/pom.xml b/persistence-modules/redis/pom.xml index 9e00566767..fa82bebc64 100644 --- a/persistence-modules/redis/pom.xml +++ b/persistence-modules/redis/pom.xml @@ -62,10 +62,6 @@ 3.3.0 4.1.50.Final - - 2.22.2 - 5.6.2 - 4.13 diff --git a/persistence-modules/spring-boot-mysql/pom.xml b/persistence-modules/spring-boot-mysql/pom.xml index 9b8c6d0028..834d1d1e64 100644 --- a/persistence-modules/spring-boot-mysql/pom.xml +++ b/persistence-modules/spring-boot-mysql/pom.xml @@ -40,10 +40,6 @@ 8.0.12 - - 2.22.2 - 5.6.2 - 4.13 diff --git a/persistence-modules/spring-boot-persistence-h2/pom.xml b/persistence-modules/spring-boot-persistence-h2/pom.xml index 23520a3fda..c06c35cfee 100644 --- a/persistence-modules/spring-boot-persistence-h2/pom.xml +++ b/persistence-modules/spring-boot-persistence-h2/pom.xml @@ -47,10 +47,6 @@ com.baeldung.h2db.demo.server.SpringBootApp 1.0.4 - - 2.22.2 - 5.6.2 - 4.13 diff --git a/persistence-modules/spring-boot-persistence-mongodb/pom.xml b/persistence-modules/spring-boot-persistence-mongodb/pom.xml index 69ef09356d..5167483aa3 100644 --- a/persistence-modules/spring-boot-persistence-mongodb/pom.xml +++ b/persistence-modules/spring-boot-persistence-mongodb/pom.xml @@ -37,9 +37,5 @@ - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/persistence-modules/spring-boot-persistence/pom.xml b/persistence-modules/spring-boot-persistence/pom.xml index b034f6dad9..9e44a7b9c1 100644 --- a/persistence-modules/spring-boot-persistence/pom.xml +++ b/persistence-modules/spring-boot-persistence/pom.xml @@ -76,11 +76,6 @@ 2.23.0 2.0.1.Final - - - 2.22.2 - 5.6.2 - 4.13 diff --git a/persistence-modules/spring-data-cassandra-reactive/pom.xml b/persistence-modules/spring-data-cassandra-reactive/pom.xml index 42329e03f0..f2f71bceac 100644 --- a/persistence-modules/spring-data-cassandra-reactive/pom.xml +++ b/persistence-modules/spring-data-cassandra-reactive/pom.xml @@ -54,10 +54,6 @@ 2.2.6.RELEASE 3.11.2.0 - - 2.22.2 - 5.6.2 - 4.13 diff --git a/persistence-modules/spring-data-cassandra/pom.xml b/persistence-modules/spring-data-cassandra/pom.xml index a56d067a05..9de1cbf20e 100644 --- a/persistence-modules/spring-data-cassandra/pom.xml +++ b/persistence-modules/spring-data-cassandra/pom.xml @@ -105,10 +105,6 @@ 2.1.9.2 2.0-0 - - 2.22.2 - 5.6.2 - 4.13 diff --git a/persistence-modules/spring-data-cosmosdb/pom.xml b/persistence-modules/spring-data-cosmosdb/pom.xml index 0f9e8ac72f..19a66648b2 100644 --- a/persistence-modules/spring-data-cosmosdb/pom.xml +++ b/persistence-modules/spring-data-cosmosdb/pom.xml @@ -17,10 +17,6 @@ 1.8 2.3.0 - - 2.22.2 - 5.6.2 - 4.13 diff --git a/persistence-modules/spring-data-dynamodb/pom.xml b/persistence-modules/spring-data-dynamodb/pom.xml index 0f4b578088..377e35b635 100644 --- a/persistence-modules/spring-data-dynamodb/pom.xml +++ b/persistence-modules/spring-data-dynamodb/pom.xml @@ -182,11 +182,6 @@ 1.11.86 https://s3-us-west-2.amazonaws.com/dynamodb-local/release 3.1.1 - - - 2.22.2 - 5.6.2 - 4.13 diff --git a/persistence-modules/spring-data-elasticsearch/pom.xml b/persistence-modules/spring-data-elasticsearch/pom.xml index c94962d39d..6a983145ee 100644 --- a/persistence-modules/spring-data-elasticsearch/pom.xml +++ b/persistence-modules/spring-data-elasticsearch/pom.xml @@ -69,10 +69,5 @@ 1.2.47 0.7 1.15.0 - - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/persistence-modules/spring-data-jdbc/pom.xml b/persistence-modules/spring-data-jdbc/pom.xml index eca8037e20..15f8d7fb95 100644 --- a/persistence-modules/spring-data-jdbc/pom.xml +++ b/persistence-modules/spring-data-jdbc/pom.xml @@ -28,9 +28,5 @@ - - 2.22.2 - 5.6.2 - 4.13 diff --git a/persistence-modules/spring-data-jpa-annotations/pom.xml b/persistence-modules/spring-data-jpa-annotations/pom.xml index ea2fe34f3c..ff30790eaf 100644 --- a/persistence-modules/spring-data-jpa-annotations/pom.xml +++ b/persistence-modules/spring-data-jpa-annotations/pom.xml @@ -73,10 +73,6 @@ 42.2.5 21.0 - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/persistence-modules/spring-data-jpa-crud/pom.xml b/persistence-modules/spring-data-jpa-crud/pom.xml index 44944298e0..16ee74aa62 100644 --- a/persistence-modules/spring-data-jpa-crud/pom.xml +++ b/persistence-modules/spring-data-jpa-crud/pom.xml @@ -16,10 +16,6 @@ - - org.springframework.boot - spring-boot-starter-web - org.springframework.boot spring-boot-starter-data-jpa @@ -66,11 +62,6 @@ 1.4.1 21.0 1.12.2 - - - 2.22.2 - 5.6.2 - 4.13 diff --git a/persistence-modules/spring-data-jpa-enterprise/pom.xml b/persistence-modules/spring-data-jpa-enterprise/pom.xml index 9ecab5feaa..7ff2f00fdf 100644 --- a/persistence-modules/spring-data-jpa-enterprise/pom.xml +++ b/persistence-modules/spring-data-jpa-enterprise/pom.xml @@ -99,10 +99,6 @@ 21.0 1.12.2 - - 2.22.2 - 5.6.2 - 4.13 diff --git a/persistence-modules/spring-data-jpa-filtering/pom.xml b/persistence-modules/spring-data-jpa-filtering/pom.xml index 7448a5a818..25ef68fe4c 100644 --- a/persistence-modules/spring-data-jpa-filtering/pom.xml +++ b/persistence-modules/spring-data-jpa-filtering/pom.xml @@ -73,10 +73,6 @@ 42.2.5 21.0 - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/persistence-modules/spring-data-jpa-query-2/pom.xml b/persistence-modules/spring-data-jpa-query-2/pom.xml index abac7b28da..282a1ff83a 100644 --- a/persistence-modules/spring-data-jpa-query-2/pom.xml +++ b/persistence-modules/spring-data-jpa-query-2/pom.xml @@ -84,10 +84,6 @@ - - 2.22.2 - 5.6.2 - 4.13 9.0.0.M26 1.1 21.0 diff --git a/persistence-modules/spring-data-jpa-query/pom.xml b/persistence-modules/spring-data-jpa-query/pom.xml index fe42d4b595..1576fd729d 100644 --- a/persistence-modules/spring-data-jpa-query/pom.xml +++ b/persistence-modules/spring-data-jpa-query/pom.xml @@ -44,10 +44,6 @@ 1.4.1 - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/persistence-modules/spring-data-jpa-repo-2/pom.xml b/persistence-modules/spring-data-jpa-repo-2/pom.xml index 98ecdc6645..3be1068d8c 100644 --- a/persistence-modules/spring-data-jpa-repo-2/pom.xml +++ b/persistence-modules/spring-data-jpa-repo-2/pom.xml @@ -44,9 +44,5 @@ 29.0-jre - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/persistence-modules/spring-data-jpa-repo/pom.xml b/persistence-modules/spring-data-jpa-repo/pom.xml index 07514e9771..16a214fd7f 100644 --- a/persistence-modules/spring-data-jpa-repo/pom.xml +++ b/persistence-modules/spring-data-jpa-repo/pom.xml @@ -50,9 +50,6 @@ - - 2.22.2 - 5.6.2 - 4.13 + \ No newline at end of file diff --git a/persistence-modules/spring-data-keyvalue/pom.xml b/persistence-modules/spring-data-keyvalue/pom.xml index 190d6c7445..3aaee2f00c 100644 --- a/persistence-modules/spring-data-keyvalue/pom.xml +++ b/persistence-modules/spring-data-keyvalue/pom.xml @@ -29,9 +29,6 @@ - - 2.22.2 - 5.6.2 - 4.13 + \ No newline at end of file diff --git a/persistence-modules/spring-data-mongodb/pom.xml b/persistence-modules/spring-data-mongodb/pom.xml index a3a81fe450..448b635667 100644 --- a/persistence-modules/spring-data-mongodb/pom.xml +++ b/persistence-modules/spring-data-mongodb/pom.xml @@ -108,10 +108,6 @@ 3.2.0.RELEASE 4.0.5 - - 2.22.2 - 5.6.2 - 4.13 diff --git a/persistence-modules/spring-data-redis/pom.xml b/persistence-modules/spring-data-redis/pom.xml index 34674dc223..d271df31c7 100644 --- a/persistence-modules/spring-data-redis/pom.xml +++ b/persistence-modules/spring-data-redis/pom.xml @@ -98,11 +98,6 @@ 3.2.4 0.10.0 0.6 - - - 2.22.2 - 5.6.2 - 4.13 diff --git a/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/config/RedisConfig.java b/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/config/RedisConfig.java index 497e1506bd..7fd13d2777 100644 --- a/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/config/RedisConfig.java +++ b/persistence-modules/spring-data-redis/src/main/java/com/baeldung/spring/data/redis/config/RedisConfig.java @@ -5,7 +5,6 @@ import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; -import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.listener.ChannelTopic; import org.springframework.data.redis.listener.RedisMessageListenerContainer; diff --git a/persistence-modules/spring-data-redis/src/test/java/com/baeldung/SpringContextTest.java b/persistence-modules/spring-data-redis/src/test/java/com/baeldung/SpringContextTest.java index 4df0cbd0ad..5167e63721 100644 --- a/persistence-modules/spring-data-redis/src/test/java/com/baeldung/SpringContextTest.java +++ b/persistence-modules/spring-data-redis/src/test/java/com/baeldung/SpringContextTest.java @@ -1,16 +1,32 @@ package com.baeldung; +import org.junit.AfterClass; +import org.junit.BeforeClass; import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.annotation.DirtiesContext.ClassMode; -import com.baeldung.spring.data.redis.config.RedisConfig; +import com.baeldung.spring.data.redis.SpringRedisApplication; -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(classes = RedisConfig.class) +import redis.embedded.RedisServerBuilder; + +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = SpringRedisApplication.class) +@DirtiesContext(classMode = ClassMode.BEFORE_CLASS) public class SpringContextTest { + + private static redis.embedded.RedisServer redisServer; + + @BeforeClass + public static void startRedisServer() { + redisServer = new RedisServerBuilder().port(6379).setting("maxmemory 256M").build(); + redisServer.start(); + } + @AfterClass + public static void stopRedisServer() { + redisServer.stop(); + } @Test public void whenSpringContextIsBootstrapped_thenNoExceptions() { } diff --git a/persistence-modules/spring-data-solr/pom.xml b/persistence-modules/spring-data-solr/pom.xml index 94a796c466..38b5bf8238 100644 --- a/persistence-modules/spring-data-solr/pom.xml +++ b/persistence-modules/spring-data-solr/pom.xml @@ -46,10 +46,6 @@ 2.0.5.RELEASE - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/persistence-modules/spring-jdbc/pom.xml b/persistence-modules/spring-jdbc/pom.xml index 77200cd66e..8a5786e1a5 100644 --- a/persistence-modules/spring-jdbc/pom.xml +++ b/persistence-modules/spring-jdbc/pom.xml @@ -18,7 +18,6 @@ org.springframework.data spring-data-jdbc - ${spring-data-jdbc.version} org.springframework.boot @@ -36,11 +35,5 @@ - 2.0.3.RELEASE - - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/spring-boot-modules/spring-boot-mvc-birt/pom.xml b/spring-boot-modules/spring-boot-mvc-birt/pom.xml index 0ab744bb26..4963cc3036 100644 --- a/spring-boot-modules/spring-boot-mvc-birt/pom.xml +++ b/spring-boot-modules/spring-boot-mvc-birt/pom.xml @@ -4,11 +4,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 + - com.baeldung.spring-boot-modules - spring-boot-modules - 1.0.0-SNAPSHOT - ../ + org.springframework.boot + spring-boot-starter-parent + 2.1.1.RELEASE + spring-boot-mvc-birt @@ -19,10 +20,6 @@ Module For Spring Boot Integration with BIRT - - org.springframework.boot - spring-boot-starter - org.springframework.boot @@ -51,17 +48,14 @@ org.eclipse.birt.runtime_4.8.0-20180626 ${eclipse.birt.runtime.version} - log4j log4j ${log4j.version} - org.projectlombok lombok - ${lombok.version} provided @@ -81,6 +75,7 @@ 1.8 1.8 4.8.0 + 1.2.17 diff --git a/spring-boot-modules/spring-boot-mvc-birt/src/main/resources/log4j.properties b/spring-boot-modules/spring-boot-mvc-birt/src/main/resources/log4j.properties new file mode 100644 index 0000000000..e4fcb01308 --- /dev/null +++ b/spring-boot-modules/spring-boot-mvc-birt/src/main/resources/log4j.properties @@ -0,0 +1,9 @@ +# Set root logger level to DEBUG and its only appender to A1. +log4j.rootLogger=DEBUG, A1 + +# A1 is set to be a ConsoleAppender. +log4j.appender.A1=org.apache.log4j.ConsoleAppender + +# A1 uses PatternLayout. +log4j.appender.A1.layout=org.apache.log4j.PatternLayout +log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n \ No newline at end of file diff --git a/spring-boot-modules/spring-boot-mvc-birt/src/test/java/com/baeldung/birt/engine/SpringContextTest.java b/spring-boot-modules/spring-boot-mvc-birt/src/test/java/com/baeldung/birt/engine/SpringContextTest.java new file mode 100644 index 0000000000..5235a494df --- /dev/null +++ b/spring-boot-modules/spring-boot-mvc-birt/src/test/java/com/baeldung/birt/engine/SpringContextTest.java @@ -0,0 +1,13 @@ +package com.baeldung.birt.engine; + +import org.junit.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +public class SpringContextTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + + } +} diff --git a/spring-cloud/pom.xml b/spring-cloud/pom.xml index 928db8adb7..c0e452afaf 100644 --- a/spring-cloud/pom.xml +++ b/spring-cloud/pom.xml @@ -52,7 +52,6 @@ org.springframework.boot spring-boot-maven-plugin - ${spring-boot-maven-plugin.version} @@ -85,13 +84,7 @@ 1.4.7.RELEASE 1.4.7.RELEASE 3.0.6.RELEASE - 2.3.1.RELEASE - 2.3.1.RELEASE - - 2.22.2 - 5.6.2 - 4.13 diff --git a/spring-cloud/spring-cloud-aws/pom.xml b/spring-cloud/spring-cloud-aws/pom.xml index 3952ffdec1..f65db6a2fe 100644 --- a/spring-cloud/spring-cloud-aws/pom.xml +++ b/spring-cloud/spring-cloud-aws/pom.xml @@ -68,10 +68,6 @@ Dalston.SR4 2.2.1.RELEASE - - 2.22.2 - 5.6.2 - 4.13 diff --git a/spring-cloud/spring-cloud-bootstrap/config/pom.xml b/spring-cloud/spring-cloud-bootstrap/config/pom.xml index 65a9830495..6ebf23637e 100644 --- a/spring-cloud/spring-cloud-bootstrap/config/pom.xml +++ b/spring-cloud/spring-cloud-bootstrap/config/pom.xml @@ -30,13 +30,6 @@ - - org.junit - junit-bom - ${junit-jupiter.version} - pom - import - org.springframework.cloud spring-cloud-dependencies @@ -50,10 +43,6 @@ Brixton.SR7 - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/spring-cloud/spring-cloud-bootstrap/customer-service/pom.xml b/spring-cloud/spring-cloud-bootstrap/customer-service/pom.xml index 026a7a1841..729abb4f05 100644 --- a/spring-cloud/spring-cloud-bootstrap/customer-service/pom.xml +++ b/spring-cloud/spring-cloud-bootstrap/customer-service/pom.xml @@ -17,13 +17,6 @@ - - org.springframework.boot - spring-boot-dependencies - ${spring-boot.version} - pom - import - org.springframework.boot spring-boot-starter-web @@ -78,10 +71,5 @@ 1.8 1.8 - - - 2.22.2 - 5.6.2 - 4.13 diff --git a/spring-cloud/spring-cloud-bootstrap/discovery/pom.xml b/spring-cloud/spring-cloud-bootstrap/discovery/pom.xml index eaebaacc4d..d77e29768f 100644 --- a/spring-cloud/spring-cloud-bootstrap/discovery/pom.xml +++ b/spring-cloud/spring-cloud-bootstrap/discovery/pom.xml @@ -52,10 +52,6 @@ Edgware.SR5 - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/spring-cloud/spring-cloud-bootstrap/gateway/pom.xml b/spring-cloud/spring-cloud-bootstrap/gateway/pom.xml index aacd2cdbf7..34b7af7c0a 100644 --- a/spring-cloud/spring-cloud-bootstrap/gateway/pom.xml +++ b/spring-cloud/spring-cloud-bootstrap/gateway/pom.xml @@ -101,10 +101,6 @@ Dalston.RELEASE - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/spring-cloud/spring-cloud-bootstrap/order-service/pom.xml b/spring-cloud/spring-cloud-bootstrap/order-service/pom.xml index 04901f9936..a32bd5a2d3 100644 --- a/spring-cloud/spring-cloud-bootstrap/order-service/pom.xml +++ b/spring-cloud/spring-cloud-bootstrap/order-service/pom.xml @@ -23,13 +23,6 @@ - - org.junit - junit-bom - ${junit-jupiter.version} - pom - import - org.springframework.boot spring-boot-dependencies @@ -126,9 +119,5 @@ 1.8 com.baeldung.orderservice.OrderApplication - - 2.22.2 - 5.6.2 - 4.13 diff --git a/spring-cloud/spring-cloud-bootstrap/svc-book/pom.xml b/spring-cloud/spring-cloud-bootstrap/svc-book/pom.xml index cf34e44f24..de0785bd45 100644 --- a/spring-cloud/spring-cloud-bootstrap/svc-book/pom.xml +++ b/spring-cloud/spring-cloud-bootstrap/svc-book/pom.xml @@ -74,10 +74,6 @@ Dalston.RELEASE - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/spring-cloud/spring-cloud-bootstrap/svc-rating/pom.xml b/spring-cloud/spring-cloud-bootstrap/svc-rating/pom.xml index a232861cad..0cce78276a 100644 --- a/spring-cloud/spring-cloud-bootstrap/svc-rating/pom.xml +++ b/spring-cloud/spring-cloud-bootstrap/svc-rating/pom.xml @@ -83,10 +83,6 @@ Dalston.RELEASE - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/spring-cloud/spring-cloud-bootstrap/zipkin/pom.xml b/spring-cloud/spring-cloud-bootstrap/zipkin/pom.xml index 134038b94a..b83c5a2aaa 100644 --- a/spring-cloud/spring-cloud-bootstrap/zipkin/pom.xml +++ b/spring-cloud/spring-cloud-bootstrap/zipkin/pom.xml @@ -38,13 +38,6 @@ - - org.junit - junit-bom - ${junit-jupiter.version} - pom - import - org.springframework.cloud spring-cloud-dependencies @@ -58,10 +51,6 @@ Brixton.SR7 - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/spring-cloud/spring-cloud-config/pom.xml b/spring-cloud/spring-cloud-config/pom.xml index e693bc7a29..7fb0c1fd68 100644 --- a/spring-cloud/spring-cloud-config/pom.xml +++ b/spring-cloud/spring-cloud-config/pom.xml @@ -22,13 +22,6 @@ - - org.junit - junit-bom - ${junit-jupiter.version} - pom - import - org.springframework.cloud spring-cloud-dependencies @@ -42,10 +35,6 @@ Hoxton.SR4 - - 2.22.2 - 5.6.2 - 4.13 diff --git a/spring-cloud/spring-cloud-connectors-heroku/pom.xml b/spring-cloud/spring-cloud-connectors-heroku/pom.xml index 2e84061be9..e71e1350a2 100644 --- a/spring-cloud/spring-cloud-connectors-heroku/pom.xml +++ b/spring-cloud/spring-cloud-connectors-heroku/pom.xml @@ -65,10 +65,6 @@ 42.2.10 1.10.10 - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/spring-cloud/spring-cloud-functions/pom.xml b/spring-cloud/spring-cloud-functions/pom.xml index 19b5e3cd8d..0be3941db1 100644 --- a/spring-cloud/spring-cloud-functions/pom.xml +++ b/spring-cloud/spring-cloud-functions/pom.xml @@ -87,10 +87,6 @@ 1.1.0 1.0.10.RELEASE - - 2.22.2 - 5.6.2 - 4.13 diff --git a/spring-cloud/spring-cloud-functions/src/main/java/com/baeldung/spring/cloudfunction/aws/functions/Greeter.java b/spring-cloud/spring-cloud-functions/src/main/java/com/baeldung/spring/cloudfunction/aws/functions/Greeter.java index c443b98c18..bbc87a4ae2 100644 --- a/spring-cloud/spring-cloud-functions/src/main/java/com/baeldung/spring/cloudfunction/aws/functions/Greeter.java +++ b/spring-cloud/spring-cloud-functions/src/main/java/com/baeldung/spring/cloudfunction/aws/functions/Greeter.java @@ -1,4 +1,4 @@ -package com.baeldung.spring.cloudfunction.functions.aws; +package com.baeldung.spring.cloudfunction.aws.functions; import java.util.function.Function; diff --git a/spring-cloud/spring-cloud-functions/src/main/resources/application.properties b/spring-cloud/spring-cloud-functions/src/main/resources/application.properties index b445bfa4ed..2cb479879c 100644 --- a/spring-cloud/spring-cloud-functions/src/main/resources/application.properties +++ b/spring-cloud/spring-cloud-functions/src/main/resources/application.properties @@ -1 +1 @@ -spring.cloud.function.scan.packages: com.baeldung.spring.cloudfunction.functions.aws \ No newline at end of file +spring.cloud.function.scan.packages: com.baeldung.spring.cloudfunction.aws.functions \ No newline at end of file diff --git a/spring-cloud/spring-cloud-hystrix/feign-rest-consumer/pom.xml b/spring-cloud/spring-cloud-hystrix/feign-rest-consumer/pom.xml index 9b43542f02..204cb8765c 100644 --- a/spring-cloud/spring-cloud-hystrix/feign-rest-consumer/pom.xml +++ b/spring-cloud/spring-cloud-hystrix/feign-rest-consumer/pom.xml @@ -58,7 +58,6 @@ org.springframework.boot spring-boot-starter-web - ${spring-boot-starter-web.version} org.springframework.boot diff --git a/spring-cloud/spring-cloud-hystrix/rest-consumer/pom.xml b/spring-cloud/spring-cloud-hystrix/rest-consumer/pom.xml index 7989b09ed4..44e5bf2501 100644 --- a/spring-cloud/spring-cloud-hystrix/rest-consumer/pom.xml +++ b/spring-cloud/spring-cloud-hystrix/rest-consumer/pom.xml @@ -47,24 +47,20 @@ org.springframework.boot spring-boot-starter-web - ${spring-boot-starter-web.version} org.springframework.boot spring-boot-starter-thymeleaf - ${spring-boot-starter-web.version} org.springframework.boot spring-boot-starter-actuator - ${spring-boot-starter-web.version} org.springframework.boot spring-boot-starter-test test - ${spring-boot-starter-web.version} diff --git a/spring-cloud/spring-cloud-hystrix/rest-producer/pom.xml b/spring-cloud/spring-cloud-hystrix/rest-producer/pom.xml index cb7377d705..e7be8f2c58 100644 --- a/spring-cloud/spring-cloud-hystrix/rest-producer/pom.xml +++ b/spring-cloud/spring-cloud-hystrix/rest-producer/pom.xml @@ -18,13 +18,11 @@ org.springframework.boot spring-boot-starter-web - ${spring-boot-starter-web.version} org.springframework.boot spring-boot-starter-test - ${spring-boot-starter-web.version} test diff --git a/spring-cloud/spring-cloud-kubernetes/pom.xml b/spring-cloud/spring-cloud-kubernetes/pom.xml index c936024753..a3669d2d55 100644 --- a/spring-cloud/spring-cloud-kubernetes/pom.xml +++ b/spring-cloud/spring-cloud-kubernetes/pom.xml @@ -25,9 +25,5 @@ - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/spring-cloud/spring-cloud-openfeign/src/main/java/com/baeldung/cloud/openfeign/config/ClientConfiguration.java b/spring-cloud/spring-cloud-openfeign/src/main/java/com/baeldung/cloud/openfeign/config/ClientConfiguration.java index 0b16134e92..55c27dde2f 100644 --- a/spring-cloud/spring-cloud-openfeign/src/main/java/com/baeldung/cloud/openfeign/config/ClientConfiguration.java +++ b/spring-cloud/spring-cloud-openfeign/src/main/java/com/baeldung/cloud/openfeign/config/ClientConfiguration.java @@ -2,6 +2,7 @@ package com.baeldung.cloud.openfeign.config; import feign.Logger; import feign.RequestInterceptor; +import feign.auth.BasicAuthRequestInterceptor; import feign.codec.ErrorDecoder; import feign.okhttp.OkHttpClient; import org.apache.http.entity.ContentType; @@ -34,4 +35,9 @@ public class ClientConfiguration { requestTemplate.header("Accept", ContentType.APPLICATION_JSON.getMimeType()); }; } + + // @Bean - uncomment to use this interceptor and remove @Bean from the requestInterceptor() + public BasicAuthRequestInterceptor basicAuthRequestInterceptor() { + return new BasicAuthRequestInterceptor("ajeje", "brazof"); + } } diff --git a/spring-cloud/spring-cloud-openfeign/src/test/java/com/baeldung/cloud/openfeign/OpenfeignUnitTest.java b/spring-cloud/spring-cloud-openfeign/src/test/java/com/baeldung/cloud/openfeign/OpenfeignManualTest.java similarity index 100% rename from spring-cloud/spring-cloud-openfeign/src/test/java/com/baeldung/cloud/openfeign/OpenfeignUnitTest.java rename to spring-cloud/spring-cloud-openfeign/src/test/java/com/baeldung/cloud/openfeign/OpenfeignManualTest.java diff --git a/spring-cloud/spring-cloud-rest/spring-cloud-rest-books-api/pom.xml b/spring-cloud/spring-cloud-rest/spring-cloud-rest-books-api/pom.xml index 1dcf14f104..8ba0fc5cad 100644 --- a/spring-cloud/spring-cloud-rest/spring-cloud-rest-books-api/pom.xml +++ b/spring-cloud/spring-cloud-rest/spring-cloud-rest-books-api/pom.xml @@ -75,9 +75,5 @@ - - 2.22.2 - 5.6.2 - 4.13 diff --git a/spring-cloud/spring-cloud-rest/spring-cloud-rest-config-server/pom.xml b/spring-cloud/spring-cloud-rest/spring-cloud-rest-config-server/pom.xml index 736b8bdf78..c64341f652 100644 --- a/spring-cloud/spring-cloud-rest/spring-cloud-rest-config-server/pom.xml +++ b/spring-cloud/spring-cloud-rest/spring-cloud-rest-config-server/pom.xml @@ -53,10 +53,6 @@ Camden.SR4 - - 2.22.2 - 5.6.2 - 4.13 diff --git a/spring-cloud/spring-cloud-rest/spring-cloud-rest-discovery-server/pom.xml b/spring-cloud/spring-cloud-rest/spring-cloud-rest-discovery-server/pom.xml index 12f8b6ae6a..85790bf895 100644 --- a/spring-cloud/spring-cloud-rest/spring-cloud-rest-discovery-server/pom.xml +++ b/spring-cloud/spring-cloud-rest/spring-cloud-rest-discovery-server/pom.xml @@ -61,10 +61,6 @@ Edgware.SR4 - - 2.22.2 - 5.6.2 - 4.13 diff --git a/spring-cloud/spring-cloud-rest/spring-cloud-rest-reviews-api/pom.xml b/spring-cloud/spring-cloud-rest/spring-cloud-rest-reviews-api/pom.xml index 0e7aed7f6a..35d0e79543 100644 --- a/spring-cloud/spring-cloud-rest/spring-cloud-rest-reviews-api/pom.xml +++ b/spring-cloud/spring-cloud-rest/spring-cloud-rest-reviews-api/pom.xml @@ -83,10 +83,6 @@ 3.0.1 0.6 - - 2.22.2 - 5.6.2 - 4.13 diff --git a/spring-cloud/spring-cloud-ribbon-client/pom.xml b/spring-cloud/spring-cloud-ribbon-client/pom.xml index ce57cfd7d3..fa9cee29a2 100644 --- a/spring-cloud/spring-cloud-ribbon-client/pom.xml +++ b/spring-cloud/spring-cloud-ribbon-client/pom.xml @@ -46,11 +46,6 @@ Hoxton.SR4 - - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/spring-cloud/spring-cloud-ribbon-retry/pom.xml b/spring-cloud/spring-cloud-ribbon-retry/pom.xml index 198473d5e5..99eb882421 100644 --- a/spring-cloud/spring-cloud-ribbon-retry/pom.xml +++ b/spring-cloud/spring-cloud-ribbon-retry/pom.xml @@ -56,9 +56,5 @@ Hoxton.SR3 - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/spring-cloud/spring-cloud-security/pom.xml b/spring-cloud/spring-cloud-security/pom.xml index 0997b1f3aa..3a007c8df1 100644 --- a/spring-cloud/spring-cloud-security/pom.xml +++ b/spring-cloud/spring-cloud-security/pom.xml @@ -21,9 +21,5 @@ - - 2.22.2 - 5.6.2 - 4.13 diff --git a/spring-cloud/spring-cloud-stream/spring-cloud-stream-kafka/pom.xml b/spring-cloud/spring-cloud-stream/spring-cloud-stream-kafka/pom.xml index 3283d4d07c..52230dd1c1 100644 --- a/spring-cloud/spring-cloud-stream/spring-cloud-stream-kafka/pom.xml +++ b/spring-cloud/spring-cloud-stream/spring-cloud-stream-kafka/pom.xml @@ -106,10 +106,6 @@ 4.0.0 1.8.2 - - 2.22.2 - 5.6.2 - 4.13 diff --git a/spring-cloud/spring-cloud-stream/spring-cloud-stream-kinesis/pom.xml b/spring-cloud/spring-cloud-stream/spring-cloud-stream-kinesis/pom.xml index d3182433e9..9e706cc239 100644 --- a/spring-cloud/spring-cloud-stream/spring-cloud-stream-kinesis/pom.xml +++ b/spring-cloud/spring-cloud-stream/spring-cloud-stream-kinesis/pom.xml @@ -43,11 +43,6 @@ 1.11.632 2.0.2.RELEASE 2.2.1.RELEASE - - - 2.22.2 - 5.6.2 - 4.13 \ No newline at end of file diff --git a/spring-cloud/spring-cloud-task/pom.xml b/spring-cloud/spring-cloud-task/pom.xml index bb18c1390b..21d8a4e42b 100644 --- a/spring-cloud/spring-cloud-task/pom.xml +++ b/spring-cloud/spring-cloud-task/pom.xml @@ -50,10 +50,6 @@ Hoxton.SR4 2.2.3.RELEASE - - 2.22.2 - 5.6.2 - 4.13 diff --git a/spring-cloud/spring-cloud-vault/pom.xml b/spring-cloud/spring-cloud-vault/pom.xml index a713e47fe2..d9ae6b515f 100644 --- a/spring-cloud/spring-cloud-vault/pom.xml +++ b/spring-cloud/spring-cloud-vault/pom.xml @@ -83,11 +83,6 @@ Greenwich.RELEASE - - - 2.22.2 - 5.6.2 - 4.13 diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/bin/eureka-client/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/bin/eureka-client/pom.xml index 118a9e2c11..321da7527a 100644 --- a/spring-cloud/spring-cloud-zuul-eureka-integration/bin/eureka-client/pom.xml +++ b/spring-cloud/spring-cloud-zuul-eureka-integration/bin/eureka-client/pom.xml @@ -35,7 +35,6 @@ org.springframework.boot spring-boot-starter-web - ${spring-boot-starter-web.version} diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-client/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-client/pom.xml index 9cf96df60e..77e8ef7c20 100644 --- a/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-client/pom.xml +++ b/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-client/pom.xml @@ -35,13 +35,13 @@ org.springframework.boot spring-boot-starter-web - ${spring-boot-starter-web.version} + ${spring-boot.version} org.springframework.boot spring-boot-starter-test - ${spring-boot-starter-web.version} + ${spring-boot.version} test diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-server/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-server/pom.xml index cd25f5f294..c3f6642351 100644 --- a/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-server/pom.xml +++ b/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-server/pom.xml @@ -41,7 +41,7 @@ org.springframework.boot spring-boot-starter-test - ${spring-boot-starter-web.version} + ${spring-boot.version} test diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/zuul-server/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/zuul-server/pom.xml index 3d238d5d5f..ddffe540c5 100644 --- a/spring-cloud/spring-cloud-zuul-eureka-integration/zuul-server/pom.xml +++ b/spring-cloud/spring-cloud-zuul-eureka-integration/zuul-server/pom.xml @@ -50,7 +50,6 @@ org.springframework.boot spring-boot-starter-test - ${spring-boot-starter-web.version} test diff --git a/spring-cloud/spring-cloud-zuul/pom.xml b/spring-cloud/spring-cloud-zuul/pom.xml index 3884e67388..b8db1f2fc7 100644 --- a/spring-cloud/spring-cloud-zuul/pom.xml +++ b/spring-cloud/spring-cloud-zuul/pom.xml @@ -81,10 +81,6 @@ Hoxton.SR4 - - 2.22.2 - 5.6.2 - 4.13 diff --git a/spring-jersey/pom.xml b/spring-jersey/pom.xml index 3c84e9c11e..50d377b73f 100644 --- a/spring-jersey/pom.xml +++ b/spring-jersey/pom.xml @@ -226,7 +226,7 @@ 4.4.9 4.5.5 4.0.0 - 2.25.1 + 2.27.2 3.10.0 1.5.10.RELEASE diff --git a/spring-mvc-basics-3/src/main/java/com/baeldung/validation/listvalidation/constraint/MaxSizeConstraintValidator.java b/spring-mvc-basics-3/src/main/java/com/baeldung/validation/listvalidation/constraint/MaxSizeConstraintValidator.java index 0154fb636a..409b6e1ab5 100644 --- a/spring-mvc-basics-3/src/main/java/com/baeldung/validation/listvalidation/constraint/MaxSizeConstraintValidator.java +++ b/spring-mvc-basics-3/src/main/java/com/baeldung/validation/listvalidation/constraint/MaxSizeConstraintValidator.java @@ -11,11 +11,7 @@ public class MaxSizeConstraintValidator implements ConstraintValidator values, ConstraintValidatorContext context) { - boolean isValid = true; - if (values.size() > 4) { - isValid = false; - } - return isValid; + return values.size() <= 4; } } diff --git a/spring-resttemplate-2/src/main/java/com/baeldung/resttemplate/RestTemplateConfigurationApplication.java b/spring-resttemplate-2/src/main/java/com/baeldung/resttemplate/RestTemplateConfigurationApplication.java index 8df3c13d7b..a7e65fc96c 100644 --- a/spring-resttemplate-2/src/main/java/com/baeldung/resttemplate/RestTemplateConfigurationApplication.java +++ b/spring-resttemplate-2/src/main/java/com/baeldung/resttemplate/RestTemplateConfigurationApplication.java @@ -1,7 +1,6 @@ package com.baeldung.resttemplate; import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication diff --git a/spring-resttemplate-2/src/main/java/com/baeldung/resttemplate/logging/RestTemplateConfigurationApplication.java b/spring-resttemplate-2/src/main/java/com/baeldung/resttemplate/logging/RestTemplateConfigurationApplication.java deleted file mode 100644 index 4fa14edda1..0000000000 --- a/spring-resttemplate-2/src/main/java/com/baeldung/resttemplate/logging/RestTemplateConfigurationApplication.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.baeldung.resttemplate.logging; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -@EnableAutoConfiguration -public class RestTemplateConfigurationApplication { - - public static void main(String[] args) { - SpringApplication.run(RestTemplateConfigurationApplication.class, args); - } -} diff --git a/spring-resttemplate-2/src/test/java/com/baeldung/resttemplate/logging/LoggingInterceptor.java b/spring-resttemplate-2/src/test/java/com/baeldung/resttemplate/logging/LoggingInterceptor.java index 17ce390d8a..c699d9d9dc 100644 --- a/spring-resttemplate-2/src/test/java/com/baeldung/resttemplate/logging/LoggingInterceptor.java +++ b/spring-resttemplate-2/src/test/java/com/baeldung/resttemplate/logging/LoggingInterceptor.java @@ -14,16 +14,18 @@ import org.springframework.http.client.ClientHttpResponse; public class LoggingInterceptor implements ClientHttpRequestInterceptor { - final static Logger log = LoggerFactory.getLogger(LoggingInterceptor.class); + final static Logger LOGGER = LoggerFactory.getLogger(LoggingInterceptor.class); @Override public ClientHttpResponse intercept(HttpRequest req, byte[] reqBody, ClientHttpRequestExecution ex) throws IOException { - log.debug("Request body: {}", new String(reqBody, StandardCharsets.UTF_8)); + LOGGER.debug("Request body: {}", new String(reqBody, StandardCharsets.UTF_8)); ClientHttpResponse response = ex.execute(req, reqBody); - InputStreamReader isr = new InputStreamReader(response.getBody(), StandardCharsets.UTF_8); - String body = new BufferedReader(isr).lines() - .collect(Collectors.joining("\n")); - log.debug("Response body: {}", body); + if (LOGGER.isDebugEnabled()) { + InputStreamReader isr = new InputStreamReader(response.getBody(), StandardCharsets.UTF_8); + String body = new BufferedReader(isr).lines() + .collect(Collectors.joining("\n")); + LOGGER.debug("Response body: {}", body); + } return response; } } diff --git a/spring-resttemplate-2/src/test/java/com/baeldung/resttemplate/logging/RestTemplateLoggingLiveTest.java b/spring-resttemplate-2/src/test/java/com/baeldung/resttemplate/logging/RestTemplateLoggingLiveTest.java index 99d0201eff..86ffa574a0 100644 --- a/spring-resttemplate-2/src/test/java/com/baeldung/resttemplate/logging/RestTemplateLoggingLiveTest.java +++ b/spring-resttemplate-2/src/test/java/com/baeldung/resttemplate/logging/RestTemplateLoggingLiveTest.java @@ -1,18 +1,21 @@ package com.baeldung.resttemplate.logging; -import static org.hamcrest.CoreMatchers.equalTo; - -import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.Assert.assertEquals; import java.util.ArrayList; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; +import org.springframework.http.client.ClientHttpRequestFactory; import org.springframework.http.client.ClientHttpRequestInterceptor; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; +import org.springframework.http.client.SimpleClientHttpRequestFactory; +import org.springframework.http.client.BufferingClientHttpRequestFactory; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.util.CollectionUtils; import org.springframework.web.client.RestTemplate; @@ -22,6 +25,7 @@ import org.springframework.web.client.RestTemplate; public class RestTemplateLoggingLiveTest { private static final String baseUrl = "http://localhost:8080/spring-rest"; + private static final Logger LOGGER = LoggerFactory.getLogger(RestTemplateLoggingLiveTest.class); @Test public void givenHttpClientConfiguration_whenSendGetForRequestEntity_thenRequestResponseFullLog() { @@ -30,13 +34,22 @@ public class RestTemplateLoggingLiveTest { restTemplate.setRequestFactory(new HttpComponentsClientHttpRequestFactory()); final ResponseEntity response = restTemplate.postForEntity(baseUrl + "/persons", "my request body", String.class); - assertThat(response.getStatusCode(), equalTo(HttpStatus.OK)); + assertEquals(HttpStatus.OK, response.getStatusCode()); + assertEquals("[\"Lucie\",\"Jackie\",\"Danesh\",\"Tao\"]", response.getBody()); } @Test public void givenLoggingInterceptorConfiguration_whenSendGetForRequestEntity_thenRequestResponseCustomLog() { - RestTemplate restTemplate = new RestTemplate(); + RestTemplate restTemplate = null; + if (LOGGER.isDebugEnabled()) { + ClientHttpRequestFactory factory = new BufferingClientHttpRequestFactory( + new SimpleClientHttpRequestFactory()); + restTemplate = new RestTemplate(factory); + } else { + restTemplate = new RestTemplate(); + } + List interceptors = restTemplate.getInterceptors(); if (CollectionUtils.isEmpty(interceptors)) { interceptors = new ArrayList<>(); @@ -45,6 +58,7 @@ public class RestTemplateLoggingLiveTest { restTemplate.setInterceptors(interceptors); final ResponseEntity response = restTemplate.postForEntity(baseUrl + "/persons", "my request body", String.class); - assertThat(response.getStatusCode(), equalTo(HttpStatus.OK)); + assertEquals(HttpStatus.OK, response.getStatusCode()); + assertEquals("[\"Lucie\",\"Jackie\",\"Danesh\",\"Tao\"]", response.getBody()); } } diff --git a/spring-resttemplate-2/src/test/resources/application.properties b/spring-resttemplate-2/src/test/resources/application.properties index 7bc9e56041..286ea95a4f 100644 --- a/spring-resttemplate-2/src/test/resources/application.properties +++ b/spring-resttemplate-2/src/test/resources/application.properties @@ -1,5 +1,5 @@ logging.level.org.springframework.web.client.RestTemplate=DEBUG -logging.level.com.baeldung.resttemplate.logging.LoggingInterceptor=DEBUG +logging.level.com.baeldung.resttemplate.logging=DEBUG logging.level.org.apache.http=DEBUG logging.level.httpclient.wire=DEBUG logging.pattern.console=%20logger{20} - %msg%n diff --git a/testing-modules/junit-5-advanced/src/test/java/com/baeldung/extensions/testwatcher/TestResultLoggerExtension.java b/testing-modules/junit-5-advanced/src/test/java/com/baeldung/extensions/testwatcher/TestResultLoggerExtension.java index a92c44a85b..1cbebd8d48 100644 --- a/testing-modules/junit-5-advanced/src/test/java/com/baeldung/extensions/testwatcher/TestResultLoggerExtension.java +++ b/testing-modules/junit-5-advanced/src/test/java/com/baeldung/extensions/testwatcher/TestResultLoggerExtension.java @@ -46,7 +46,7 @@ public class TestResultLoggerExtension implements TestWatcher, AfterAllCallback @Override public void testFailed(ExtensionContext context, Throwable cause) { - LOG.info("Test Aborted for test {}: ", context.getDisplayName()); + LOG.info("Test Failed for test {}: ", context.getDisplayName()); testResultsStatus.add(TestResultStatus.FAILED); } diff --git a/testing-modules/junit5-annotations/pom.xml b/testing-modules/junit5-annotations/pom.xml index 9e51d0ab55..7ffc17c69b 100644 --- a/testing-modules/junit5-annotations/pom.xml +++ b/testing-modules/junit5-annotations/pom.xml @@ -55,8 +55,8 @@ - 5.6.2 - 1.6.0 + 5.7.0 + 1.7.0 2.8.2 3.11.1 diff --git a/testing-modules/load-testing-comparison/pom.xml b/testing-modules/load-testing-comparison/pom.xml index adc768b563..4c237aeb75 100644 --- a/testing-modules/load-testing-comparison/pom.xml +++ b/testing-modules/load-testing-comparison/pom.xml @@ -37,7 +37,6 @@ com.fasterxml.jackson.core jackson-databind - ${jackson.version} org.springframework.boot @@ -72,7 +71,6 @@ org.springframework.boot spring-boot-maven-plugin - 2.0.5.RELEASE @@ -117,10 +115,10 @@ 1.8 1.8 UTF-8 - 2.11.12 - 2.2.5 - 3.2.2 - 2.2.1 + 2.12.12 + 3.4.0 + 4.4.0 + 3.1.0 5.0 diff --git a/testing-modules/load-testing-comparison/src/main/java/com/baeldung/loadtesting/model/CustomerRewardsAccount.java b/testing-modules/load-testing-comparison/src/main/java/com/baeldung/loadtesting/model/CustomerRewardsAccount.java index 0599020700..4d92c93fcb 100644 --- a/testing-modules/load-testing-comparison/src/main/java/com/baeldung/loadtesting/model/CustomerRewardsAccount.java +++ b/testing-modules/load-testing-comparison/src/main/java/com/baeldung/loadtesting/model/CustomerRewardsAccount.java @@ -4,8 +4,11 @@ import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; +import javax.persistence.Index; +import javax.persistence.Table; @Entity +@Table(indexes = {@Index(columnList="customerId")}) public class CustomerRewardsAccount { @Id diff --git a/testing-modules/load-testing-comparison/src/main/java/com/baeldung/loadtesting/model/Transaction.java b/testing-modules/load-testing-comparison/src/main/java/com/baeldung/loadtesting/model/Transaction.java index 1a6e0d4360..6e2fb39cc6 100644 --- a/testing-modules/load-testing-comparison/src/main/java/com/baeldung/loadtesting/model/Transaction.java +++ b/testing-modules/load-testing-comparison/src/main/java/com/baeldung/loadtesting/model/Transaction.java @@ -4,10 +4,14 @@ import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; +import javax.persistence.Index; +import javax.persistence.Table; + import java.util.Date; import java.util.Calendar; @Entity +@Table(indexes = {@Index(columnList="customerRewardsId")}) public class Transaction { @Id diff --git a/testing-modules/load-testing-comparison/src/main/resources/application.properties b/testing-modules/load-testing-comparison/src/main/resources/application.properties index 424d3d0290..e2c8cb1879 100644 --- a/testing-modules/load-testing-comparison/src/main/resources/application.properties +++ b/testing-modules/load-testing-comparison/src/main/resources/application.properties @@ -2,6 +2,6 @@ spring.h2.console.enabled=true spring.datasource.url=jdbc:h2:mem:testdb spring.datasource.driverClassName=org.h2.Driver spring.datasource.username=sa -spring.datasource.password=password +spring.datasource.password= spring.jpa.database-platform=org.hibernate.dialect.H2Dialect diff --git a/testing-modules/load-testing-comparison/src/main/resources/scripts/Gatling/GatlingScenario.scala b/testing-modules/load-testing-comparison/src/main/resources/scripts/Gatling/GatlingScenario.scala index 15d86ebedb..e8cc608e42 100644 --- a/testing-modules/load-testing-comparison/src/main/resources/scripts/Gatling/GatlingScenario.scala +++ b/testing-modules/load-testing-comparison/src/main/resources/scripts/Gatling/GatlingScenario.scala @@ -7,21 +7,16 @@ import scala.concurrent.duration._ class RewardsScenario extends Simulation { - def randCustId() = java.util.concurrent.ThreadLocalRandom.current().nextInt(1, 10000) + def randCustId() = java.util.concurrent.ThreadLocalRandom.current().nextInt() val httpProtocol = http.baseUrl("http://localhost:8080") - .acceptHeader("text/html,application/json;q=0.9,*/*;q=0.8") - .doNotTrackHeader("1") - .acceptLanguageHeader("en-US,en;q=0.5") - .acceptEncodingHeader("gzip, deflate") - .userAgentHeader("Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0") val scn = scenario("RewardsScenario") - .repeat(100){ + .repeat(1000){ exec(http("transactions_add") .post("/transactions/add/") - .body(StringBody(_ => s"""{ "customerRewardsId":null,"customerId":"${randCustId()}","transactionDate":null }""")).asJson + .body(StringBody(_ => s"""{"customerRewardsId":null,"customerId":${randCustId()},"transactionDate":null}""")).asJson .check(jsonPath("$.id").saveAs("txnId")) .check(jsonPath("$.transactionDate").saveAs("txtDate")) .check(jsonPath("$.customerId").saveAs("custId"))) @@ -33,13 +28,13 @@ class RewardsScenario extends Simulation { .doIf("${rwdId.isUndefined()}"){ exec(http("rewards_add") .post("/rewards/add") - .body(StringBody("""{ "customerId": "${custId}" }""")).asJson + .body(StringBody("""{"customerId":${custId}}""")).asJson .check(jsonPath("$.id").saveAs("rwdId"))) } .exec(http("transactions_update") .post("/transactions/add/") - .body(StringBody("""{ "customerRewardsId":"${rwdId}","customerId":"${custId}","transactionDate":"${txtDate}" }""")).asJson) + .body(StringBody("""{"customerRewardsId":${rwdId},"customerId":${custId},"transactionDate":"${txtDate}" }""")).asJson) .exec(http("get_transactions") .get("/transactions/findAll/${rwdId}")) diff --git a/testing-modules/load-testing-comparison/src/main/resources/scripts/JMeter/Test Plan.jmx b/testing-modules/load-testing-comparison/src/main/resources/scripts/JMeter/Test Plan.jmx index 413a8d3387..cbb036b77b 100644 --- a/testing-modules/load-testing-comparison/src/main/resources/scripts/JMeter/Test Plan.jmx +++ b/testing-modules/load-testing-comparison/src/main/resources/scripts/JMeter/Test Plan.jmx @@ -16,7 +16,7 @@ continue false - 100 + 1000 100 0 @@ -200,7 +200,7 @@ - 10000 + 9223372036854775806 1 false diff --git a/testing-modules/load-testing-comparison/src/main/resources/scripts/The Grinder/grinder.properties b/testing-modules/load-testing-comparison/src/main/resources/scripts/The Grinder/grinder.properties index f256f5a7dd..ca5969cb7a 100644 --- a/testing-modules/load-testing-comparison/src/main/resources/scripts/The Grinder/grinder.properties +++ b/testing-modules/load-testing-comparison/src/main/resources/scripts/The Grinder/grinder.properties @@ -1,5 +1,5 @@ grinder.script = grinder.py grinder.threads = 100 grinder.processes = 1 -grinder.runs = 100 +grinder.runs = 1000 grinder.logDirectory = /logs