diff --git a/.gitignore b/.gitignore index 9c100eaded..729dea62d5 100644 --- a/.gitignore +++ b/.gitignore @@ -65,6 +65,7 @@ core-java-io/target_link.txt core-java/src/main/java/com/baeldung/manifest/MANIFEST.MF ethereum/logs/ jmeter/src/main/resources/*-JMeter.csv +ninja/devDb.mv.db **/node_modules/ **/dist diff --git a/akka-http/src/test/java/com/baeldung/akkahttp/UserServerUnitTest.java b/akka-http/src/test/java/com/baeldung/akkahttp/UserServerUnitTest.java index 33462d6171..0bb9dc1ef2 100644 --- a/akka-http/src/test/java/com/baeldung/akkahttp/UserServerUnitTest.java +++ b/akka-http/src/test/java/com/baeldung/akkahttp/UserServerUnitTest.java @@ -31,10 +31,10 @@ public class UserServerUnitTest extends JUnitRouteTest { .assertStatusCode(404); appRoute.run(HttpRequest.DELETE("/users/1")) - .assertStatusCode(200); + .assertStatusCode(405); appRoute.run(HttpRequest.DELETE("/users/42")) - .assertStatusCode(200); + .assertStatusCode(405); appRoute.run(HttpRequest.POST("/users") .withEntity(HttpEntities.create(ContentTypes.APPLICATION_JSON, zaphod()))) diff --git a/algorithms-miscellaneous-2/README.md b/algorithms-miscellaneous-2/README.md index 7560fc4fe7..26737b61f0 100644 --- a/algorithms-miscellaneous-2/README.md +++ b/algorithms-miscellaneous-2/README.md @@ -13,4 +13,5 @@ This module contains articles about algorithms. Some classes of algorithms, e.g. - [Create a Sudoku Solver in Java](https://www.baeldung.com/java-sudoku) - [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) diff --git a/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/slope_one/SlopeOne.java b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/slope_one/SlopeOne.java index d5eea279de..bfcafdaef2 100644 --- a/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/slope_one/SlopeOne.java +++ b/algorithms-miscellaneous-2/src/main/java/com/baeldung/algorithms/slope_one/SlopeOne.java @@ -98,7 +98,7 @@ public class SlopeOne { for (Item j : InputData.items) { if (e.getValue().containsKey(j)) { clean.put(j, e.getValue().get(j)); - } else { + } else if (!clean.containsKey(j)) { clean.put(j, -1.0); } } diff --git a/algorithms-miscellaneous-5/README.md b/algorithms-miscellaneous-5/README.md index 3c49b5f01c..4ef919b33b 100644 --- a/algorithms-miscellaneous-5/README.md +++ b/algorithms-miscellaneous-5/README.md @@ -12,4 +12,12 @@ This module contains articles about algorithms. Some classes of algorithms, e.g. - [How to Determine if a Binary Tree is Balanced](https://www.baeldung.com/java-balanced-binary-tree) - [The Caesar Cipher in Java](https://www.baeldung.com/java-caesar-cipher) - [Overview of Combinatorial Problems in Java](https://www.baeldung.com/java-combinatorial-algorithms) +- [Prim’s Algorithm](https://www.baeldung.com/java-prim-algorithm) +- [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) +- [Kruskal’s Algorithm for Spanning Trees](https://www.baeldung.com/java-spanning-trees-kruskal) +- [Balanced Brackets Algorithm in Java](https://www.baeldung.com/java-balanced-brackets-algorithm) +- [Efficiently Merge Sorted Java Sequences](https://www.baeldung.com/java-merge-sorted-sequences) +- [Introduction to Greedy Algorithms with Java](https://www.baeldung.com/java-greedy-algorithms) - More articles: [[<-- prev]](/../algorithms-miscellaneous-4) diff --git a/algorithms-miscellaneous-5/src/main/java/com/baeldung/algorithms/balancedbinarytree/AVLTree.java b/algorithms-miscellaneous-5/src/main/java/com/baeldung/algorithms/balancedbinarytree/AVLTree.java new file mode 100644 index 0000000000..a0575c8be1 --- /dev/null +++ b/algorithms-miscellaneous-5/src/main/java/com/baeldung/algorithms/balancedbinarytree/AVLTree.java @@ -0,0 +1,141 @@ +package com.baeldung.algorithms.balancedbinarytree; + +public class AVLTree { + + public class Node { + int key; + int height; + Node left; + Node right; + + Node(int key) { + this.key = key; + } + } + + private Node root; + + public Node find(int key) { + Node current = root; + while (current != null) { + if (current.key == key) { + break; + } + current = current.key < key ? current.right : current.left; + } + return current; + } + + public void insert(int key) { + root = insert(root, key); + } + + public void delete(int key) { + root = delete(root, key); + } + + public Node getRoot() { + return root; + } + + public int height() { + return root == null ? -1 : root.height; + } + + private Node insert(Node node, int key) { + if (node == null) { + return new Node(key); + } else if (node.key > key) { + node.left = insert(node.left, key); + } else if (node.key < key) { + node.right = insert(node.right, key); + } else { + throw new RuntimeException("duplicate Key!"); + } + return rebalance(node); + } + + private Node delete(Node node, int key) { + if (node == null) { + return node; + } else if (node.key > key) { + node.left = delete(node.left, key); + } else if (node.key < key) { + node.right = delete(node.right, key); + } else { + if (node.left == null || node.right == null) { + node = (node.left == null) ? node.right : node.left; + } else { + Node mostLeftChild = mostLeftChild(node.right); + node.key = mostLeftChild.key; + node.right = delete(node.right, node.key); + } + } + if (node != null) { + node = rebalance(node); + } + return node; + } + + private Node mostLeftChild(Node node) { + Node current = node; + /* loop down to find the leftmost leaf */ + while (current.left != null) { + current = current.left; + } + return current; + } + + private Node rebalance(Node z) { + updateHeight(z); + int balance = getBalance(z); + if (balance > 1) { + if (height(z.right.right) > height(z.right.left)) { + z = rotateLeft(z); + } else { + z.right = rotateRight(z.right); + z = rotateLeft(z); + } + } else if (balance < -1) { + if (height(z.left.left) > height(z.left.right)) { + z = rotateRight(z); + } else { + z.left = rotateLeft(z.left); + z = rotateRight(z); + } + } + return z; + } + + private Node rotateRight(Node y) { + Node x = y.left; + Node z = x.right; + x.right = y; + y.left = z; + updateHeight(y); + updateHeight(x); + return x; + } + + private Node rotateLeft(Node y) { + Node x = y.right; + Node z = x.left; + x.left = y; + y.right = z; + updateHeight(y); + updateHeight(x); + return x; + } + + private void updateHeight(Node n) { + n.height = 1 + Math.max(height(n.left), height(n.right)); + } + + private int height(Node n) { + return n == null ? -1 : n.height; + } + + public int getBalance(Node n) { + return (n == null) ? 0 : height(n.right) - height(n.left); + } +} diff --git a/algorithms-miscellaneous-5/src/main/java/com/baeldung/algorithms/balancedbrackets/BalancedBracketsUsingDeque.java b/algorithms-miscellaneous-5/src/main/java/com/baeldung/algorithms/balancedbrackets/BalancedBracketsUsingDeque.java new file mode 100644 index 0000000000..4c220b4047 --- /dev/null +++ b/algorithms-miscellaneous-5/src/main/java/com/baeldung/algorithms/balancedbrackets/BalancedBracketsUsingDeque.java @@ -0,0 +1,36 @@ +package com.baeldung.algorithms.balancedbrackets; + +import java.util.Deque; +import java.util.LinkedList; + +public class BalancedBracketsUsingDeque { + + public boolean isBalanced(String str) { + if (null == str || ((str.length() % 2) != 0)) { + return false; + } else { + char[] ch = str.toCharArray(); + for (char c : ch) { + if (!(c == '{' || c == '[' || c == '(' || c == '}' || c == ']' || c == ')')) { + return false; + } + + } + } + + Deque deque = new LinkedList<>(); + for (char ch : str.toCharArray()) { + if (ch == '{' || ch == '[' || ch == '(') { + deque.addFirst(ch); + } else { + if (!deque.isEmpty() && ((deque.peekFirst() == '{' && ch == '}') || (deque.peekFirst() == '[' && ch == ']') || (deque.peekFirst() == '(' && ch == ')'))) { + deque.removeFirst(); + } else { + return false; + } + } + } + + return true; + } +} \ No newline at end of file diff --git a/algorithms-miscellaneous-5/src/main/java/com/baeldung/algorithms/balancedbrackets/BalancedBracketsUsingString.java b/algorithms-miscellaneous-5/src/main/java/com/baeldung/algorithms/balancedbrackets/BalancedBracketsUsingString.java new file mode 100644 index 0000000000..0418efbe79 --- /dev/null +++ b/algorithms-miscellaneous-5/src/main/java/com/baeldung/algorithms/balancedbrackets/BalancedBracketsUsingString.java @@ -0,0 +1,27 @@ +package com.baeldung.algorithms.balancedbrackets; + +public class BalancedBracketsUsingString { + + public boolean isBalanced(String str) { + if (null == str || ((str.length() % 2) != 0)) { + return false; + } else { + char[] ch = str.toCharArray(); + for (char c : ch) { + if (!(c == '{' || c == '[' || c == '(' || c == '}' || c == ']' || c == ')')) { + return false; + } + + } + } + + while (str.contains("()") || str.contains("[]") || str.contains("{}")) { + str = str.replaceAll("\\(\\)", "") + .replaceAll("\\[\\]", "") + .replaceAll("\\{\\}", ""); + } + return (str.length() == 0); + + } + +} \ No newline at end of file diff --git a/algorithms-miscellaneous-5/src/test/java/com/baeldung/algorithms/balancedbinarytree/AVLTreeUnitTest.java b/algorithms-miscellaneous-5/src/test/java/com/baeldung/algorithms/balancedbinarytree/AVLTreeUnitTest.java new file mode 100644 index 0000000000..ab001b6696 --- /dev/null +++ b/algorithms-miscellaneous-5/src/test/java/com/baeldung/algorithms/balancedbinarytree/AVLTreeUnitTest.java @@ -0,0 +1,83 @@ +package com.baeldung.algorithms.balancedbinarytree; + +import org.junit.Assert; +import org.junit.Test; + +public class AVLTreeUnitTest { + + @Test + public void givenEmptyTree_whenHeightCalled_shouldReturnMinus1() { + AVLTree tree = new AVLTree(); + Assert.assertEquals(-1, tree.height()); + } + + @Test + public void givenEmptyTree_whenInsertCalled_heightShouldBeZero() { + AVLTree tree = new AVLTree(); + tree.insert(1); + Assert.assertEquals(0, tree.height()); + } + + @Test + public void givenEmptyTree_whenInsertCalled_treeShouldBeAvl() { + AVLTree tree = new AVLTree(); + tree.insert(1); + Assert.assertTrue(isAVL(tree)); + } + + @Test + public void givenSampleTree_whenInsertCalled_treeShouldBeAvl() { + AVLTree tree = getSampleAVLTree(); + int newKey = 11; + tree.insert(newKey); + Assert.assertTrue(isAVL(tree)); + } + + @Test + public void givenSampleTree_whenFindExistingKeyCalled_shouldReturnMatchedNode() { + AVLTree tree = getSampleAVLTree(); + int existingKey = 2; + AVLTree.Node result = tree.find(existingKey); + Assert.assertEquals(result.key, existingKey); + } + + @Test + public void givenSampleTree_whenFindNotExistingKeyCalled_shouldReturnNull() { + AVLTree tree = getSampleAVLTree(); + int notExistingKey = 11; + AVLTree.Node result = tree.find(notExistingKey); + Assert.assertNull(result); + } + + @Test + public void givenEmptyTree_whenDeleteCalled_treeShouldBeAvl() { + AVLTree tree = new AVLTree(); + tree.delete(1); + Assert.assertTrue(isAVL(tree)); + } + + @Test + public void givenSampleTree_whenDeleteCalled_treeShouldBeAvl() { + AVLTree tree = getSampleAVLTree(); + tree.delete(1); + Assert.assertTrue(isAVL(tree, tree.getRoot())); + } + + private boolean isAVL(AVLTree tree) { + return isAVL(tree, tree.getRoot()); + } + + private boolean isAVL(AVLTree tree, AVLTree.Node node) { + if ( node == null ) + return true; + int balance = tree.getBalance(node); + return (balance <= 1 && balance >= -1) && isAVL(tree, node.left) && isAVL(tree, node.right); + } + + private AVLTree getSampleAVLTree() { + AVLTree avlTree = new AVLTree(); + for (int i = 0; i < 10; i++) + avlTree.insert(i); + return avlTree; + } +} diff --git a/algorithms-miscellaneous-5/src/test/java/com/baeldung/algorithms/balancedbrackets/BalancedBracketsUsingDequeUnitTest.java b/algorithms-miscellaneous-5/src/test/java/com/baeldung/algorithms/balancedbrackets/BalancedBracketsUsingDequeUnitTest.java new file mode 100644 index 0000000000..964c1ce11a --- /dev/null +++ b/algorithms-miscellaneous-5/src/test/java/com/baeldung/algorithms/balancedbrackets/BalancedBracketsUsingDequeUnitTest.java @@ -0,0 +1,76 @@ +package com.baeldung.algorithms.balancedbrackets; + +import org.junit.Before; +import org.junit.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +public class BalancedBracketsUsingDequeUnitTest { + private BalancedBracketsUsingDeque balancedBracketsUsingDeque; + + @Before + public void setup() { + balancedBracketsUsingDeque = new BalancedBracketsUsingDeque(); + } + + @Test + public void givenNullInput_whenCheckingForBalance_shouldReturnFalse() { + boolean result = balancedBracketsUsingDeque.isBalanced(null); + assertThat(result).isFalse(); + } + + @Test + public void givenEmptyString_whenCheckingForBalance_shouldReturnTrue() { + boolean result = balancedBracketsUsingDeque.isBalanced(""); + assertThat(result).isTrue(); + } + + @Test + public void givenInvalidCharacterString_whenCheckingForBalance_shouldReturnFalse() { + boolean result = balancedBracketsUsingDeque.isBalanced("abc[](){}"); + assertThat(result).isFalse(); + } + + @Test + public void givenOddLengthString_whenCheckingForBalance_shouldReturnFalse() { + boolean result = balancedBracketsUsingDeque.isBalanced("{{[]()}}}"); + assertThat(result).isFalse(); + } + + @Test + public void givenEvenLengthString_whenCheckingForBalance_shouldReturnFalse() { + boolean result = balancedBracketsUsingDeque.isBalanced("{{[]()}}}}"); + assertThat(result).isFalse(); + } + + @Test + public void givenEvenLengthUnbalancedString_whenCheckingForBalance_shouldReturnFalse() { + boolean result = balancedBracketsUsingDeque.isBalanced("{[(])}"); + assertThat(result).isFalse(); + } + + @Test + public void givenEvenLengthBalancedString_whenCheckingForBalance_shouldReturnTrue() { + boolean result = balancedBracketsUsingDeque.isBalanced("{[()]}"); + assertThat(result).isTrue(); + } + + @Test + public void givenBalancedString_whenCheckingForBalance_shouldReturnTrue() { + boolean result = balancedBracketsUsingDeque.isBalanced("{{[[(())]]}}"); + assertThat(result).isTrue(); + } + + @Test + public void givenAnotherBalancedString_whenCheckingForBalance_shouldReturnTrue() { + boolean result = balancedBracketsUsingDeque.isBalanced("{{([])}}"); + assertThat(result).isTrue(); + } + + @Test + public void givenUnBalancedString_whenCheckingForBalance_shouldReturnFalse() { + boolean result = balancedBracketsUsingDeque.isBalanced("{{)[](}}"); + assertThat(result).isFalse(); + } + +} \ No newline at end of file diff --git a/algorithms-miscellaneous-5/src/test/java/com/baeldung/algorithms/balancedbrackets/BalancedBracketsUsingStringUnitTest.java b/algorithms-miscellaneous-5/src/test/java/com/baeldung/algorithms/balancedbrackets/BalancedBracketsUsingStringUnitTest.java new file mode 100644 index 0000000000..69ce42b0f1 --- /dev/null +++ b/algorithms-miscellaneous-5/src/test/java/com/baeldung/algorithms/balancedbrackets/BalancedBracketsUsingStringUnitTest.java @@ -0,0 +1,76 @@ +package com.baeldung.algorithms.balancedbrackets; + +import org.junit.Before; +import org.junit.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +public class BalancedBracketsUsingStringUnitTest { + private BalancedBracketsUsingString balancedBracketsUsingString; + + @Before + public void setup() { + balancedBracketsUsingString = new BalancedBracketsUsingString(); + } + + @Test + public void givenNullInput_whenCheckingForBalance_shouldReturnFalse() { + boolean result = balancedBracketsUsingString.isBalanced(null); + assertThat(result).isFalse(); + } + + @Test + public void givenEmptyString_whenCheckingForBalance_shouldReturnTrue() { + boolean result = balancedBracketsUsingString.isBalanced(""); + assertThat(result).isTrue(); + } + + @Test + public void givenInvalidCharacterString_whenCheckingForBalance_shouldReturnFalse() { + boolean result = balancedBracketsUsingString.isBalanced("abc[](){}"); + assertThat(result).isFalse(); + } + + @Test + public void givenOddLengthString_whenCheckingForBalance_shouldReturnFalse() { + boolean result = balancedBracketsUsingString.isBalanced("{{[]()}}}"); + assertThat(result).isFalse(); + } + + @Test + public void givenEvenLengthString_whenCheckingForBalance_shouldReturnFalse() { + boolean result = balancedBracketsUsingString.isBalanced("{{[]()}}}}"); + assertThat(result).isFalse(); + } + + @Test + public void givenEvenLengthUnbalancedString_whenCheckingForBalance_shouldReturnFalse() { + boolean result = balancedBracketsUsingString.isBalanced("{[(])}"); + assertThat(result).isFalse(); + } + + @Test + public void givenEvenLengthBalancedString_whenCheckingForBalance_shouldReturnTrue() { + boolean result = balancedBracketsUsingString.isBalanced("{[()]}"); + assertThat(result).isTrue(); + } + + @Test + public void givenBalancedString_whenCheckingForBalance_shouldReturnTrue() { + boolean result = balancedBracketsUsingString.isBalanced("{{[[(())]]}}"); + assertThat(result).isTrue(); + } + + @Test + public void givenAnotherBalancedString_whenCheckingForBalance_shouldReturnTrue() { + boolean result = balancedBracketsUsingString.isBalanced("{{([])}}"); + assertThat(result).isTrue(); + } + + @Test + public void givenUnBalancedString_whenCheckingForBalance_shouldReturnFalse() { + boolean result = balancedBracketsUsingString.isBalanced("{{)[](}}"); + assertThat(result).isFalse(); + } + +} \ No newline at end of file diff --git a/algorithms-sorting-2/README.md b/algorithms-sorting-2/README.md new file mode 100644 index 0000000000..897621bc41 --- /dev/null +++ b/algorithms-sorting-2/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [Partitioning and Sorting Arrays with Many Repeated Entries](https://www.baeldung.com/java-sorting-arrays-with-repeated-entries) diff --git a/apache-poi/README.md b/apache-poi/README.md index b7b8bf5f6a..742220aebc 100644 --- a/apache-poi/README.md +++ b/apache-poi/README.md @@ -6,3 +6,6 @@ This module contains articles about Apache POI - [Microsoft Word Processing in Java with Apache POI](https://www.baeldung.com/java-microsoft-word-with-apache-poi) - [Working with Microsoft Excel in Java](https://www.baeldung.com/java-microsoft-excel) - [Creating a MS PowerPoint Presentation in Java](https://www.baeldung.com/apache-poi-slideshow) +- [Merge Cells in Excel Using Apache POI](https://www.baeldung.com/java-apache-poi-merge-cells) +- [Get String Value of Excel Cell with Apache POI](https://www.baeldung.com/java-apache-poi-cell-string-value) +- [Read Excel Cell Value Rather Than Formula With Apache POI](https://github.com/eugenp/tutorials/tree/master/apache-poi) diff --git a/apache-poi/src/test/java/com/baeldung/poi/excel/merge/ExcelCellMergerUnitTest.java b/apache-poi/src/test/java/com/baeldung/poi/excel/merge/ExcelCellMergerUnitTest.java new file mode 100644 index 0000000000..911d368f77 --- /dev/null +++ b/apache-poi/src/test/java/com/baeldung/poi/excel/merge/ExcelCellMergerUnitTest.java @@ -0,0 +1,53 @@ +package com.baeldung.poi.excel.merge; + +import static org.junit.Assert.assertEquals; + +import java.io.IOException; +import java.net.URISyntaxException; +import java.nio.file.Paths; + +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.ss.util.CellRangeAddress; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.junit.Before; +import org.junit.Test; + +public class ExcelCellMergerUnitTest { + private static final String FILE_NAME = "ExcelCellFormatterTest.xlsx"; + private String fileLocation; + + @Before + public void setup() throws IOException, URISyntaxException { + fileLocation = Paths.get(ClassLoader.getSystemResource(FILE_NAME).toURI()).toString(); + } + + @Test + public void givenCellIndex_whenAddMergeRegion_thenMergeRegionCreated() throws IOException { + Workbook workbook = new XSSFWorkbook(fileLocation); + Sheet sheet = workbook.getSheetAt(0); + + assertEquals(0, sheet.getNumMergedRegions()); + int firstRow = 0; + int lastRow = 0; + int firstCol = 0; + int lastCol = 2; + sheet.addMergedRegion(new CellRangeAddress(firstRow, lastRow, firstCol, lastCol)); + assertEquals(1, sheet.getNumMergedRegions()); + + workbook.close(); + } + + @Test + public void givenCellRefString_whenAddMergeRegion_thenMergeRegionCreated() throws IOException { + Workbook workbook = new XSSFWorkbook(fileLocation); + Sheet sheet = workbook.getSheetAt(0); + + assertEquals(0, sheet.getNumMergedRegions()); + sheet.addMergedRegion(CellRangeAddress.valueOf("A1:C1")); + assertEquals(1, sheet.getNumMergedRegions()); + + workbook.close(); + } + +} \ No newline at end of file diff --git a/apache-rocketmq/README.md b/apache-rocketmq/README.md index be53f95790..734f878baa 100644 --- a/apache-rocketmq/README.md +++ b/apache-rocketmq/README.md @@ -3,3 +3,5 @@ This module contains articles about Apache RocketMQ ### Relevant Articles: + +- [Apache RocketMQ with Spring Boot](https://www.baeldung.com/apache-rocketmq-spring-boot) diff --git a/apache-spark/README.md b/apache-spark/README.md index 52313d66bf..c60b556d51 100644 --- a/apache-spark/README.md +++ b/apache-spark/README.md @@ -7,4 +7,4 @@ This module contains articles about Apache Spark - [Introduction to Apache Spark](https://www.baeldung.com/apache-spark) - [Building a Data Pipeline with Kafka, Spark Streaming and Cassandra](https://www.baeldung.com/kafka-spark-data-pipeline) - [Machine Learning with Spark MLlib](https://www.baeldung.com/spark-mlib-machine-learning) - +- [Introduction to Spark Graph Processing with GraphFrames](https://www.baeldung.com/spark-graph-graphframes) diff --git a/apache-tapestry/README.md b/apache-tapestry/README.md new file mode 100644 index 0000000000..e41345bada --- /dev/null +++ b/apache-tapestry/README.md @@ -0,0 +1,3 @@ +### Relevant Articles + +- [Intro to Apache Tapestry](https://www.baeldung.com/apache-tapestry) diff --git a/aws-reactive/README.md b/aws-reactive/README.md new file mode 100644 index 0000000000..1abf987b52 --- /dev/null +++ b/aws-reactive/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [AWS S3 with Java – Reactive Support](https://www.baeldung.com/java-aws-s3-reactive) diff --git a/core-groovy-2/pom.xml b/core-groovy-2/pom.xml index 752b6945b3..1b26182ef4 100644 --- a/core-groovy-2/pom.xml +++ b/core-groovy-2/pom.xml @@ -77,7 +77,7 @@ org.codehaus.groovy groovy-eclipse-compiler - 3.3.0-01 + ${groovy.compiler.version} org.codehaus.groovy diff --git a/core-groovy-2/src/test/groovy/com/baeldung/category/CategoryUnitTest.groovy b/core-groovy-2/src/test/groovy/com/baeldung/category/CategoryUnitTest.groovy index 5ba7a2347c..a1f67b1e2e 100644 --- a/core-groovy-2/src/test/groovy/com/baeldung/category/CategoryUnitTest.groovy +++ b/core-groovy-2/src/test/groovy/com/baeldung/category/CategoryUnitTest.groovy @@ -28,17 +28,16 @@ class CategoryUnitTest extends GroovyTestCase { } } -// http://team.baeldung.com/browse/BAEL-20687 -// void test_whenUsingTimeCategory_thenOperationOnNumber() { -// SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy") -// use (TimeCategory) { -// assert sdf.format(5.days.from.now) == sdf.format(new Date() + 5.days) -// -// sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss") -// assert sdf.format(10.minutes.from.now) == sdf.format(new Date() + 10.minutes) -// assert sdf.format(2.hours.ago) == sdf.format(new Date() - 2.hours) -// } -// } + void test_whenUsingTimeCategory_thenOperationOnNumber() { + SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy") + use (TimeCategory) { + assert sdf.format(5.days.from.now) == sdf.format(new Date() + 5.days) + + sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss") + assert sdf.format(10.minutes.from.now) == sdf.format(new Date() + 10.minutes) + assert sdf.format(2.hours.ago) == sdf.format(new Date() - 2.hours) + } + } void test_whenUsingDOMCategory_thenOperationOnXML() { diff --git a/core-groovy-2/src/test/groovy/com/baeldung/webservice/WebserviceUnitTest.groovy b/core-groovy-2/src/test/groovy/com/baeldung/webservice/WebserviceUnitTest.groovy index 144d5720c8..b8417b8ac1 100644 --- a/core-groovy-2/src/test/groovy/com/baeldung/webservice/WebserviceUnitTest.groovy +++ b/core-groovy-2/src/test/groovy/com/baeldung/webservice/WebserviceUnitTest.groovy @@ -75,7 +75,6 @@ class WebserviceManualTest extends GroovyTestCase { assert stories.size() == 5 } - /* see BAEL-3753 void test_whenConsumingSoap_thenReceiveResponse() { def url = "http://www.dataaccess.com/webservicesserver/numberconversion.wso" def soapClient = new SOAPClient(url) @@ -90,7 +89,6 @@ class WebserviceManualTest extends GroovyTestCase { def words = response.NumberToWordsResponse assert words == "one thousand two hundred and thirty four " } - */ void test_whenConsumingRestGet_thenReceiveResponse() { def path = "/get" diff --git a/core-groovy/src/test/groovy/com/baeldung/file/ReadFileUnitTest.groovy b/core-groovy/src/test/groovy/com/baeldung/file/ReadFileUnitTest.groovy index b969f0d1ab..da1dfc10ba 100644 --- a/core-groovy/src/test/groovy/com/baeldung/file/ReadFileUnitTest.groovy +++ b/core-groovy/src/test/groovy/com/baeldung/file/ReadFileUnitTest.groovy @@ -33,7 +33,6 @@ class ReadFileUnitTest extends Specification { assert lines.size(), 3 } - @Ignore def 'Should return file content in string using ReadFile.readFileString given filePath' () { given: def filePath = "src/main/resources/fileContent.txt" diff --git a/core-java-modules/core-java-11/README.md b/core-java-modules/core-java-11/README.md index 7ca81e901a..70e2e66737 100644 --- a/core-java-modules/core-java-11/README.md +++ b/core-java-modules/core-java-11/README.md @@ -13,3 +13,4 @@ This module contains articles about Java 11 core features - [Guide to jlink](https://www.baeldung.com/jlink) - [Negate a Predicate Method Reference with Java 11](https://www.baeldung.com/java-negate-predicate-method-reference) - [Benchmark JDK Collections vs Eclipse Collections](https://www.baeldung.com/jdk-collections-vs-eclipse-collections) +- [Pre-compile Regex Patterns Into Pattern Objects](https://www.baeldung.com/java-regex-pre-compile) diff --git a/core-java-modules/core-java-11/pom.xml b/core-java-modules/core-java-11/pom.xml index 32bc68fa66..2dfc72db09 100644 --- a/core-java-modules/core-java-11/pom.xml +++ b/core-java-modules/core-java-11/pom.xml @@ -65,7 +65,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.1 + ${shade.plugin.version} package @@ -109,6 +109,7 @@ benchmarks 1.22 10.0.0 + 10.0.0 diff --git a/core-java-modules/core-java-13/README.md b/core-java-modules/core-java-13/README.md new file mode 100644 index 0000000000..697f89c362 --- /dev/null +++ b/core-java-modules/core-java-13/README.md @@ -0,0 +1,4 @@ +### Relevant articles: + +- [Java Switch Statement](https://www.baeldung.com/java-switch) +- [New Java 13 Features](https://www.baeldung.com/java-13-new-features) diff --git a/core-java-modules/core-java-14/.mvn/jvm.config b/core-java-modules/core-java-14/.mvn/jvm.config new file mode 100644 index 0000000000..50f549be0a --- /dev/null +++ b/core-java-modules/core-java-14/.mvn/jvm.config @@ -0,0 +1 @@ +--enable-preview \ No newline at end of file diff --git a/core-java-modules/core-java-14/README.md b/core-java-modules/core-java-14/README.md new file mode 100644 index 0000000000..0648d087be --- /dev/null +++ b/core-java-modules/core-java-14/README.md @@ -0,0 +1,7 @@ +## Core Java 14 + +This module contains articles about Java 14. + +### Relevant articles + +- [Guide to the @Serial Annotation in Java 14](https://www.baeldung.com/java-14-serial-annotation) diff --git a/core-java-modules/core-java-14/pom.xml b/core-java-modules/core-java-14/pom.xml index b985ada5e6..4f89e87d02 100644 --- a/core-java-modules/core-java-14/pom.xml +++ b/core-java-modules/core-java-14/pom.xml @@ -1,53 +1,66 @@ - 4.0.0 - com.baeldung - core-java-14 - 1.0.0-SNAPSHOT - core-java-14 - jar - http://maven.apache.org + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + core-java-14 + core-java-14 + jar + http://maven.apache.org - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - ../../ - + + com.baeldung + parent-modules + 1.0.0-SNAPSHOT + ../../ + + + + org.assertj + assertj-core + ${assertj.version} + test + + + org.junit.jupiter + junit-jupiter-engine + ${junit-jupiter.version} + test + + + org.junit.jupiter + junit-jupiter-api + ${junit-jupiter.version} + test + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + ${maven.compiler.release} + --enable-preview + + + + org.apache.maven.plugins + maven-surefire-plugin + ${surefire.plugin.version} + + --enable-preview + + + + - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - ${maven.compiler.source.version} - ${maven.compiler.target.version} - - - --enable-preview - - - - - - org.apache.maven.plugins - maven-surefire-plugin - ${surefire.plugin.version} - - --enable-preview - - - - - - - 14 - 14 + + 14 + 3.6.1 + 3.8.1 3.0.0-M3 - + \ No newline at end of file diff --git a/core-java-modules/core-java-14/src/main/java/com/baeldung/java14/textblocks/TextBlocks13.java b/core-java-modules/core-java-14/src/main/java/com/baeldung/java14/textblocks/TextBlocks13.java new file mode 100644 index 0000000000..58d4cf44f3 --- /dev/null +++ b/core-java-modules/core-java-14/src/main/java/com/baeldung/java14/textblocks/TextBlocks13.java @@ -0,0 +1,46 @@ +package com.baeldung.java14.textblocks; + +public class TextBlocks13 { + public String getBlockOfHtml() { + return """ + + + + example text + + """; + } + + public String getNonStandardIndent() { + return """ + Indent + """; + } + + public String getQuery() { + return """ + select "id", "user" + from "table" + """; + } + + public String getTextWithCarriageReturns() { + return """ + separated with\r + carriage returns"""; + } + + public String getTextWithEscapes() { + return """ + fun with\n + whitespace\t\r + and other escapes \""" + """; + } + + public String getFormattedText(String parameter) { + return """ + Some parameter: %s + """.formatted(parameter); + } +} diff --git a/core-java-modules/core-java-14/src/main/java/com/baeldung/java14/textblocks/TextBlocks14.java b/core-java-modules/core-java-14/src/main/java/com/baeldung/java14/textblocks/TextBlocks14.java new file mode 100644 index 0000000000..90fc15e884 --- /dev/null +++ b/core-java-modules/core-java-14/src/main/java/com/baeldung/java14/textblocks/TextBlocks14.java @@ -0,0 +1,16 @@ +package com.baeldung.java14.textblocks; + +public class TextBlocks14 { + public String getIgnoredNewLines() { + return """ + This is a long test which looks to \ + have a newline but actually does not"""; + } + + public String getEscapedSpaces() { + return """ + line 1 + line 2 \s + """; + } +} diff --git a/core-java-modules/core-java-14/src/main/java/com/baeldung/serial/MySerialClass.java b/core-java-modules/core-java-14/src/main/java/com/baeldung/serial/MySerialClass.java index 6a013d7b59..b28e53bdaa 100644 --- a/core-java-modules/core-java-14/src/main/java/com/baeldung/serial/MySerialClass.java +++ b/core-java-modules/core-java-14/src/main/java/com/baeldung/serial/MySerialClass.java @@ -10,41 +10,41 @@ import java.io.Serializable; /** * Class showcasing the usage of the Java 14 @Serial annotation. - * + * * @author Donato Rimenti */ public class MySerialClass implements Serializable { - - @Serial - private static final ObjectStreamField[] serialPersistentFields = null; - - @Serial - private static final long serialVersionUID = 1; - @Serial - private void writeObject(ObjectOutputStream stream) throws IOException { - // ... - } + @Serial + private static final ObjectStreamField[] serialPersistentFields = null; - @Serial - private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { - // ... - } + @Serial + private static final long serialVersionUID = 1; - @Serial - private void readObjectNoData() throws ObjectStreamException { - // ... - } + @Serial + private void writeObject(ObjectOutputStream stream) throws IOException { + // ... + } - @Serial - private Object writeReplace() throws ObjectStreamException { - // ... - return null; - } + @Serial + private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { + // ... + } - @Serial - private Object readResolve() throws ObjectStreamException { - // ... - return null; - } + @Serial + private void readObjectNoData() throws ObjectStreamException { + // ... + } + + @Serial + private Object writeReplace() throws ObjectStreamException { + // ... + return null; + } + + @Serial + private Object readResolve() throws ObjectStreamException { + // ... + return null; + } } \ No newline at end of file diff --git a/core-java-modules/core-java-14/src/test/java/com/baeldung/java14/textblocks/TextBlocks13UnitTest.java b/core-java-modules/core-java-14/src/test/java/com/baeldung/java14/textblocks/TextBlocks13UnitTest.java new file mode 100644 index 0000000000..f5fef9be57 --- /dev/null +++ b/core-java-modules/core-java-14/src/test/java/com/baeldung/java14/textblocks/TextBlocks13UnitTest.java @@ -0,0 +1,58 @@ +package com.baeldung.java14.textblocks; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.jupiter.api.Test; + +class TextBlocks13UnitTest { + private TextBlocks13 subject = new TextBlocks13(); + + @Test + void givenAnOldStyleMultilineString_whenComparing_thenEqualsTextBlock() { + String expected = "\n" + + "\n" + + " \n" + + " example text\n" + + " \n" + + ""; + assertThat(subject.getBlockOfHtml()).isEqualTo(expected); + } + + @Test + void givenAnOldStyleString_whenComparing_thenEqualsTextBlock() { + String expected = "\n\n \n example text\n \n"; + assertThat(subject.getBlockOfHtml()).isEqualTo(expected); + } + + @Test + void givenAnIndentedString_thenMatchesIndentedOldStyle() { + assertThat(subject.getNonStandardIndent()).isEqualTo(" Indent\n"); + } + + @Test + void givenAMultilineQuery_thenItCanContainUnescapedQuotes() { + assertThat(subject.getQuery()).contains("select \"id\", \"user\""); + } + + @Test + void givenAMultilineQuery_thenItEndWithANewline() { + assertThat(subject.getQuery()).endsWith("\n"); + } + + @Test + void givenATextWithCarriageReturns_thenItContainsBoth() { + assertThat(subject.getTextWithCarriageReturns()).isEqualTo("separated with\r\ncarriage returns"); + } + + @Test + void givenAStringWithEscapedWhitespace_thenItAppearsInTheResultingString() { + assertThat(subject.getTextWithEscapes()).contains("fun with\n\n") + .contains("whitespace\t\r\n") + .contains("and other escapes \"\"\""); + } + + @Test + void givenAFormattedString_thenTheParameterIsReplaced() { + assertThat(subject.getFormattedText("parameter")).contains("Some parameter: parameter"); + } +} \ No newline at end of file diff --git a/core-java-modules/core-java-14/src/test/java/com/baeldung/java14/textblocks/TextBlocks14UnitTest.java b/core-java-modules/core-java-14/src/test/java/com/baeldung/java14/textblocks/TextBlocks14UnitTest.java new file mode 100644 index 0000000000..fe671e8638 --- /dev/null +++ b/core-java-modules/core-java-14/src/test/java/com/baeldung/java14/textblocks/TextBlocks14UnitTest.java @@ -0,0 +1,21 @@ +package com.baeldung.java14.textblocks; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.jupiter.api.Test; + +class TextBlocks14UnitTest { + private TextBlocks14 subject = new TextBlocks14(); + + @Test + void givenAStringWithEscapedNewLines_thenTheResultHasNoNewLines() { + String expected = "This is a long test which looks to have a newline but actually does not"; + assertThat(subject.getIgnoredNewLines()).isEqualTo(expected); + } + + @Test + void givenAStringWithEscapesSpaces_thenTheResultHasLinesEndingWithSpaces() { + String expected = "line 1\nline 2 \n"; + assertThat(subject.getEscapedSpaces()).isEqualTo(expected); + } +} \ No newline at end of file diff --git a/core-java-modules/core-java-8/pom.xml b/core-java-modules/core-java-8/pom.xml index c2c84a5407..889c30b76e 100644 --- a/core-java-modules/core-java-8/pom.xml +++ b/core-java-modules/core-java-8/pom.xml @@ -61,7 +61,7 @@ spring-boot - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar diff --git a/core-java-modules/core-java-9/README.md b/core-java-modules/core-java-9/README.md index e2bea5f7e2..bfd426b9c1 100644 --- a/core-java-modules/core-java-9/README.md +++ b/core-java-modules/core-java-9/README.md @@ -9,6 +9,7 @@ This module contains articles about Java 9 core features - [Iterate Through a Range of Dates in Java](https://www.baeldung.com/java-iterate-date-range) - [Initialize a HashMap in Java](https://www.baeldung.com/java-initialize-hashmap) - [Immutable Set in Java](https://www.baeldung.com/java-immutable-set) +- [Immutable ArrayList in Java](https://www.baeldung.com/java-immutable-list) Note: also contains part of the code for the article [How to Filter a Collection in Java](https://www.baeldung.com/java-collection-filtering). diff --git a/core-java-modules/core-java-9/pom.xml b/core-java-modules/core-java-9/pom.xml index 23a465caa1..a90ad0a740 100644 --- a/core-java-modules/core-java-9/pom.xml +++ b/core-java-modules/core-java-9/pom.xml @@ -37,6 +37,11 @@ ${junit.platform.version} test + + org.apache.commons + commons-collections4 + ${commons-collections4.version} + @@ -69,6 +74,7 @@ 1.9 1.9 25.1-jre + 4.1 diff --git a/core-java-modules/core-java-collections-array-list/src/test/java/org/baeldung/java/collections/CoreJavaCollectionsUnitTest.java b/core-java-modules/core-java-9/src/test/java/com/baeldung/java9/list/immutable/ImmutableArrayListUnitTest.java similarity index 51% rename from core-java-modules/core-java-collections-array-list/src/test/java/org/baeldung/java/collections/CoreJavaCollectionsUnitTest.java rename to core-java-modules/core-java-9/src/test/java/com/baeldung/java9/list/immutable/ImmutableArrayListUnitTest.java index 5f7fe356c5..f148b66dad 100644 --- a/core-java-modules/core-java-collections-array-list/src/test/java/org/baeldung/java/collections/CoreJavaCollectionsUnitTest.java +++ b/core-java-modules/core-java-9/src/test/java/com/baeldung/java9/list/immutable/ImmutableArrayListUnitTest.java @@ -1,56 +1,48 @@ -package org.baeldung.java.collections; +package com.baeldung.java9.list.immutable; import com.google.common.collect.ImmutableList; import org.apache.commons.collections4.ListUtils; import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; -public class CoreJavaCollectionsUnitTest { - - private static final Logger LOG = LoggerFactory.getLogger(CoreJavaCollectionsUnitTest.class); - - - // tests - - - @Test - public final void givenUsingTheJdk_whenArrayListIsSynchronized_thenCorrect() { - final List list = new ArrayList(Arrays.asList("one", "two", "three")); - final List synchronizedList = Collections.synchronizedList(list); - LOG.debug("Synchronized List is: " + synchronizedList); - } +public class ImmutableArrayListUnitTest { @Test(expected = UnsupportedOperationException.class) - public final void givenUsingTheJdk_whenUnmodifiableListIsCreatedFromOriginal_thenNoLongerModifiable() { - final List list = new ArrayList(Arrays.asList("one", "two", "three")); + public final void givenUsingTheJdk_whenUnmodifiableListIsCreated_thenNotModifiable() { + final List list = new ArrayList<>(Arrays.asList("one", "two", "three")); final List unmodifiableList = Collections.unmodifiableList(list); unmodifiableList.add("four"); } @Test(expected = UnsupportedOperationException.class) - public final void givenUsingGuava_whenUnmodifiableListIsCreatedFromOriginal_thenNoLongerModifiable() { - final List list = new ArrayList(Arrays.asList("one", "two", "three")); + public final void givenUsingTheJava9_whenUnmodifiableListIsCreated_thenNotModifiable() { + final List list = new ArrayList<>(Arrays.asList("one", "two", "three")); + final List unmodifiableList = List.of(list.toArray(new String[]{})); + unmodifiableList.add("four"); + } + + @Test(expected = UnsupportedOperationException.class) + public final void givenUsingGuava_whenUnmodifiableListIsCreated_thenNotModifiable() { + final List list = new ArrayList<>(Arrays.asList("one", "two", "three")); final List unmodifiableList = ImmutableList.copyOf(list); unmodifiableList.add("four"); } @Test(expected = UnsupportedOperationException.class) - public final void givenUsingGuavaBuilder_whenUnmodifiableListIsCreatedFromOriginal_thenNoLongerModifiable() { - final List list = new ArrayList(Arrays.asList("one", "two", "three")); + public final void givenUsingGuavaBuilder_whenUnmodifiableListIsCreated_thenNoLongerModifiable() { + final List list = new ArrayList<>(Arrays.asList("one", "two", "three")); final ImmutableList unmodifiableList = ImmutableList.builder().addAll(list).build(); unmodifiableList.add("four"); } @Test(expected = UnsupportedOperationException.class) - public final void givenUsingCommonsCollections_whenUnmodifiableListIsCreatedFromOriginal_thenNoLongerModifiable() { - final List list = new ArrayList(Arrays.asList("one", "two", "three")); + public final void givenUsingCommonsCollections_whenUnmodifiableListIsCreated_thenNotModifiable() { + final List list = new ArrayList<>(Arrays.asList("one", "two", "three")); final List unmodifiableList = ListUtils.unmodifiableList(list); unmodifiableList.add("four"); } - } diff --git a/core-java-modules/core-java-arrays-2/README.md b/core-java-modules/core-java-arrays-2/README.md index a78b3327b6..c4ae3f03f7 100644 --- a/core-java-modules/core-java-arrays-2/README.md +++ b/core-java-modules/core-java-arrays-2/README.md @@ -13,4 +13,5 @@ This module contains articles about Java arrays - [Removing an Element from an Array in Java](https://www.baeldung.com/java-array-remove-element) - [Removing the First Element of an Array](https://www.baeldung.com/java-array-remove-first-element) - [Adding an Element to a Java Array vs an ArrayList](https://www.baeldung.com/java-add-element-to-array-vs-list) +- [Arrays.sort vs Arrays.parallelSort](https://www.baeldung.com/java-arrays-sort-vs-parallelsort) - [[<-- Prev]](/core-java-modules/core-java-arrays) diff --git a/core-java-modules/core-java-arrays-2/src/test/java/com/baeldung/arraysort/SortComparisonUnitTest.java b/core-java-modules/core-java-arrays-2/src/test/java/com/baeldung/arraysort/SortComparisonUnitTest.java index d1aba5a886..4b0a18684a 100644 --- a/core-java-modules/core-java-arrays-2/src/test/java/com/baeldung/arraysort/SortComparisonUnitTest.java +++ b/core-java-modules/core-java-arrays-2/src/test/java/com/baeldung/arraysort/SortComparisonUnitTest.java @@ -69,7 +69,7 @@ public class SortComparisonUnitTest { } @Test - public void givenArrayOfIntegers_whenUsingArraysSortMethodWithRange_thenSortRangeOfArrayInAscendingOrder() { + public void givenArrayOfIntegers_whenUsingArraysSortWithRange_thenSortRangeOfArrayAsc() { int[] array = { 10, 4, 6, 2, 1, 9, 7, 8, 3, 5 }; int[] expected = { 10, 4, 1, 2, 6, 7, 8, 9, 3, 5 }; @@ -89,7 +89,7 @@ public class SortComparisonUnitTest { } @Test - public void givenArrayOfIntegers_whenUsingArraysParallelSortMethodWithRange_thenSortRangeOfArrayInAscendingOrder() { + public void givenArrayOfIntegers_whenUsingArraysParallelSortWithRange_thenSortRangeOfArrayAsc() { int[] array = { 10, 4, 6, 2, 1, 9, 7, 8, 3, 5 }; int[] expected = { 10, 4, 1, 2, 6, 7, 8, 9, 3, 5 }; diff --git a/core-java-modules/core-java-arrays/pom.xml b/core-java-modules/core-java-arrays/pom.xml index 02d82e4af6..a70ab2d791 100644 --- a/core-java-modules/core-java-arrays/pom.xml +++ b/core-java-modules/core-java-arrays/pom.xml @@ -75,7 +75,7 @@ true libs/ - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar @@ -94,7 +94,7 @@ ${project.basedir} - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar @@ -118,7 +118,7 @@ true - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar @@ -133,7 +133,7 @@ - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar true ${project.build.finalName}-onejar.${project.packaging} @@ -155,7 +155,7 @@ spring-boot - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar diff --git a/core-java-modules/core-java-collections-array-list/README.md b/core-java-modules/core-java-collections-array-list/README.md index 302ea82130..3637f835cf 100644 --- a/core-java-modules/core-java-collections-array-list/README.md +++ b/core-java-modules/core-java-collections-array-list/README.md @@ -3,9 +3,8 @@ This module contains articles about the Java ArrayList collection ### Relevant Articles: -- [Immutable ArrayList in Java](http://www.baeldung.com/java-immutable-list) -- [Guide to the Java ArrayList](http://www.baeldung.com/java-arraylist) -- [Add Multiple Items to an Java ArrayList](http://www.baeldung.com/java-add-items-array-list) +- [Guide to the Java ArrayList](https://www.baeldung.com/java-arraylist) +- [Add Multiple Items to an Java ArrayList](https://www.baeldung.com/java-add-items-array-list) - [ClassCastException: Arrays$ArrayList cannot be cast to ArrayList](https://www.baeldung.com/java-classcastexception-arrays-arraylist) - [Multi Dimensional ArrayList in Java](https://www.baeldung.com/java-multi-dimensional-arraylist) - [Removing an Element From an ArrayList](https://www.baeldung.com/java-arraylist-remove-element) diff --git a/core-java-modules/core-java-collections-array-list/src/test/java/org/baeldung/java/collections/ArrayListUnitTest.java b/core-java-modules/core-java-collections-array-list/src/test/java/com/baeldung/collections/ArrayListUnitTest.java similarity index 99% rename from core-java-modules/core-java-collections-array-list/src/test/java/org/baeldung/java/collections/ArrayListUnitTest.java rename to core-java-modules/core-java-collections-array-list/src/test/java/com/baeldung/collections/ArrayListUnitTest.java index 5d07628a96..9d14a63295 100644 --- a/core-java-modules/core-java-collections-array-list/src/test/java/org/baeldung/java/collections/ArrayListUnitTest.java +++ b/core-java-modules/core-java-collections-array-list/src/test/java/com/baeldung/collections/ArrayListUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.java.collections; +package com.baeldung.collections; import com.google.common.collect.Sets; import org.junit.Before; diff --git a/core-java-modules/core-java-collections-array-list/src/test/java/com/baeldung/collections/CoreJavaCollectionsUnitTest.java b/core-java-modules/core-java-collections-array-list/src/test/java/com/baeldung/collections/CoreJavaCollectionsUnitTest.java new file mode 100644 index 0000000000..5fd0e605dd --- /dev/null +++ b/core-java-modules/core-java-collections-array-list/src/test/java/com/baeldung/collections/CoreJavaCollectionsUnitTest.java @@ -0,0 +1,25 @@ +package com.baeldung.collections; + +import com.google.common.collect.ImmutableList; +import org.apache.commons.collections4.ListUtils; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +public class CoreJavaCollectionsUnitTest { + + private static final Logger LOG = LoggerFactory.getLogger(CoreJavaCollectionsUnitTest.class); + + @Test + public final void givenUsingTheJdk_whenArrayListIsSynchronized_thenCorrect() { + final List list = new ArrayList<>(Arrays.asList("one", "two", "three")); + final List synchronizedList = Collections.synchronizedList(list); + LOG.debug("Synchronized List is: " + synchronizedList); + } + +} diff --git a/core-java-modules/core-java-collections-list-2/README.md b/core-java-modules/core-java-collections-list-2/README.md index 0d2da41b41..2e43f610a9 100644 --- a/core-java-modules/core-java-collections-list-2/README.md +++ b/core-java-modules/core-java-collections-list-2/README.md @@ -3,13 +3,13 @@ This module contains articles about the Java List collection ### Relevant Articles: -- [Check If Two Lists are Equal in Java](http://www.baeldung.com/java-test-a-list-for-ordinality-and-equality) +- [Check If Two Lists are Equal in Java](https://www.baeldung.com/java-test-a-list-for-ordinality-and-equality) - [Java 8 Streams: Find Items From One List Based On Values From Another List](https://www.baeldung.com/java-streams-find-list-items) -- [A Guide to the Java LinkedList](http://www.baeldung.com/java-linkedlist) -- [Java List UnsupportedOperationException](http://www.baeldung.com/java-list-unsupported-operation-exception) +- [A Guide to the Java LinkedList](https://www.baeldung.com/java-linkedlist) +- [Java List UnsupportedOperationException](https://www.baeldung.com/java-list-unsupported-operation-exception) - [Java List Initialization in One Line](https://www.baeldung.com/java-init-list-one-line) - [Ways to Iterate Over a List in Java](https://www.baeldung.com/java-iterate-list) -- [Flattening Nested Collections in Java](http://www.baeldung.com/java-flatten-nested-collections) +- [Flattening Nested Collections in Java](https://www.baeldung.com/java-flatten-nested-collections) - [Intersection of Two Lists in Java](https://www.baeldung.com/java-lists-intersection) - [Searching for a String in an ArrayList](https://www.baeldung.com/java-search-string-arraylist) - [[<-- Prev]](/core-java-modules/core-java-collections-list)[[Next -->]](/core-java-modules/core-java-collections-list-3) diff --git a/core-java-modules/core-java-collections-list-2/src/test/java/org/baeldung/java/lists/ListAssertJUnitTest.java b/core-java-modules/core-java-collections-list-2/src/test/java/com/baeldung/java/list/ListAssertJUnitTest.java similarity index 95% rename from core-java-modules/core-java-collections-list-2/src/test/java/org/baeldung/java/lists/ListAssertJUnitTest.java rename to core-java-modules/core-java-collections-list-2/src/test/java/com/baeldung/java/list/ListAssertJUnitTest.java index c609f5badb..fd15d92dac 100644 --- a/core-java-modules/core-java-collections-list-2/src/test/java/org/baeldung/java/lists/ListAssertJUnitTest.java +++ b/core-java-modules/core-java-collections-list-2/src/test/java/com/baeldung/java/list/ListAssertJUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.java.lists; +package com.baeldung.java.list; import org.junit.Test; diff --git a/core-java-modules/core-java-collections-list-2/src/test/java/org/baeldung/java/lists/ListJUnitTest.java b/core-java-modules/core-java-collections-list-2/src/test/java/com/baeldung/java/list/ListJUnitTest.java similarity index 97% rename from core-java-modules/core-java-collections-list-2/src/test/java/org/baeldung/java/lists/ListJUnitTest.java rename to core-java-modules/core-java-collections-list-2/src/test/java/com/baeldung/java/list/ListJUnitTest.java index f9c9d3fda8..6537e2d153 100644 --- a/core-java-modules/core-java-collections-list-2/src/test/java/org/baeldung/java/lists/ListJUnitTest.java +++ b/core-java-modules/core-java-collections-list-2/src/test/java/com/baeldung/java/list/ListJUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.java.lists; +package com.baeldung.java.list; import org.junit.Assert; import org.junit.Test; diff --git a/core-java-modules/core-java-collections-list-2/src/test/java/org/baeldung/java/lists/ListTestNgUnitTest.java b/core-java-modules/core-java-collections-list-2/src/test/java/com/baeldung/java/list/ListTestNgUnitTest.java similarity index 94% rename from core-java-modules/core-java-collections-list-2/src/test/java/org/baeldung/java/lists/ListTestNgUnitTest.java rename to core-java-modules/core-java-collections-list-2/src/test/java/com/baeldung/java/list/ListTestNgUnitTest.java index 86493f6e5d..07002b5613 100644 --- a/core-java-modules/core-java-collections-list-2/src/test/java/org/baeldung/java/lists/ListTestNgUnitTest.java +++ b/core-java-modules/core-java-collections-list-2/src/test/java/com/baeldung/java/list/ListTestNgUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.java.lists; +package com.baeldung.java.list; import org.junit.Test; diff --git a/core-java-modules/core-java-collections-list-2/src/test/java/org/baeldung/java/lists/README.md b/core-java-modules/core-java-collections-list-2/src/test/java/org/baeldung/java/lists/README.md deleted file mode 100644 index 2a1e8aeeaa..0000000000 --- a/core-java-modules/core-java-collections-list-2/src/test/java/org/baeldung/java/lists/README.md +++ /dev/null @@ -1,2 +0,0 @@ -### Relevant Articles: -- [Check If Two Lists are Equal in Java](http://www.baeldung.com/java-test-a-list-for-ordinality-and-equality) diff --git a/core-java-modules/core-java-collections-list/src/test/java/org/baeldung/java/collections/JavaCollectionCleanupUnitTest.java b/core-java-modules/core-java-collections-list/src/test/java/com/baeldung/collections/JavaCollectionCleanupUnitTest.java similarity index 98% rename from core-java-modules/core-java-collections-list/src/test/java/org/baeldung/java/collections/JavaCollectionCleanupUnitTest.java rename to core-java-modules/core-java-collections-list/src/test/java/com/baeldung/collections/JavaCollectionCleanupUnitTest.java index 537262607a..96813df862 100644 --- a/core-java-modules/core-java-collections-list/src/test/java/org/baeldung/java/collections/JavaCollectionCleanupUnitTest.java +++ b/core-java-modules/core-java-collections-list/src/test/java/com/baeldung/collections/JavaCollectionCleanupUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.java.collections; +package com.baeldung.collections; import static org.hamcrest.Matchers.hasSize; import static org.junit.Assert.assertThat; diff --git a/core-java-modules/core-java-collections-list/src/test/java/org/baeldung/RandomListElementUnitTest.java b/core-java-modules/core-java-collections-list/src/test/java/com/baeldung/list/random/RandomListElementUnitTest.java similarity index 98% rename from core-java-modules/core-java-collections-list/src/test/java/org/baeldung/RandomListElementUnitTest.java rename to core-java-modules/core-java-collections-list/src/test/java/com/baeldung/list/random/RandomListElementUnitTest.java index 4f5ba0f82f..95e013b481 100644 --- a/core-java-modules/core-java-collections-list/src/test/java/org/baeldung/RandomListElementUnitTest.java +++ b/core-java-modules/core-java-collections-list/src/test/java/com/baeldung/list/random/RandomListElementUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung; +package com.baeldung.list.random; import com.google.common.collect.Lists; import org.junit.Test; diff --git a/core-java-modules/core-java-concurrency-advanced-2/src/main/java/com/baeldung/threadlocalrandom/ThreadLocalRandomBenchMarkRunner.java b/core-java-modules/core-java-concurrency-advanced-2/src/main/java/com/baeldung/threadlocalrandom/ThreadLocalRandomBenchMarkRunner.java index e9c8056ff5..a04994d558 100644 --- a/core-java-modules/core-java-concurrency-advanced-2/src/main/java/com/baeldung/threadlocalrandom/ThreadLocalRandomBenchMarkRunner.java +++ b/core-java-modules/core-java-concurrency-advanced-2/src/main/java/com/baeldung/threadlocalrandom/ThreadLocalRandomBenchMarkRunner.java @@ -1,22 +1,27 @@ package com.baeldung.threadlocalrandom; import org.openjdk.jmh.runner.Runner; -import org.openjdk.jmh.runner.options.Options; +import org.openjdk.jmh.runner.options.ChainedOptionsBuilder; import org.openjdk.jmh.runner.options.OptionsBuilder; +import com.google.common.collect.ImmutableList; + public class ThreadLocalRandomBenchMarkRunner { public static void main(String[] args) throws Exception { - Options options = new OptionsBuilder().include(ThreadLocalRandomBenchMarker.class.getSimpleName()) - .threads(1) + ChainedOptionsBuilder options = new OptionsBuilder().include(ThreadLocalRandomBenchMarker.class.getSimpleName()) .forks(1) .shouldFailOnError(true) .shouldDoGC(true) - .jvmArgs("-server") - .build(); - - new Runner(options).run(); + .jvmArgs("-server"); + for (Integer i : ImmutableList.of(1, 2, 8, 32)) { + new Runner( + options + .threads(i) + .build()) + .run(); + } } } diff --git a/core-java-modules/core-java-concurrency-advanced-2/src/main/java/com/baeldung/threadlocalrandom/ThreadLocalRandomBenchMarker.java b/core-java-modules/core-java-concurrency-advanced-2/src/main/java/com/baeldung/threadlocalrandom/ThreadLocalRandomBenchMarker.java index 8a0e2d2826..b0852bc40d 100644 --- a/core-java-modules/core-java-concurrency-advanced-2/src/main/java/com/baeldung/threadlocalrandom/ThreadLocalRandomBenchMarker.java +++ b/core-java-modules/core-java-concurrency-advanced-2/src/main/java/com/baeldung/threadlocalrandom/ThreadLocalRandomBenchMarker.java @@ -1,64 +1,34 @@ package com.baeldung.threadlocalrandom; -import java.util.ArrayList; -import java.util.List; import java.util.Random; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; -import org.openjdk.jmh.annotations.Level; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Scope; -import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.annotations.Warmup; -@BenchmarkMode(Mode.AverageTime) +@BenchmarkMode(Mode.Throughput) @Warmup(iterations = 1) @OutputTimeUnit(TimeUnit.MICROSECONDS) @State(Scope.Benchmark) public class ThreadLocalRandomBenchMarker { + private final Random random = new Random(); - List> randomCallables = new ArrayList<>(); - List> threadLocalRandomCallables = new ArrayList<>(); - - @Setup(Level.Iteration) - public void init() { - Random random = new Random(); - randomCallables = new ArrayList<>(); - threadLocalRandomCallables = new ArrayList<>(); - for (int i = 0; i < 1000; i++) { - randomCallables.add(() -> { - return random.nextInt(); - }); - } - - for (int i = 0; i < 1000; i++) { - threadLocalRandomCallables.add(() -> { - return ThreadLocalRandom.current() - .nextInt(); - }); - } + @Benchmark + public int randomValuesUsingRandom() { + return random.nextInt(); } @Benchmark - public void randomValuesUsingRandom() throws InterruptedException { - ExecutorService executor = Executors.newWorkStealingPool(); - executor.invokeAll(randomCallables); - executor.shutdown(); - } - - @Benchmark - public void randomValuesUsingThreadLocalRandom() throws InterruptedException { - ExecutorService executor = Executors.newWorkStealingPool(); - executor.invokeAll(threadLocalRandomCallables); - executor.shutdown(); + public int randomValuesUsingThreadLocalRandom() { + return ThreadLocalRandom + .current() + .nextInt(); } } diff --git a/core-java-modules/core-java-concurrency-advanced-3/README.md b/core-java-modules/core-java-concurrency-advanced-3/README.md index 409d3aa464..2c554e948b 100644 --- a/core-java-modules/core-java-concurrency-advanced-3/README.md +++ b/core-java-modules/core-java-concurrency-advanced-3/README.md @@ -8,4 +8,6 @@ This module contains articles about advanced topics about multithreading with co - [Common Concurrency Pitfalls in Java](https://www.baeldung.com/java-common-concurrency-pitfalls) - [Guide to RejectedExecutionHandler](https://www.baeldung.com/java-rejectedexecutionhandler) -[[<-- previous]](/core-java-modules/core-java-concurrency-advanced-2) +- [Guide to Work Stealing in Java](https://www.baeldung.com/java-work-stealing) +- [Asynchronous Programming in Java](https://www.baeldung.com/java-asynchronous-programming) +- [[<-- previous]](/core-java-modules/core-java-concurrency-advanced-2) diff --git a/core-java-modules/core-java-concurrency-advanced-3/src/main/java/com/baeldung/workstealing/PrimeNumbers.java b/core-java-modules/core-java-concurrency-advanced-3/src/main/java/com/baeldung/workstealing/PrimeNumbers.java new file mode 100644 index 0000000000..b31ec85cd4 --- /dev/null +++ b/core-java-modules/core-java-concurrency-advanced-3/src/main/java/com/baeldung/workstealing/PrimeNumbers.java @@ -0,0 +1,85 @@ +package com.baeldung.workstealing; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.ForkJoinTask; +import java.util.concurrent.RecursiveAction; +import java.util.concurrent.atomic.AtomicInteger; + +public class PrimeNumbers extends RecursiveAction { + + private int lowerBound; + private int upperBound; + private int granularity; + static final List GRANULARITIES + = Arrays.asList(1, 10, 100, 1000, 10000); + private AtomicInteger noOfPrimeNumbers; + + PrimeNumbers(int lowerBound, int upperBound, int granularity, AtomicInteger noOfPrimeNumbers) { + this.lowerBound = lowerBound; + this.upperBound = upperBound; + this.granularity = granularity; + this.noOfPrimeNumbers = noOfPrimeNumbers; + } + + PrimeNumbers(int upperBound) { + this(1, upperBound, 100, new AtomicInteger(0)); + } + + private PrimeNumbers(int lowerBound, int upperBound, AtomicInteger noOfPrimeNumbers) { + this(lowerBound, upperBound, 100, noOfPrimeNumbers); + } + + private List subTasks() { + List subTasks = new ArrayList<>(); + + for (int i = 1; i <= this.upperBound / granularity; i++) { + int upper = i * granularity; + int lower = (upper - granularity) + 1; + subTasks.add(new PrimeNumbers(lower, upper, noOfPrimeNumbers)); + } + return subTasks; + } + + @Override + protected void compute() { + if (((upperBound + 1) - lowerBound) > granularity) { + ForkJoinTask.invokeAll(subTasks()); + } else { + findPrimeNumbers(); + } + } + + void findPrimeNumbers() { + for (int num = lowerBound; num <= upperBound; num++) { + if (isPrime(num)) { + noOfPrimeNumbers.getAndIncrement(); + } + } + } + + private boolean isPrime(int number) { + if (number == 2) { + return true; + } + + if (number == 1 || number % 2 == 0) { + return false; + } + + int noOfNaturalNumbers = 0; + + for (int i = 1; i <= number; i++) { + if (number % i == 0) { + noOfNaturalNumbers++; + } + } + + return noOfNaturalNumbers == 2; + } + + public int noOfPrimeNumbers() { + return noOfPrimeNumbers.intValue(); + } +} \ No newline at end of file diff --git a/core-java-modules/core-java-concurrency-advanced-3/src/test/java/com/baeldung/rejection/SaturationPolicyUnitTest.java b/core-java-modules/core-java-concurrency-advanced-3/src/test/java/com/baeldung/rejection/SaturationPolicyUnitTest.java index b0b065813f..1301fe2778 100644 --- a/core-java-modules/core-java-concurrency-advanced-3/src/test/java/com/baeldung/rejection/SaturationPolicyUnitTest.java +++ b/core-java-modules/core-java-concurrency-advanced-3/src/test/java/com/baeldung/rejection/SaturationPolicyUnitTest.java @@ -33,7 +33,7 @@ public class SaturationPolicyUnitTest { @Test public void givenAbortPolicy_WhenSaturated_ThenShouldThrowRejectedExecutionException() { executor = new ThreadPoolExecutor(1, 1, 0, MILLISECONDS, new SynchronousQueue<>(), new AbortPolicy()); - executor.execute(() -> waitFor(100)); + executor.execute(() -> waitFor(250)); assertThatThrownBy(() -> executor.execute(() -> System.out.println("Will be rejected"))).isInstanceOf(RejectedExecutionException.class); } @@ -42,13 +42,13 @@ public class SaturationPolicyUnitTest { @Test public void givenCallerRunsPolicy_WhenSaturated_ThenTheCallerThreadRunsTheTask() { executor = new ThreadPoolExecutor(1, 1, 0, MILLISECONDS, new SynchronousQueue<>(), new CallerRunsPolicy()); - executor.execute(() -> waitFor(100)); + executor.execute(() -> waitFor(250)); - long startTime = System.nanoTime(); - executor.execute(() -> waitFor(100)); - double blockedDuration = (System.nanoTime() - startTime) / 1_000_000.0; + long startTime = System.currentTimeMillis(); + executor.execute(() -> waitFor(500)); + long blockedDuration = System.currentTimeMillis() - startTime; - assertThat(blockedDuration).isGreaterThanOrEqualTo(100); + assertThat(blockedDuration).isGreaterThanOrEqualTo(500); } @Test diff --git a/core-java-modules/core-java-concurrency-advanced-3/src/test/java/com/baeldung/workstealing/PrimeNumbersUnitTest.java b/core-java-modules/core-java-concurrency-advanced-3/src/test/java/com/baeldung/workstealing/PrimeNumbersUnitTest.java new file mode 100644 index 0000000000..66bc677345 --- /dev/null +++ b/core-java-modules/core-java-concurrency-advanced-3/src/test/java/com/baeldung/workstealing/PrimeNumbersUnitTest.java @@ -0,0 +1,101 @@ +package com.baeldung.workstealing; + +import org.junit.Test; +import org.openjdk.jmh.annotations.*; +import org.openjdk.jmh.runner.Runner; +import org.openjdk.jmh.runner.RunnerException; +import org.openjdk.jmh.runner.options.Options; +import org.openjdk.jmh.runner.options.OptionsBuilder; + +import java.util.concurrent.Executors; +import java.util.concurrent.ForkJoinPool; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.logging.Logger; + +import static org.junit.Assert.fail; + +public class PrimeNumbersUnitTest { + + private static Logger logger = Logger.getAnonymousLogger(); + + @Test + public void givenPrimesCalculated_whenUsingPoolsAndOneThread_thenOneThreadSlowest() { + Options opt = new OptionsBuilder() + .include(Benchmarker.class.getSimpleName()) + .forks(1) + .build(); + + try { + new Runner(opt).run(); + } catch (RunnerException e) { + fail(); + } + } + + @Test + public void givenNewWorkStealingPool_whenGettingPrimes_thenStealCountChanges() { + StringBuilder info = new StringBuilder(); + + for (int granularity : PrimeNumbers.GRANULARITIES) { + int parallelism = ForkJoinPool.getCommonPoolParallelism(); + ForkJoinPool pool = + (ForkJoinPool) Executors.newWorkStealingPool(parallelism); + + stealCountInfo(info, granularity, pool); + } + logger.info("\nExecutors.newWorkStealingPool ->" + info.toString()); + } + + @Test + public void givenCommonPool_whenGettingPrimes_thenStealCountChangesSlowly() { + StringBuilder info = new StringBuilder(); + + for (int granularity : PrimeNumbers.GRANULARITIES) { + ForkJoinPool pool = ForkJoinPool.commonPool(); + stealCountInfo(info, granularity, pool); + } + logger.info("\nForkJoinPool.commonPool ->" + info.toString()); + } + + private void stealCountInfo(StringBuilder info, int granularity, ForkJoinPool forkJoinPool) { + PrimeNumbers primes = new PrimeNumbers(1, 10000, granularity, new AtomicInteger(0)); + forkJoinPool.invoke(primes); + forkJoinPool.shutdown(); + + long steals = forkJoinPool.getStealCount(); + String output = "\nGranularity: [" + granularity + "], Steals: [" + steals + "]"; + info.append(output); + } + + + @BenchmarkMode(Mode.AverageTime) + @OutputTimeUnit(TimeUnit.MILLISECONDS) + @State(Scope.Benchmark) + @Fork(value = 2, warmups = 1, jvmArgs = {"-Xms2G", "-Xmx2G"}) + public static class Benchmarker { + + @Benchmark + public void singleThread() { + PrimeNumbers primes = new PrimeNumbers(10000); + primes.findPrimeNumbers(); // get prime numbers using a single thread + } + + @Benchmark + public void commonPoolBenchmark() { + PrimeNumbers primes = new PrimeNumbers(10000); + ForkJoinPool pool = ForkJoinPool.commonPool(); + pool.invoke(primes); + pool.shutdown(); + } + + @Benchmark + public void newWorkStealingPoolBenchmark() { + PrimeNumbers primes = new PrimeNumbers(10000); + int parallelism = ForkJoinPool.getCommonPoolParallelism(); + ForkJoinPool stealer = (ForkJoinPool) Executors.newWorkStealingPool(parallelism); + stealer.invoke(primes); + stealer.shutdown(); + } + } +} diff --git a/core-java-modules/core-java-concurrency-advanced/src/main/java/com/baeldung/concurrent/volatilekeyword/SharedObject.java b/core-java-modules/core-java-concurrency-advanced/src/main/java/com/baeldung/concurrent/volatilekeyword/SharedObject.java index 063c835481..78b54713b5 100644 --- a/core-java-modules/core-java-concurrency-advanced/src/main/java/com/baeldung/concurrent/volatilekeyword/SharedObject.java +++ b/core-java-modules/core-java-concurrency-advanced/src/main/java/com/baeldung/concurrent/volatilekeyword/SharedObject.java @@ -4,7 +4,7 @@ package com.baeldung.concurrent.volatilekeyword; public class SharedObject { private volatile int count=0; - void increamentCount(){ + void incrementCount(){ count++; } public int getCount(){ diff --git a/core-java-modules/core-java-concurrency-advanced/src/test/java/com/baeldung/concurrent/volatilekeyword/SharedObjectManualTest.java b/core-java-modules/core-java-concurrency-advanced/src/test/java/com/baeldung/concurrent/volatilekeyword/SharedObjectManualTest.java index 731ae887e1..45517cefd7 100644 --- a/core-java-modules/core-java-concurrency-advanced/src/test/java/com/baeldung/concurrent/volatilekeyword/SharedObjectManualTest.java +++ b/core-java-modules/core-java-concurrency-advanced/src/test/java/com/baeldung/concurrent/volatilekeyword/SharedObjectManualTest.java @@ -10,7 +10,7 @@ public class SharedObjectManualTest { public void whenOneThreadWrites_thenVolatileReadsFromMainMemory() throws InterruptedException { SharedObject sharedObject = new SharedObject(); - Thread writer = new Thread(() -> sharedObject.increamentCount()); + Thread writer = new Thread(() -> sharedObject.incrementCount()); writer.start(); Thread.sleep(100); @@ -31,11 +31,11 @@ public class SharedObjectManualTest { @Test public void whenTwoThreadWrites_thenVolatileReadsFromMainMemory() throws InterruptedException { SharedObject sharedObject = new SharedObject(); - Thread writerOne = new Thread(() -> sharedObject.increamentCount()); + Thread writerOne = new Thread(() -> sharedObject.incrementCount()); writerOne.start(); Thread.sleep(100); - Thread writerTwo = new Thread(() -> sharedObject.increamentCount()); + Thread writerTwo = new Thread(() -> sharedObject.incrementCount()); writerTwo.start(); Thread.sleep(100); diff --git a/core-java-modules/core-java-concurrency-collections/src/test/java/org/baeldung/java/streams/ThreadPoolInParallelStreamIntegrationTest.java b/core-java-modules/core-java-concurrency-collections/src/test/java/com/baeldung/java/stream/ThreadPoolInParallelStreamIntegrationTest.java similarity index 97% rename from core-java-modules/core-java-concurrency-collections/src/test/java/org/baeldung/java/streams/ThreadPoolInParallelStreamIntegrationTest.java rename to core-java-modules/core-java-concurrency-collections/src/test/java/com/baeldung/java/stream/ThreadPoolInParallelStreamIntegrationTest.java index 502672dea1..7ee849b0a2 100644 --- a/core-java-modules/core-java-concurrency-collections/src/test/java/org/baeldung/java/streams/ThreadPoolInParallelStreamIntegrationTest.java +++ b/core-java-modules/core-java-concurrency-collections/src/test/java/com/baeldung/java/stream/ThreadPoolInParallelStreamIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.java.streams; +package com.baeldung.java.stream; import org.junit.Test; diff --git a/core-java-modules/core-java-date-operations-2/README.md b/core-java-modules/core-java-date-operations-2/README.md index 478d3baf19..728162ca1a 100644 --- a/core-java-modules/core-java-date-operations-2/README.md +++ b/core-java-modules/core-java-date-operations-2/README.md @@ -6,4 +6,5 @@ This module contains articles about date operations in Java. - [Skipping Weekends While Adding Days to LocalDate in Java 8](https://www.baeldung.com/java-localdate-add-days-skip-weekends) - [Checking If Two Java Dates Are on the Same Day](https://www.baeldung.com/java-check-two-dates-on-same-day) - [Converting Java Date to OffsetDateTime](https://www.baeldung.com/java-convert-date-to-offsetdatetime) +- [How to Set the JVM Time Zone](https://www.baeldung.com/java-jvm-time-zone) - [[<-- Prev]](/core-java-modules/core-java-date-operations-1) diff --git a/core-java-modules/core-java-date-operations-2/src/test/java/com/baeldung/offsetdatetime/ConvertToOffsetDateTimeUnitTest.java b/core-java-modules/core-java-date-operations-2/src/test/java/com/baeldung/offsetdatetime/ConvertToOffsetDateTimeUnitTest.java index a6fd6c03c2..fa9ceca173 100644 --- a/core-java-modules/core-java-date-operations-2/src/test/java/com/baeldung/offsetdatetime/ConvertToOffsetDateTimeUnitTest.java +++ b/core-java-modules/core-java-date-operations-2/src/test/java/com/baeldung/offsetdatetime/ConvertToOffsetDateTimeUnitTest.java @@ -4,6 +4,7 @@ import org.junit.Test; import java.time.OffsetDateTime; import java.util.Date; +import java.util.TimeZone; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -18,12 +19,19 @@ public class ConvertToOffsetDateTimeUnitTest { @Test public void givenDate_whenHasOffset_thenConvertWithOffset() { + TimeZone prevTimezone = TimeZone.getDefault(); + TimeZone.setDefault(TimeZone.getTimeZone("UTC")); + Date date = new Date(); date.setHours(6); date.setMinutes(30); + OffsetDateTime odt = ConvertToOffsetDateTime.convert(date, 3, 30); assertEquals(10, odt.getHour()); assertEquals(0, odt.getMinute()); + + // Reset the timezone to its original value to prevent side effects + TimeZone.setDefault(prevTimezone); } } diff --git a/core-java-modules/core-java-datetime-java8-2/README.md b/core-java-modules/core-java-datetime-java8-2/README.md new file mode 100644 index 0000000000..e53d0236c2 --- /dev/null +++ b/core-java-modules/core-java-datetime-java8-2/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [Creating a LocalDate with Values in Java](https://www.baeldung.com/java-creating-localdate-with-values) diff --git a/core-java-modules/core-java-exceptions-2/README.md b/core-java-modules/core-java-exceptions-2/README.md index 3ad5189b5e..49ce897e60 100644 --- a/core-java-modules/core-java-exceptions-2/README.md +++ b/core-java-modules/core-java-exceptions-2/README.md @@ -2,4 +2,8 @@ This module contains articles about core java exceptions -### +### Relevant Articles: + +- [Is It a Bad Practice to Catch Throwable?](https://www.baeldung.com/java-catch-throwable-bad-practice) +- [Wrapping vs Rethrowing Exceptions in Java](https://www.baeldung.com/java-wrapping-vs-rethrowing-exceptions) +- [java.net.UnknownHostException: Invalid Hostname for Server](https://www.baeldung.com/java-unknownhostexception) diff --git a/core-java-modules/core-java-exceptions-2/pom.xml b/core-java-modules/core-java-exceptions-2/pom.xml index 2f7f613faf..955d7153fa 100644 --- a/core-java-modules/core-java-exceptions-2/pom.xml +++ b/core-java-modules/core-java-exceptions-2/pom.xml @@ -13,12 +13,24 @@ 0.0.1-SNAPSHOT ../../parent-java + + + + + org.assertj + assertj-core + ${assertj-core.version} + test + + http://maven.apache.org UTF-8 + + 3.10.0 diff --git a/core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/exceptions/UnknownHostExceptionHandling.java b/core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/exceptions/UnknownHostExceptionHandling.java new file mode 100644 index 0000000000..0e1c36f64c --- /dev/null +++ b/core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/exceptions/UnknownHostExceptionHandling.java @@ -0,0 +1,28 @@ +package com.baeldung.exceptions; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.UnknownHostException; + +public class UnknownHostExceptionHandling { + + public static int getResponseCode(String hostname) throws IOException { + URL url = new URL(hostname.trim()); + HttpURLConnection con = (HttpURLConnection) url.openConnection(); + int resCode = -1; + try { + resCode = con.getResponseCode(); + } catch (UnknownHostException e){ + con.disconnect(); + } + return resCode; + } + + public static int getResponseCodeUnhandled(String hostname) throws IOException { + URL url = new URL(hostname.trim()); + HttpURLConnection con = (HttpURLConnection) url.openConnection(); + int resCode = con.getResponseCode(); + return resCode; + } +} diff --git a/core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/socketexception/SocketClient.java b/core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/socketexception/SocketClient.java new file mode 100644 index 0000000000..5c3596e890 --- /dev/null +++ b/core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/socketexception/SocketClient.java @@ -0,0 +1,32 @@ +package com.baeldung.socketexception; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.net.Socket; + +public class SocketClient { + + private Socket clientSocket; + private PrintWriter out; + private BufferedReader in; + + public void startConnection(String ip, int port) throws IOException { + clientSocket = new Socket(ip, port); + out = new PrintWriter(clientSocket.getOutputStream(), true); + in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); + } + + public String sendMessage(String msg) throws IOException { + out.println(msg); + return in.readLine(); + } + + public void stopConnection() throws IOException { + in.close(); + out.close(); + clientSocket.close(); + } + +} diff --git a/core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/socketexception/SocketServer.java b/core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/socketexception/SocketServer.java new file mode 100644 index 0000000000..ad6fab738f --- /dev/null +++ b/core-java-modules/core-java-exceptions-2/src/main/java/com/baeldung/socketexception/SocketServer.java @@ -0,0 +1,45 @@ +package com.baeldung.socketexception; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.net.ServerSocket; +import java.net.Socket; + +public class SocketServer { + + private ServerSocket serverSocket; + private Socket clientSocket; + private PrintWriter out; + private BufferedReader in; + + public void start(int port) { + try { + serverSocket = new ServerSocket(port); + clientSocket = serverSocket.accept(); + out = new PrintWriter(clientSocket.getOutputStream(), true); + in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); + String msg = in.readLine(); + if (msg.contains("hi")) + out.println("hi"); + else + out.println("didn't understand"); + close(); + stop(); + } catch (IOException e) { + + } + } + + private void close() throws IOException { + in.close(); + out.close(); + } + + private void stop() throws IOException { + clientSocket.close(); + serverSocket.close(); + } + +} diff --git a/core-java-modules/core-java-exceptions-2/src/test/java/com/baeldung/exceptions/UnknownHostExceptionHandlingUnitTest.java b/core-java-modules/core-java-exceptions-2/src/test/java/com/baeldung/exceptions/UnknownHostExceptionHandlingUnitTest.java new file mode 100644 index 0000000000..d4b53e2dce --- /dev/null +++ b/core-java-modules/core-java-exceptions-2/src/test/java/com/baeldung/exceptions/UnknownHostExceptionHandlingUnitTest.java @@ -0,0 +1,15 @@ +package com.baeldung.exceptions; + +import java.io.IOException; +import java.net.UnknownHostException; + +import org.junit.Test; + +public class UnknownHostExceptionHandlingUnitTest { + + @Test(expected = UnknownHostException.class) + public void givenUnknownHost_whenResolve_thenUnknownHostException() throws IOException { + UnknownHostExceptionHandling.getResponseCodeUnhandled("http://locaihost"); + } + +} diff --git a/core-java-modules/core-java-exceptions-2/src/test/java/com/baeldung/socketexception/SocketExceptionHandlingUnitTest.java b/core-java-modules/core-java-exceptions-2/src/test/java/com/baeldung/socketexception/SocketExceptionHandlingUnitTest.java new file mode 100644 index 0000000000..08b21c6299 --- /dev/null +++ b/core-java-modules/core-java-exceptions-2/src/test/java/com/baeldung/socketexception/SocketExceptionHandlingUnitTest.java @@ -0,0 +1,31 @@ +package com.baeldung.socketexception; + +import java.io.IOException; +import java.net.SocketException; +import java.util.concurrent.Executors; + +import org.junit.BeforeClass; +import org.junit.Test; + +public class SocketExceptionHandlingUnitTest { + + @BeforeClass + public static void runServer() throws IOException, InterruptedException { + Executors.newSingleThreadExecutor() + .submit(() -> new SocketServer().start(6699)); + Thread.sleep(100); + } + + @Test + public void givenRunningServer_whenConnectToClosedSocket_thenHandleException() throws IOException { + SocketClient client = new SocketClient(); + client.startConnection("127.0.0.1", 6699); + try { + client.sendMessage("hi"); + client.sendMessage("hi again"); + } catch (SocketException e) { + client.stopConnection(); + } + } + +} diff --git a/core-java-modules/core-java-io/README.md b/core-java-modules/core-java-io/README.md index 5c4978722f..2c6c3363cb 100644 --- a/core-java-modules/core-java-io/README.md +++ b/core-java-modules/core-java-io/README.md @@ -13,4 +13,5 @@ This module contains articles about core Java input and output (IO) - [Getting a File’s Mime Type in Java](https://www.baeldung.com/java-file-mime-type) - [How to Write to a CSV File in Java](https://www.baeldung.com/java-csv) - [How to Avoid the Java FileNotFoundException When Loading Resources](https://www.baeldung.com/java-classpath-resource-cannot-be-opened) +- [Create a Directory in Java](https://www.baeldung.com/java-create-directory) - [[More -->]](/core-java-modules/core-java-io-2) diff --git a/core-java-modules/core-java-jar/pom.xml b/core-java-modules/core-java-jar/pom.xml index fe94a6d8a8..d035ee33e2 100644 --- a/core-java-modules/core-java-jar/pom.xml +++ b/core-java-modules/core-java-jar/pom.xml @@ -99,7 +99,7 @@ true libs/ - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar @@ -118,7 +118,7 @@ ${project.basedir} - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar @@ -142,7 +142,7 @@ true - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar @@ -157,7 +157,7 @@ - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar true ${project.build.finalName}-onejar.${project.packaging} @@ -179,7 +179,7 @@ spring-boot - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar diff --git a/core-java-modules/core-java-jndi/pom.xml b/core-java-modules/core-java-jndi/pom.xml index bb4299ae75..482d07a999 100644 --- a/core-java-modules/core-java-jndi/pom.xml +++ b/core-java-modules/core-java-jndi/pom.xml @@ -24,9 +24,14 @@ org.junit.jupiter junit-jupiter-api - 5.5.1 + ${jupiter.version} test + + org.junit.jupiter + junit-jupiter-engine + ${jupiter.version} + org.springframework spring-core diff --git a/core-java-modules/core-java-jndi/src/test/java/com/baeldung/jndi/exceptions/JndiExceptionsUnitTest.java b/core-java-modules/core-java-jndi/src/test/java/com/baeldung/jndi/exceptions/JndiExceptionsUnitTest.java index 434fa41252..218807568c 100644 --- a/core-java-modules/core-java-jndi/src/test/java/com/baeldung/jndi/exceptions/JndiExceptionsUnitTest.java +++ b/core-java-modules/core-java-jndi/src/test/java/com/baeldung/jndi/exceptions/JndiExceptionsUnitTest.java @@ -17,7 +17,6 @@ import org.springframework.mock.jndi.SimpleNamingContextBuilder; @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class JndiExceptionsUnitTest { - @Disabled @Test @Order(1) void givenNoContext_whenLookupObject_thenThrowNoInitialContext() { diff --git a/core-java-modules/core-java-jvm/README.md b/core-java-modules/core-java-jvm/README.md index 89600ad924..2f80ea7372 100644 --- a/core-java-modules/core-java-jvm/README.md +++ b/core-java-modules/core-java-jvm/README.md @@ -10,3 +10,5 @@ This module contains articles about working with the Java Virtual Machine (JVM). - [Class Loaders in Java](https://www.baeldung.com/java-classloaders) - [A Guide to System.exit()](https://www.baeldung.com/java-system-exit) - [Guide to System.gc()](https://www.baeldung.com/java-system-gc) +- [Runtime.getRuntime().halt() vs System.exit() in Java](https://www.baeldung.com/java-runtime-halt-vs-system-exit) +- [Adding Shutdown Hooks for JVM Applications](https://www.baeldung.com/jvm-shutdown-hooks) diff --git a/core-java-modules/core-java-lang-2/README.md b/core-java-modules/core-java-lang-2/README.md index 5d51f3cea4..a9604d1032 100644 --- a/core-java-modules/core-java-lang-2/README.md +++ b/core-java-modules/core-java-lang-2/README.md @@ -6,4 +6,7 @@ This module contains articles about core features in the Java language - [Java Primitives versus Objects](https://www.baeldung.com/java-primitives-vs-objects) - [Command-Line Arguments in Java](https://www.baeldung.com/java-command-line-arguments) - [What is a POJO Class?](https://www.baeldung.com/java-pojo-class) +- [Java Default Parameters Using Method Overloading](https://www.baeldung.com/java-default-parameters-method-overloading) +- [How to Return Multiple Values From a Java Method](https://www.baeldung.com/java-method-return-multiple-values) +- [Guide to the Java finally Keyword](https://www.baeldung.com/java-finally-keyword) - [[<-- Prev]](/core-java-modules/core-java-lang) diff --git a/core-java-modules/core-java-lang-2/pom.xml b/core-java-modules/core-java-lang-2/pom.xml index 4702b7350b..a5fb5ca859 100644 --- a/core-java-modules/core-java-lang-2/pom.xml +++ b/core-java-modules/core-java-lang-2/pom.xml @@ -15,6 +15,11 @@ + + org.apache.commons + commons-lang3 + 3.9 + commons-beanutils commons-beanutils diff --git a/core-java-modules/core-java-lang-2/src/main/java/com/baeldung/headlessmode/FlexibleApp.java b/core-java-modules/core-java-lang-2/src/main/java/com/baeldung/headlessmode/FlexibleApp.java new file mode 100644 index 0000000000..50f33d239d --- /dev/null +++ b/core-java-modules/core-java-lang-2/src/main/java/com/baeldung/headlessmode/FlexibleApp.java @@ -0,0 +1,27 @@ +package com.baeldung.headlessmode; + +import java.awt.GraphicsEnvironment; + +import javax.swing.JOptionPane; + +public class FlexibleApp { + public static final int HEADLESS = 0; + public static final int HEADED = 1; + public FlexibleApp() { + + if (GraphicsEnvironment.isHeadless()) { + System.out.println("Hello World"); + } else { + JOptionPane.showMessageDialog(null, "Hello World"); + } + + } + + public static int iAmFlexible() { + if (GraphicsEnvironment.isHeadless()) { + return HEADLESS; + } else { + return HEADED; + } + } +} diff --git a/core-java-modules/core-java-lang-2/src/main/java/com/baeldung/methodmultiplereturnvalues/MultipleReturnValuesUsingApacheCommonsPair.java b/core-java-modules/core-java-lang-2/src/main/java/com/baeldung/methodmultiplereturnvalues/MultipleReturnValuesUsingApacheCommonsPair.java new file mode 100644 index 0000000000..2f505443c2 --- /dev/null +++ b/core-java-modules/core-java-lang-2/src/main/java/com/baeldung/methodmultiplereturnvalues/MultipleReturnValuesUsingApacheCommonsPair.java @@ -0,0 +1,20 @@ +package com.baeldung.methodmultiplereturnvalues; + +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.apache.commons.lang3.tuple.Pair; + +import java.util.Comparator; +import java.util.List; + +class MultipleReturnValuesUsingApacheCommonsPair { + + static ImmutablePair getMostDistantPoint( + List coordinatesList, + Coordinates target) { + return coordinatesList.stream() + .map(coordinates -> ImmutablePair.of(coordinates, coordinates.calculateDistance(target))) + .max(Comparator.comparingDouble(Pair::getRight)) + .get(); + + } +} diff --git a/core-java-modules/core-java-lang-2/src/main/java/com/baeldung/methodmultiplereturnvalues/MultipleReturnValuesUsingApacheCommonsTriple.java b/core-java-modules/core-java-lang-2/src/main/java/com/baeldung/methodmultiplereturnvalues/MultipleReturnValuesUsingApacheCommonsTriple.java new file mode 100644 index 0000000000..4da297a51f --- /dev/null +++ b/core-java-modules/core-java-lang-2/src/main/java/com/baeldung/methodmultiplereturnvalues/MultipleReturnValuesUsingApacheCommonsTriple.java @@ -0,0 +1,23 @@ +package com.baeldung.methodmultiplereturnvalues; + +import org.apache.commons.lang3.tuple.ImmutableTriple; + +import java.util.List; +import java.util.stream.Collectors; + +class MultipleReturnValuesUsingApacheCommonsTriple { + + static ImmutableTriple getMinAvgMaxTriple( + List coordinatesList, + Coordinates target) { + + List distanceList = coordinatesList.stream() + .map(coordinates -> coordinates.calculateDistance(target)) + .collect(Collectors.toList()); + Double minDistance = distanceList.stream().mapToDouble(Double::doubleValue).min().getAsDouble(); + Double avgDistance = distanceList.stream().mapToDouble(Double::doubleValue).average().orElse(0.0D); + Double maxDistance = distanceList.stream().mapToDouble(Double::doubleValue).max().getAsDouble(); + + return ImmutableTriple.of(minDistance, avgDistance, maxDistance); + } +} diff --git a/core-java-modules/core-java-lang-2/src/test/java/com/baeldung/headlessmode/HeadlessModeUnitTest.java b/core-java-modules/core-java-lang-2/src/test/java/com/baeldung/headlessmode/HeadlessModeUnitTest.java new file mode 100644 index 0000000000..a17c1600f3 --- /dev/null +++ b/core-java-modules/core-java-lang-2/src/test/java/com/baeldung/headlessmode/HeadlessModeUnitTest.java @@ -0,0 +1,87 @@ +package com.baeldung.headlessmode; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; + +import java.awt.Canvas; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Frame; +import java.awt.GraphicsEnvironment; +import java.awt.HeadlessException; +import java.awt.image.BufferedImage; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; + +import javax.imageio.ImageIO; + +import org.junit.Assume; +import org.junit.Before; +import org.junit.Test; + +public class HeadlessModeUnitTest { + + private static final String IN_FILE = "/product.png"; + private static final String OUT_FILE = System.getProperty("java.io.tmpdir") + "/product.jpg"; + private static final String FORMAT = "jpg"; + + @Before + public void setUpHeadlessMode() { + System.setProperty("java.awt.headless", "true"); + } + + @Test + public void whenJavaAwtHeadlessSetToTrue_thenIsHeadlessReturnsTrue() { + assertThat(GraphicsEnvironment.isHeadless()).isTrue(); + } + + @Test + public void whenHeadlessMode_thenFontsWork() { + GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); + + String fonts[] = ge.getAvailableFontFamilyNames(); + + assertThat(fonts).isNotEmpty(); + + Font font = new Font(fonts[0], Font.BOLD, 14); + + FontMetrics fm = (new Canvas()).getFontMetrics(font); + + assertThat(fm.getHeight()).isGreaterThan(0); + assertThat(fm.getAscent()).isGreaterThan(0); + assertThat(fm.getDescent()).isGreaterThan(0); + } + + @Test + public void whenHeadlessMode_thenImagesWork() throws IOException { + boolean result = false; + try (InputStream inStream = HeadlessModeUnitTest.class.getResourceAsStream(IN_FILE); FileOutputStream outStream = new FileOutputStream(OUT_FILE)) { + BufferedImage inputImage = ImageIO.read(inStream); + result = ImageIO.write(inputImage, FORMAT, outStream); + } + + assertThat(result).isTrue(); + } + + @Test + public void whenHeadlessmode_thenFrameThrowsHeadlessException() { + assertThatExceptionOfType(HeadlessException.class).isThrownBy(() -> { + Frame frame = new Frame(); + frame.setVisible(true); + frame.setSize(120, 120); + }); + } + + @Test + public void whenHeadless_thenFlexibleAppAdjustsItsBehavior() { + assertThat(FlexibleApp.iAmFlexible()).isEqualTo(FlexibleApp.HEADLESS); + } + + @Test + public void whenHeaded_thenFlexibleAppAdjustsItsBehavior() { + Assume.assumeFalse(GraphicsEnvironment.isHeadless()); + assertThat(FlexibleApp.iAmFlexible()).isEqualTo(FlexibleApp.HEADED); + } + +} diff --git a/core-java-modules/core-java-lang-2/src/test/java/com/baeldung/methodmultiplereturnvalues/MultipleReturnValuesUsingApacheCommonsPairUnitTest.java b/core-java-modules/core-java-lang-2/src/test/java/com/baeldung/methodmultiplereturnvalues/MultipleReturnValuesUsingApacheCommonsPairUnitTest.java new file mode 100644 index 0000000000..ca5736fe50 --- /dev/null +++ b/core-java-modules/core-java-lang-2/src/test/java/com/baeldung/methodmultiplereturnvalues/MultipleReturnValuesUsingApacheCommonsPairUnitTest.java @@ -0,0 +1,34 @@ +package com.baeldung.methodmultiplereturnvalues; + +import org.apache.commons.lang3.tuple.ImmutablePair; +import org.junit.jupiter.api.Test; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.ArrayList; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class MultipleReturnValuesUsingApacheCommonsPairUnitTest { + + @Test + void whenUsingPair_thenMultipleFieldsAreReturned() { + + List coordinatesList = new ArrayList<>(); + coordinatesList.add(new Coordinates(1, 1, "home")); + coordinatesList.add(new Coordinates(2, 2, "school")); + coordinatesList.add(new Coordinates(3, 3, "hotel")); + + Coordinates target = new Coordinates(5, 5, "gym"); + + ImmutablePair mostDistantPoint = MultipleReturnValuesUsingApacheCommonsPair.getMostDistantPoint(coordinatesList, target); + + assertEquals(1, mostDistantPoint.getLeft().getLongitude()); + assertEquals(1, mostDistantPoint.getLeft().getLatitude()); + assertEquals("home", mostDistantPoint.getLeft().getPlaceName()); + assertEquals(5.66, BigDecimal.valueOf(mostDistantPoint.getRight()).setScale(2, RoundingMode.HALF_UP).doubleValue()); + + } + +} diff --git a/core-java-modules/core-java-lang-2/src/test/java/com/baeldung/methodmultiplereturnvalues/MultipleReturnValuesUsingApacheCommonsTripleUnitTest.java b/core-java-modules/core-java-lang-2/src/test/java/com/baeldung/methodmultiplereturnvalues/MultipleReturnValuesUsingApacheCommonsTripleUnitTest.java new file mode 100644 index 0000000000..d23036f5e6 --- /dev/null +++ b/core-java-modules/core-java-lang-2/src/test/java/com/baeldung/methodmultiplereturnvalues/MultipleReturnValuesUsingApacheCommonsTripleUnitTest.java @@ -0,0 +1,35 @@ +package com.baeldung.methodmultiplereturnvalues; + +import org.apache.commons.lang3.tuple.ImmutableTriple; +import org.junit.jupiter.api.Test; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.ArrayList; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class MultipleReturnValuesUsingApacheCommonsTripleUnitTest { + + @Test + void whenUsingTriple_thenMultipleFieldsAreReturned() { + + List coordinatesList = new ArrayList<>(); + coordinatesList.add(new Coordinates(1, 1, "home")); + coordinatesList.add(new Coordinates(2, 2, "school")); + coordinatesList.add(new Coordinates(3, 3, "hotel")); + + Coordinates target = new Coordinates(5, 5, "gym"); + + ImmutableTriple minAvgMax = MultipleReturnValuesUsingApacheCommonsTriple.getMinAvgMaxTriple(coordinatesList, target); + + assertEquals(2.83, scaleDouble(minAvgMax.left)); //min + assertEquals(4.24, scaleDouble(minAvgMax.middle)); //avg + assertEquals(5.66, scaleDouble(minAvgMax.right)); //max + } + + private double scaleDouble(Double d) { + return BigDecimal.valueOf(d).setScale(2, RoundingMode.HALF_UP).doubleValue(); + } +} diff --git a/core-java-modules/core-java-lang-2/src/test/resources/product.png b/core-java-modules/core-java-lang-2/src/test/resources/product.png new file mode 100644 index 0000000000..4edd01c0a1 Binary files /dev/null and b/core-java-modules/core-java-lang-2/src/test/resources/product.png differ diff --git a/core-java-modules/core-java-lang-math/README.md b/core-java-modules/core-java-lang-math/README.md index c72b69fcad..ec97a2ada4 100644 --- a/core-java-modules/core-java-lang-math/README.md +++ b/core-java-modules/core-java-lang-math/README.md @@ -9,3 +9,4 @@ - [The strictfp Keyword in Java](https://www.baeldung.com/java-strictfp) - [Basic Calculator in Java](https://www.baeldung.com/java-basic-calculator) - [Overflow and Underflow in Java](https://www.baeldung.com/java-overflow-underflow) +- [Obtaining a Power Set of a Set in Java](https://www.baeldung.com/java-power-set-of-a-set) diff --git a/core-java-modules/core-java-lang-oop-3/README.md b/core-java-modules/core-java-lang-oop-3/README.md index b1ca877ae0..3a0e588ad4 100644 --- a/core-java-modules/core-java-lang-oop-3/README.md +++ b/core-java-modules/core-java-lang-oop-3/README.md @@ -8,9 +8,9 @@ This module contains articles about Object-oriented programming (OOP) in Java - [Guide to the super Java Keyword](https://www.baeldung.com/java-super) - [Guide to the this Java Keyword](https://www.baeldung.com/java-this) - [Java ‘public’ Access Modifier](https://www.baeldung.com/java-public-keyword) -- [Composition, Aggregation and Association in Java](https://www.baeldung.com/java-composition-aggregation-association) +- [Composition, Aggregation, and Association in Java](https://www.baeldung.com/java-composition-aggregation-association) - [Nested Classes in Java](https://www.baeldung.com/java-nested-classes) - [A Guide to Inner Interfaces in Java](https://www.baeldung.com/java-inner-interfaces) - [Java Classes and Objects](https://www.baeldung.com/java-classes-objects) - [Java Interfaces](https://www.baeldung.com/java-interfaces) -- [[<-- Prev]](/core-java-modules/core-java-lang-oop-2)[[More -->]](/core-java-modules/core-java-lang-oop-4) \ No newline at end of file +- [[<-- Prev]](/core-java-modules/core-java-lang-oop-2)[[More -->]](/core-java-modules/core-java-lang-oop-4) diff --git a/core-java-modules/core-java-lang-oop/README.md b/core-java-modules/core-java-lang-oop/README.md index 0fb044138d..2be3d0cab1 100644 --- a/core-java-modules/core-java-lang-oop/README.md +++ b/core-java-modules/core-java-lang-oop/README.md @@ -13,4 +13,5 @@ This module contains articles about Object-oriented programming (OOP) in Java - [The “final” Keyword in Java](https://www.baeldung.com/java-final) - [Type Erasure in Java Explained](https://www.baeldung.com/java-type-erasure) - [Variable and Method Hiding in Java](https://www.baeldung.com/java-variable-method-hiding) +- [Object-Oriented-Programming Concepts in Java](https://www.baeldung.com/java-oop) - [[More -->]](/core-java-modules/core-java-lang-oop-2) diff --git a/core-java-modules/core-java-lang-syntax-2/README.md b/core-java-modules/core-java-lang-syntax-2/README.md index 1518d1ab35..940629c1dc 100644 --- a/core-java-modules/core-java-lang-syntax-2/README.md +++ b/core-java-modules/core-java-lang-syntax-2/README.md @@ -12,4 +12,5 @@ This module contains articles about Java syntax - [Variable Scope in Java](https://www.baeldung.com/java-variable-scope) - [Introduction to Basic Syntax in Java](https://www.baeldung.com/java-syntax) - [Java ‘protected’ Access Modifier](https://www.baeldung.com/java-protected-access-modifier) +- [Using the Not Operator in If Conditions in Java](https://www.baeldung.com/java-using-not-in-if-conditions) - [[<-- Prev]](/core-java-modules/core-java-lang-syntax) diff --git a/core-java-modules/core-java-lang-syntax/README.md b/core-java-modules/core-java-lang-syntax/README.md index 25f5c63dbc..bef03b98ad 100644 --- a/core-java-modules/core-java-lang-syntax/README.md +++ b/core-java-modules/core-java-lang-syntax/README.md @@ -13,4 +13,7 @@ This module contains articles about Java syntax - [Infinite Loops in Java](https://www.baeldung.com/infinite-loops-java) - [Java Switch Statement](https://www.baeldung.com/java-switch) - [Breaking Out of Nested Loops](https://www.baeldung.com/java-breaking-out-nested-loop) +- [Java Do-While Loop](https://www.baeldung.com/java-do-while-loop) +- [Java While Loop](https://www.baeldung.com/java-while-loop) +- [Java For Loop](https://www.baeldung.com/java-for-loop) - [[More -->]](/core-java-modules/core-java-lang-syntax-2) diff --git a/core-java-modules/core-java-perf/README.md b/core-java-modules/core-java-perf/README.md index d1d646ac7f..4204c2b012 100644 --- a/core-java-modules/core-java-perf/README.md +++ b/core-java-modules/core-java-perf/README.md @@ -9,3 +9,4 @@ This module contains articles about performance of Java applications - [OutOfMemoryError: GC Overhead Limit Exceeded](http://www.baeldung.com/java-gc-overhead-limit-exceeded) - [Basic Introduction to JMX](http://www.baeldung.com/java-management-extensions) - [Monitoring Java Applications with Flight Recorder](https://www.baeldung.com/java-flight-recorder-monitoring) +- [Branch Prediction in Java](https://www.baeldung.com/java-branch-prediction) diff --git a/core-java-modules/core-java-reflection/README.MD b/core-java-modules/core-java-reflection/README.MD index 840d488968..5aed62b378 100644 --- a/core-java-modules/core-java-reflection/README.MD +++ b/core-java-modules/core-java-reflection/README.MD @@ -6,4 +6,5 @@ - [Guide to Java Reflection](http://www.baeldung.com/java-reflection) - [Call Methods at Runtime Using Java Reflection](http://www.baeldung.com/java-method-reflection) - [Changing Annotation Parameters At Runtime](http://www.baeldung.com/java-reflection-change-annotation-params) -- [Dynamic Proxies in Java](http://www.baeldung.com/java-dynamic-proxies) \ No newline at end of file +- [Dynamic Proxies in Java](http://www.baeldung.com/java-dynamic-proxies) +- [What Causes java.lang.reflect.InvocationTargetException?](https://www.baeldung.com/java-lang-reflect-invocationtargetexception) diff --git a/core-java-modules/core-java-regex/README.md b/core-java-modules/core-java-regex/README.md new file mode 100644 index 0000000000..7a8f6d9293 --- /dev/null +++ b/core-java-modules/core-java-regex/README.md @@ -0,0 +1,10 @@ +========= + +## Core Java 8 Cookbooks and Examples + +### Relevant Articles: +- [An Overview of Regular Expressions Performance in Java](https://www.baeldung.com/java-regex-performance) +- [A Guide To Java Regular Expressions API](http://www.baeldung.com/regular-expressions-java) +- [Guide to Escaping Characters in Java RegExps](http://www.baeldung.com/java-regexp-escape-char) +- [Pre-compile Regex Patterns Into Pattern Objects](https://www.baeldung.com/java-regex-pre-compile) +- [Difference Between Java Matcher find() and matches()](https://www.baeldung.com/java-matcher-find-vs-matches) diff --git a/core-java-modules/core-java-text/pom.xml b/core-java-modules/core-java-regex/pom.xml similarity index 90% rename from core-java-modules/core-java-text/pom.xml rename to core-java-modules/core-java-regex/pom.xml index 442fecd298..129b6039cd 100644 --- a/core-java-modules/core-java-text/pom.xml +++ b/core-java-modules/core-java-regex/pom.xml @@ -2,9 +2,9 @@ 4.0.0 - core-java-text + core-java-regex 0.1.0-SNAPSHOT - core-java-text + core-java-regex jar @@ -28,7 +28,7 @@ - core-java-text + core-java-regex src/main/resources diff --git a/core-java-modules/core-java-text/src/main/java/com/baeldung/patternreuse/PatternPerformanceComparison.java b/core-java-modules/core-java-regex/src/main/java/com/baeldung/patternreuse/PatternPerformanceComparison.java similarity index 100% rename from core-java-modules/core-java-text/src/main/java/com/baeldung/patternreuse/PatternPerformanceComparison.java rename to core-java-modules/core-java-regex/src/main/java/com/baeldung/patternreuse/PatternPerformanceComparison.java diff --git a/core-java-modules/core-java-text/src/main/resources/logback.xml b/core-java-modules/core-java-regex/src/main/resources/logback.xml similarity index 100% rename from core-java-modules/core-java-text/src/main/resources/logback.xml rename to core-java-modules/core-java-regex/src/main/resources/logback.xml diff --git a/core-java-modules/core-java-text/src/test/java/com/baeldung/patternreuse/PatternUnitTest.java b/core-java-modules/core-java-regex/src/test/java/com/baeldung/patternreuse/PatternUnitTest.java similarity index 100% rename from core-java-modules/core-java-text/src/test/java/com/baeldung/patternreuse/PatternUnitTest.java rename to core-java-modules/core-java-regex/src/test/java/com/baeldung/patternreuse/PatternUnitTest.java diff --git a/core-java-modules/core-java/src/test/java/com/baeldung/java/regex/RegexUnitTest.java b/core-java-modules/core-java-regex/src/test/java/com/baeldung/regex/RegexUnitTest.java similarity index 99% rename from core-java-modules/core-java/src/test/java/com/baeldung/java/regex/RegexUnitTest.java rename to core-java-modules/core-java-regex/src/test/java/com/baeldung/regex/RegexUnitTest.java index e4ea55aae3..b3c3a91a09 100644 --- a/core-java-modules/core-java/src/test/java/com/baeldung/java/regex/RegexUnitTest.java +++ b/core-java-modules/core-java-regex/src/test/java/com/baeldung/regex/RegexUnitTest.java @@ -1,4 +1,4 @@ -package com.baeldung.java.regex; +package com.baeldung.regex; import static org.junit.Assert.*; diff --git a/core-java-modules/core-java-text/src/test/java/com/baeldung/regex/matcher/MatcherUnitTest.java b/core-java-modules/core-java-regex/src/test/java/com/baeldung/regex/matcher/MatcherUnitTest.java similarity index 100% rename from core-java-modules/core-java-text/src/test/java/com/baeldung/regex/matcher/MatcherUnitTest.java rename to core-java-modules/core-java-regex/src/test/java/com/baeldung/regex/matcher/MatcherUnitTest.java diff --git a/core-java-modules/core-java/src/test/java/com/baeldung/regexp/EscapingCharsUnitTest.java b/core-java-modules/core-java-regex/src/test/java/com/baeldung/regexp/EscapingCharsUnitTest.java similarity index 100% rename from core-java-modules/core-java/src/test/java/com/baeldung/regexp/EscapingCharsUnitTest.java rename to core-java-modules/core-java-regex/src/test/java/com/baeldung/regexp/EscapingCharsUnitTest.java diff --git a/core-java-modules/core-java/src/test/java/com/baeldung/regexp/optmization/OptimizedMatcherManualTest.java b/core-java-modules/core-java-regex/src/test/java/com/baeldung/regexp/optmization/OptimizedMatcherManualTest.java similarity index 100% rename from core-java-modules/core-java/src/test/java/com/baeldung/regexp/optmization/OptimizedMatcherManualTest.java rename to core-java-modules/core-java-regex/src/test/java/com/baeldung/regexp/optmization/OptimizedMatcherManualTest.java diff --git a/core-java-modules/core-java-string-algorithms-3/README.md b/core-java-modules/core-java-string-algorithms-3/README.md index 3aa31cea53..c7b17a6720 100644 --- a/core-java-modules/core-java-string-algorithms-3/README.md +++ b/core-java-modules/core-java-string-algorithms-3/README.md @@ -3,3 +3,5 @@ This module contains articles about string-related algorithms. ### Relevant Articles: + +- [Check if Two Strings are Anagrams in Java](https://www.baeldung.com/java-strings-anagrams) diff --git a/core-java-modules/core-java-string-operations-2/README.md b/core-java-modules/core-java-string-operations-2/README.md index 50f40ac2af..6e88eda122 100644 --- a/core-java-modules/core-java-string-operations-2/README.md +++ b/core-java-modules/core-java-string-operations-2/README.md @@ -8,4 +8,5 @@ This module contains articles about string operations. - [String Initialization in Java](https://www.baeldung.com/java-string-initialization) - [String toLowerCase and toUpperCase Methods in Java](https://www.baeldung.com/java-string-convert-case) - [Java String equalsIgnoreCase()](https://www.baeldung.com/java-string-equalsignorecase) +- [How to avoid String contains() Case Insensitive in Java](https://www.baeldung.com/how-to-avoid-string-contains-case-insensitive-in-java) - More articles: [[<-- prev]](../core-java-string-operations) diff --git a/core-java-modules/core-java-string-operations-2/pom.xml b/core-java-modules/core-java-string-operations-2/pom.xml index bd1a34f89f..7bb687ea2b 100644 --- a/core-java-modules/core-java-string-operations-2/pom.xml +++ b/core-java-modules/core-java-string-operations-2/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 core-java-string-operations-2 0.1.0-SNAPSHOT @@ -51,6 +52,18 @@ ${org.hamcrest.version} test + + org.openjdk.jmh + jmh-core + ${jmh-core.version} + + + + org.openjdk.jmh + jmh-generator-annprocess + ${jmh-generator.version} + + org.assertj assertj-core @@ -61,6 +74,29 @@ core-java-string-operations-2 + + + org.apache.maven.plugins + maven-shade-plugin + 3.2.0 + + + package + + shade + + + + + org.openjdk.jmh.Main + + + + + + + src/main/resources diff --git a/core-java-modules/core-java-string-operations-2/src/main/java/com/baeldung/contains/CaseInsensitiveWorkarounds.java b/core-java-modules/core-java-string-operations-2/src/main/java/com/baeldung/contains/CaseInsensitiveWorkarounds.java new file mode 100644 index 0000000000..e4089a4f53 --- /dev/null +++ b/core-java-modules/core-java-string-operations-2/src/main/java/com/baeldung/contains/CaseInsensitiveWorkarounds.java @@ -0,0 +1,78 @@ +package com.baeldung.contains; + +import java.util.concurrent.TimeUnit; +import java.util.regex.Pattern; + +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; + +/** + * Based on https://github.com/tedyoung/indexof-contains-benchmark + */ +@Fork(5) +@State(Scope.Benchmark) +@BenchmarkMode(Mode.AverageTime) +@OutputTimeUnit(TimeUnit.NANOSECONDS) +public class CaseInsensitiveWorkarounds { + + private String src; + private String dest; + private Pattern pattern; + + public static void main(String[] args) throws Exception { + org.openjdk.jmh.Main.main(args); + } + + @Setup + public void setup() { + src = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum"; + dest = "eiusmod"; + pattern = Pattern.compile(Pattern.quote(dest), Pattern.CASE_INSENSITIVE); + } + + // toLowerCase() and contains() + @Benchmark + public boolean lowerCaseContains() { + return src.toLowerCase() + .contains(dest.toLowerCase()); + } + + // matches() with Regular Expressions + @Benchmark + public boolean matchesRegularExpression() { + return src.matches("(?i).*" + dest + ".*"); + } + + public boolean processRegionMatches(String localSrc, String localDest) { + for (int i = localSrc.length() - localDest.length(); i >= 0; i--) + if (localSrc.regionMatches(true, i, localDest, 0, localDest.length())) + return true; + return false; + } + + // String regionMatches() + @Benchmark + public boolean regionMatches() { + return processRegionMatches(src, dest); + } + + // Pattern CASE_INSENSITIVE with regexp + @Benchmark + public boolean patternCaseInsensitiveRegexp() { + return pattern.matcher(src) + .find(); + } + + // Apache Commons StringUtils containsIgnoreCase + @Benchmark + public boolean apacheCommonsStringUtils() { + return org.apache.commons.lang3.StringUtils.containsIgnoreCase(src, dest); + } + +} diff --git a/core-java-modules/core-java-string-operations-2/src/test/java/com/baeldung/contains/CaseInsensitiveWorkaroundsUnitTest.java b/core-java-modules/core-java-string-operations-2/src/test/java/com/baeldung/contains/CaseInsensitiveWorkaroundsUnitTest.java new file mode 100644 index 0000000000..30b2ca9fa5 --- /dev/null +++ b/core-java-modules/core-java-string-operations-2/src/test/java/com/baeldung/contains/CaseInsensitiveWorkaroundsUnitTest.java @@ -0,0 +1,53 @@ +package com.baeldung.contains; + +import org.apache.commons.lang3.StringUtils; +import org.junit.Assert; +import org.junit.Test; + +import java.util.regex.Pattern; + +/** + * BAEL-3739: Different ways to solve the contains() case insensitive behavior. + */ +public class CaseInsensitiveWorkaroundsUnitTest { + + private String src = "Lorem ipsum dolor sit amet"; + private String dest = "lorem"; + + @Test + public void givenString_whenCallingContainsWithToLowerOrUpperCase_shouldReturnTrue() { + // Use toLowerCase to avoid case insensitive issues + Assert.assertTrue(src.toLowerCase().contains(dest.toLowerCase())); + + // Use toUpperCase to avoid case insensitive issues + Assert.assertTrue(src.toUpperCase().contains(dest.toUpperCase())); + } + + @Test + public void givenString_whenCallingStringMatches_thenReturnsTrue() { + // Use String Matches to avoid case insensitive issues + Assert.assertTrue(src.matches("(?i).*" + dest + ".*")); + } + + @Test + public void givenString_whenCallingStringRegionMatches_thenReturnsTrue() { + // Use String Region Matches to avoid case insensitive issues + CaseInsensitiveWorkarounds comparator = new CaseInsensitiveWorkarounds(); + Assert.assertTrue(comparator.processRegionMatches(src, dest)); + } + + + @Test + public void givenString_whenCallingPaternCompileMatcherFind_thenReturnsTrue() { + // Use Pattern Compile Matcher and Find to avoid case insensitive issues + Assert.assertTrue(Pattern.compile(Pattern.quote(dest), + Pattern.CASE_INSENSITIVE) .matcher(src) .find()); + } + + @Test + public void givenString_whenCallingStringUtilsContainsIgnoreCase_thenReturnsTrue() { + // Use StringUtils containsIgnoreCase to avoid case insensitive issues + Assert.assertTrue(StringUtils.containsIgnoreCase(src, dest)); + } + +} diff --git a/core-java-modules/core-java-sun/pom.xml b/core-java-modules/core-java-sun/pom.xml index 03b6646fec..c17bb6b8fc 100644 --- a/core-java-modules/core-java-sun/pom.xml +++ b/core-java-modules/core-java-sun/pom.xml @@ -49,7 +49,7 @@ true libs/ - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar diff --git a/core-java-modules/core-java-text/README.md b/core-java-modules/core-java-text/README.md deleted file mode 100644 index 5a6db4e8fd..0000000000 --- a/core-java-modules/core-java-text/README.md +++ /dev/null @@ -1,6 +0,0 @@ -========= - -## Core Java 8 Cookbooks and Examples - -### Relevant Articles: -- [An Overview of Regular Expressions Performance in Java](https://www.baeldung.com/java-regex-performance) \ No newline at end of file diff --git a/core-java-modules/core-java/README.md b/core-java-modules/core-java/README.md index c7ae946ab5..80a48226e6 100644 --- a/core-java-modules/core-java/README.md +++ b/core-java-modules/core-java/README.md @@ -2,7 +2,6 @@ ### Relevant Articles: - [Java Timer](http://www.baeldung.com/java-timer-and-timertask) -- [A Guide To Java Regular Expressions API](http://www.baeldung.com/regular-expressions-java) - [Getting Started with Java Properties](http://www.baeldung.com/java-properties) - [Introduction to Nashorn](http://www.baeldung.com/java-nashorn) - [Java Money and the Currency API](http://www.baeldung.com/java-money-and-currency) @@ -11,7 +10,6 @@ - [How to Get a Name of a Method Being Executed?](http://www.baeldung.com/java-name-of-executing-method) - [Introduction to Java Serialization](http://www.baeldung.com/java-serialization) - [Guide to UUID in Java](http://www.baeldung.com/java-uuid) -- [Guide to Escaping Characters in Java RegExps](http://www.baeldung.com/java-regexp-escape-char) - [Creating a Java Compiler Plugin](http://www.baeldung.com/java-build-compiler-plugin) - [Quick Guide to Java Stack](http://www.baeldung.com/java-stack) - [Compiling Java *.class Files with javac](http://www.baeldung.com/javac) diff --git a/core-java-modules/core-java/pom.xml b/core-java-modules/core-java/pom.xml index 2442d81559..5f60b43f79 100644 --- a/core-java-modules/core-java/pom.xml +++ b/core-java-modules/core-java/pom.xml @@ -99,7 +99,7 @@ true libs/ - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar @@ -118,7 +118,7 @@ ${project.basedir} - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar @@ -142,7 +142,7 @@ true - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar @@ -157,7 +157,7 @@ - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar true ${project.build.finalName}-onejar.${project.packaging} @@ -179,7 +179,7 @@ spring-boot - org.baeldung.executable.ExecutableMavenJar + com.baeldung.executable.ExecutableMavenJar diff --git a/core-java-modules/core-java/src/main/java/org/baeldung/executable/ExecutableMavenJar.java b/core-java-modules/core-java/src/main/java/org/baeldung/executable/ExecutableMavenJar.java deleted file mode 100644 index d291ac0d3b..0000000000 --- a/core-java-modules/core-java/src/main/java/org/baeldung/executable/ExecutableMavenJar.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.baeldung.executable; - -import javax.swing.*; - -public class ExecutableMavenJar { - - public static void main(String[] args) { - JOptionPane.showMessageDialog(null, "It worked!", "Executable Jar with Maven", 1); - } -} diff --git a/core-java-modules/core-java/src/test/java/org/baeldung/java/JavaTimerLongRunningUnitTest.java b/core-java-modules/core-java/src/test/java/com/baeldung/JavaTimerLongRunningUnitTest.java similarity index 99% rename from core-java-modules/core-java/src/test/java/org/baeldung/java/JavaTimerLongRunningUnitTest.java rename to core-java-modules/core-java/src/test/java/com/baeldung/JavaTimerLongRunningUnitTest.java index 826106a09e..7063bafb1d 100644 --- a/core-java-modules/core-java/src/test/java/org/baeldung/java/JavaTimerLongRunningUnitTest.java +++ b/core-java-modules/core-java/src/test/java/com/baeldung/JavaTimerLongRunningUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.java; +package com.baeldung; import org.junit.Test; import org.slf4j.Logger; diff --git a/core-java-modules/core-java/src/test/java/org/baeldung/java/arrays/ArraysJoinAndSplitJUnitTest.java b/core-java-modules/core-java/src/test/java/com/baeldung/arrays/ArraysJoinAndSplitJUnitTest.java similarity index 97% rename from core-java-modules/core-java/src/test/java/org/baeldung/java/arrays/ArraysJoinAndSplitJUnitTest.java rename to core-java-modules/core-java/src/test/java/com/baeldung/arrays/ArraysJoinAndSplitJUnitTest.java index 885c3bcd6c..b31a829f34 100644 --- a/core-java-modules/core-java/src/test/java/org/baeldung/java/arrays/ArraysJoinAndSplitJUnitTest.java +++ b/core-java-modules/core-java/src/test/java/com/baeldung/arrays/ArraysJoinAndSplitJUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.java.arrays; +package com.baeldung.arrays; import java.util.Arrays; diff --git a/core-java-modules/core-java/src/test/java/org/baeldung/java/rawtypes/RawTypesUnitTest.java b/core-java-modules/core-java/src/test/java/com/baeldung/rawtypes/RawTypesUnitTest.java similarity index 90% rename from core-java-modules/core-java/src/test/java/org/baeldung/java/rawtypes/RawTypesUnitTest.java rename to core-java-modules/core-java/src/test/java/com/baeldung/rawtypes/RawTypesUnitTest.java index 161c053cea..3871368c07 100644 --- a/core-java-modules/core-java/src/test/java/org/baeldung/java/rawtypes/RawTypesUnitTest.java +++ b/core-java-modules/core-java/src/test/java/com/baeldung/rawtypes/RawTypesUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.java.rawtypes; +package com.baeldung.rawtypes; import java.util.ArrayList; import java.util.List; diff --git a/core-java-modules/core-java/src/test/java/org/baeldung/java/sandbox/SandboxJavaManualTest.java b/core-java-modules/core-java/src/test/java/com/baeldung/sandbox/SandboxJavaManualTest.java similarity index 98% rename from core-java-modules/core-java/src/test/java/org/baeldung/java/sandbox/SandboxJavaManualTest.java rename to core-java-modules/core-java/src/test/java/com/baeldung/sandbox/SandboxJavaManualTest.java index 877122ce40..a58c2d4e6c 100644 --- a/core-java-modules/core-java/src/test/java/org/baeldung/java/sandbox/SandboxJavaManualTest.java +++ b/core-java-modules/core-java/src/test/java/com/baeldung/sandbox/SandboxJavaManualTest.java @@ -1,4 +1,4 @@ -package org.baeldung.java.sandbox; +package com.baeldung.sandbox; import org.junit.Test; import org.slf4j.Logger; diff --git a/core-java-modules/pom.xml b/core-java-modules/pom.xml index 904cec2815..c1a9acca6b 100644 --- a/core-java-modules/pom.xml +++ b/core-java-modules/pom.xml @@ -113,7 +113,7 @@ core-java-strings core-java-sun - core-java-text + core-java-regex diff --git a/core-kotlin-2/.gitignore b/core-kotlin-2/.gitignore deleted file mode 100644 index 0c017e8f8c..0000000000 --- a/core-kotlin-2/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -/bin/ - -#ignore gradle -.gradle/ - - -#ignore build and generated files -build/ -node/ -out/ - -#ignore installed node modules and package lock file -node_modules/ -package-lock.json diff --git a/core-kotlin-2/README.md b/core-kotlin-2/README.md deleted file mode 100644 index 5249262fa3..0000000000 --- a/core-kotlin-2/README.md +++ /dev/null @@ -1,14 +0,0 @@ -## Core Kotlin - -This module contains articles about core Kotlin. - -### Relevant articles: - -- [Kotlin Scope Functions](https://www.baeldung.com/kotlin-scope-functions) -- [Kotlin Annotations](https://www.baeldung.com/kotlin-annotations) -- [Split a List into Parts in Kotlin](https://www.baeldung.com/kotlin-split-list-into-parts) -- [String Comparison in Kotlin](https://www.baeldung.com/kotlin-string-comparison) -- [Guide to JVM Platform Annotations in Kotlin](https://www.baeldung.com/kotlin-jvm-annotations) -- [Finding an Element in a List Using Kotlin](https://www.baeldung.com/kotlin-finding-element-in-list) -- [Kotlin Ternary Conditional Operator](https://www.baeldung.com/kotlin-ternary-conditional-operator) -- More articles: [[<-- prev]](/core-kotlin) diff --git a/core-kotlin-2/build.gradle b/core-kotlin-2/build.gradle deleted file mode 100644 index 1c52172404..0000000000 --- a/core-kotlin-2/build.gradle +++ /dev/null @@ -1,58 +0,0 @@ - - -group 'com.baeldung.ktor' -version '1.0-SNAPSHOT' - - -buildscript { - ext.kotlin_version = '1.3.30' - - repositories { - mavenCentral() - } - dependencies { - - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'java' -apply plugin: 'kotlin' -apply plugin: 'application' - -mainClassName = 'APIServer.kt' - -sourceCompatibility = 1.8 -compileKotlin { kotlinOptions.jvmTarget = "1.8" } -compileTestKotlin { kotlinOptions.jvmTarget = "1.8" } - -repositories { - mavenCentral() - jcenter() - maven { url "https://dl.bintray.com/kotlin/ktor" } -} -sourceSets { - main{ - kotlin{ - srcDirs 'com/baeldung/ktor' - } - } -} - -test { - useJUnitPlatform() - testLogging { - events "passed", "skipped", "failed" - } -} - -dependencies { - implementation "ch.qos.logback:logback-classic:1.2.1" - implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}" - testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2' - testImplementation 'junit:junit:4.12' - testImplementation 'org.assertj:assertj-core:3.12.2' - testImplementation 'org.mockito:mockito-core:2.27.0' - testImplementation "org.jetbrains.kotlin:kotlin-test:${kotlin_version}" - testImplementation "org.jetbrains.kotlin:kotlin-test-junit5:${kotlin_version}" -} diff --git a/core-kotlin-2/gradle/wrapper/gradle-wrapper.jar b/core-kotlin-2/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 5c2d1cf016..0000000000 Binary files a/core-kotlin-2/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/core-kotlin-2/gradle/wrapper/gradle-wrapper.properties b/core-kotlin-2/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 5f1b1201a7..0000000000 --- a/core-kotlin-2/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-bin.zip -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/core-kotlin-2/gradlew b/core-kotlin-2/gradlew deleted file mode 100644 index b0d6d0ab5d..0000000000 --- a/core-kotlin-2/gradlew +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/env sh - -# -# Copyright 2015 the original author or authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/core-kotlin-2/gradlew.bat b/core-kotlin-2/gradlew.bat deleted file mode 100644 index 9991c50326..0000000000 --- a/core-kotlin-2/gradlew.bat +++ /dev/null @@ -1,100 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem http://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/core-kotlin-2/pom.xml b/core-kotlin-2/pom.xml deleted file mode 100644 index be2f5fa68f..0000000000 --- a/core-kotlin-2/pom.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - 4.0.0 - core-kotlin-2 - core-kotlin-2 - jar - - - com.baeldung - parent-kotlin - 1.0.0-SNAPSHOT - ../parent-kotlin - - - - - org.jetbrains.kotlin - kotlin-stdlib-jdk8 - ${kotlin.version} - - - org.junit.jupiter - junit-jupiter - ${junit.jupiter.version} - test - - - org.mockito - mockito-core - ${mockito.version} - test - - - net.bytebuddy - byte-buddy - ${byte-buddy.version} - test - - - org.assertj - assertj-core - ${assertj.version} - test - - - org.jetbrains.kotlin - kotlin-test - ${kotlin.version} - test - - - org.jetbrains.kotlin - kotlin-test-junit5 - ${kotlin.version} - test - - - - - - - org.jetbrains.kotlin - kotlin-maven-plugin - ${kotlin.version} - - - compile - compile - - compile - - - - test-compile - test-compile - - test-compile - - - - - 1.8 - - - - - - - 1.3.30 - 5.4.2 - 2.27.0 - 1.9.12 - 3.10.0 - - - diff --git a/core-kotlin-2/resources/logback.xml b/core-kotlin-2/resources/logback.xml deleted file mode 100644 index 9452207268..0000000000 --- a/core-kotlin-2/resources/logback.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - %d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - \ No newline at end of file diff --git a/core-kotlin-2/settings.gradle b/core-kotlin-2/settings.gradle deleted file mode 100644 index c91c993971..0000000000 --- a/core-kotlin-2/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -rootProject.name = 'KtorWithKotlin' - diff --git a/core-kotlin-2/src/test/resources/Kotlin.in b/core-kotlin-2/src/test/resources/Kotlin.in deleted file mode 100644 index d140d4429e..0000000000 --- a/core-kotlin-2/src/test/resources/Kotlin.in +++ /dev/null @@ -1,5 +0,0 @@ -Hello to Kotlin. Its: -1. Concise -2. Safe -3. Interoperable -4. Tool-friendly \ No newline at end of file diff --git a/core-kotlin-2/src/test/resources/Kotlin.out b/core-kotlin-2/src/test/resources/Kotlin.out deleted file mode 100644 index 63d15d2528..0000000000 --- a/core-kotlin-2/src/test/resources/Kotlin.out +++ /dev/null @@ -1,2 +0,0 @@ -Kotlin -Concise, Safe, Interoperable, Tool-friendly \ No newline at end of file diff --git a/core-kotlin-modules/core-kotlin-2/README.md b/core-kotlin-modules/core-kotlin-2/README.md new file mode 100644 index 0000000000..3e607eb61b --- /dev/null +++ b/core-kotlin-modules/core-kotlin-2/README.md @@ -0,0 +1,8 @@ +## Core Kotlin 2 + +This module contains articles about Kotlin core features. + +### Relevant articles: +- [Working with Dates in Kotlin](https://www.baeldung.com/kotlin-dates) +- [Kotlin Ternary Conditional Operator](https://www.baeldung.com/kotlin-ternary-operator) +- [[<-- Prev]](/core-kotlin-modules/core-kotlin) diff --git a/core-kotlin-modules/core-kotlin-2/pom.xml b/core-kotlin-modules/core-kotlin-2/pom.xml new file mode 100644 index 0000000000..ae6e2d175a --- /dev/null +++ b/core-kotlin-modules/core-kotlin-2/pom.xml @@ -0,0 +1,25 @@ + + + 4.0.0 + core-kotlin-2 + core-kotlin-2 + jar + + + com.baeldung.core-kotlin-modules + core-kotlin-modules + 1.0.0-SNAPSHOT + + + + + org.assertj + assertj-core + ${assertj.version} + test + + + + \ No newline at end of file diff --git a/core-kotlin/src/main/kotlin/com/baeldung/datetime/UseDuration.kt b/core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UseDuration.kt similarity index 90% rename from core-kotlin/src/main/kotlin/com/baeldung/datetime/UseDuration.kt rename to core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UseDuration.kt index 40fb161c08..922c3a1988 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/datetime/UseDuration.kt +++ b/core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UseDuration.kt @@ -1,4 +1,4 @@ -package com.baeldung.datetime +package com.baeldung.dates.datetime import java.time.Duration import java.time.LocalTime diff --git a/core-kotlin/src/main/kotlin/com/baeldung/datetime/UseLocalDate.kt b/core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UseLocalDate.kt similarity index 96% rename from core-kotlin/src/main/kotlin/com/baeldung/datetime/UseLocalDate.kt rename to core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UseLocalDate.kt index 250c071bbe..81d50a70b2 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/datetime/UseLocalDate.kt +++ b/core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UseLocalDate.kt @@ -1,4 +1,4 @@ -package com.baeldung.datetime +package com.baeldung.dates.datetime import java.time.DayOfWeek import java.time.LocalDate diff --git a/core-kotlin/src/main/kotlin/com/baeldung/datetime/UseLocalDateTime.kt b/core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UseLocalDateTime.kt similarity index 84% rename from core-kotlin/src/main/kotlin/com/baeldung/datetime/UseLocalDateTime.kt rename to core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UseLocalDateTime.kt index ab7bbfcee1..5d0eb6a911 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/datetime/UseLocalDateTime.kt +++ b/core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UseLocalDateTime.kt @@ -1,4 +1,4 @@ -package com.baeldung.datetime +package com.baeldung.dates.datetime import java.time.LocalDateTime diff --git a/core-kotlin/src/main/kotlin/com/baeldung/datetime/UseLocalTime.kt b/core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UseLocalTime.kt similarity index 92% rename from core-kotlin/src/main/kotlin/com/baeldung/datetime/UseLocalTime.kt rename to core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UseLocalTime.kt index 152515621f..24402467e8 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/datetime/UseLocalTime.kt +++ b/core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UseLocalTime.kt @@ -1,6 +1,5 @@ -package com.baeldung.datetime +package com.baeldung.dates.datetime -import java.time.LocalDateTime import java.time.LocalTime import java.time.temporal.ChronoUnit diff --git a/core-kotlin/src/main/kotlin/com/baeldung/datetime/UsePeriod.kt b/core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UsePeriod.kt similarity index 90% rename from core-kotlin/src/main/kotlin/com/baeldung/datetime/UsePeriod.kt rename to core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UsePeriod.kt index df66a3d546..d15e02eb37 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/datetime/UsePeriod.kt +++ b/core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UsePeriod.kt @@ -1,4 +1,4 @@ -package com.baeldung.datetime +package com.baeldung.dates.datetime import java.time.LocalDate import java.time.Period diff --git a/core-kotlin/src/main/kotlin/com/baeldung/datetime/UseZonedDateTime.kt b/core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UseZonedDateTime.kt similarity index 88% rename from core-kotlin/src/main/kotlin/com/baeldung/datetime/UseZonedDateTime.kt rename to core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UseZonedDateTime.kt index fd1838bd2d..e2f3a207c4 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/datetime/UseZonedDateTime.kt +++ b/core-kotlin-modules/core-kotlin-2/src/main/kotlin/com/baeldung/dates/datetime/UseZonedDateTime.kt @@ -1,4 +1,4 @@ -package com.baeldung.datetime +package com.baeldung.dates.datetime import java.time.LocalDateTime import java.time.ZoneId diff --git a/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/CreateDateUnitTest.kt b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/CreateDateUnitTest.kt similarity index 96% rename from kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/CreateDateUnitTest.kt rename to core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/CreateDateUnitTest.kt index d52a2f0f19..af5e08ea2d 100644 --- a/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/CreateDateUnitTest.kt +++ b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/CreateDateUnitTest.kt @@ -1,34 +1,34 @@ -package com.baeldung.kotlin.dates - -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Test -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class CreateDateUnitTest { - - @Test - fun givenString_whenDefaultFormat_thenCreated() { - - var date = LocalDate.parse("2018-12-31") - - assertThat(date).isEqualTo("2018-12-31") - } - - @Test - fun givenString_whenCustomFormat_thenCreated() { - - var formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy") - var date = LocalDate.parse("31-12-2018", formatter) - - assertThat(date).isEqualTo("2018-12-31") - } - - @Test - fun givenYMD_whenUsingOf_thenCreated() { - var date = LocalDate.of(2018, 12, 31) - - assertThat(date).isEqualTo("2018-12-31") - } - +package com.baeldung.kotlin.dates + +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test +import java.time.LocalDate +import java.time.format.DateTimeFormatter + +class CreateDateUnitTest { + + @Test + fun givenString_whenDefaultFormat_thenCreated() { + + var date = LocalDate.parse("2018-12-31") + + assertThat(date).isEqualTo("2018-12-31") + } + + @Test + fun givenString_whenCustomFormat_thenCreated() { + + var formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy") + var date = LocalDate.parse("31-12-2018", formatter) + + assertThat(date).isEqualTo("2018-12-31") + } + + @Test + fun givenYMD_whenUsingOf_thenCreated() { + var date = LocalDate.of(2018, 12, 31) + + assertThat(date).isEqualTo("2018-12-31") + } + } \ No newline at end of file diff --git a/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/ExtractDateUnitTest.kt b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/ExtractDateUnitTest.kt similarity index 96% rename from kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/ExtractDateUnitTest.kt rename to core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/ExtractDateUnitTest.kt index ef3841752b..d297f4b6c3 100644 --- a/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/ExtractDateUnitTest.kt +++ b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/ExtractDateUnitTest.kt @@ -1,29 +1,29 @@ -package com.baeldung.kotlin.dates - -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Test -import java.time.DayOfWeek -import java.time.LocalDate -import java.time.Month - -class ExtractDateUnitTest { - - @Test - fun givenDate_thenExtractedYMD() { - var date = LocalDate.parse("2018-12-31") - - assertThat(date.year).isEqualTo(2018) - assertThat(date.month).isEqualTo(Month.DECEMBER) - assertThat(date.dayOfMonth).isEqualTo(31) - } - - @Test - fun givenDate_thenExtractedEraDowDoy() { - var date = LocalDate.parse("2018-12-31") - - assertThat(date.era.toString()).isEqualTo("CE") - assertThat(date.dayOfWeek).isEqualTo(DayOfWeek.MONDAY) - assertThat(date.dayOfYear).isEqualTo(365) - } - +package com.baeldung.kotlin.dates + +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test +import java.time.DayOfWeek +import java.time.LocalDate +import java.time.Month + +class ExtractDateUnitTest { + + @Test + fun givenDate_thenExtractedYMD() { + var date = LocalDate.parse("2018-12-31") + + assertThat(date.year).isEqualTo(2018) + assertThat(date.month).isEqualTo(Month.DECEMBER) + assertThat(date.dayOfMonth).isEqualTo(31) + } + + @Test + fun givenDate_thenExtractedEraDowDoy() { + var date = LocalDate.parse("2018-12-31") + + assertThat(date.era.toString()).isEqualTo("CE") + assertThat(date.dayOfWeek).isEqualTo(DayOfWeek.MONDAY) + assertThat(date.dayOfYear).isEqualTo(365) + } + } \ No newline at end of file diff --git a/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/FormatDateUnitTest.kt b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/FormatDateUnitTest.kt similarity index 96% rename from kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/FormatDateUnitTest.kt rename to core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/FormatDateUnitTest.kt index 11ff6ec9f0..f7ca414aee 100644 --- a/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/FormatDateUnitTest.kt +++ b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/FormatDateUnitTest.kt @@ -1,29 +1,29 @@ -package com.baeldung.kotlin.dates - -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Test -import java.time.LocalDate -import java.time.format.DateTimeFormatter - -class FormatDateUnitTest { - - @Test - fun givenDate_whenDefaultFormat_thenFormattedString() { - - var date = LocalDate.parse("2018-12-31") - - assertThat(date.toString()).isEqualTo("2018-12-31") - } - - @Test - fun givenDate_whenCustomFormat_thenFormattedString() { - - var date = LocalDate.parse("2018-12-31") - - var formatter = DateTimeFormatter.ofPattern("dd-MMMM-yyyy") - var formattedDate = date.format(formatter) - - assertThat(formattedDate).isEqualTo("31-December-2018") - } - +package com.baeldung.kotlin.dates + +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test +import java.time.LocalDate +import java.time.format.DateTimeFormatter + +class FormatDateUnitTest { + + @Test + fun givenDate_whenDefaultFormat_thenFormattedString() { + + var date = LocalDate.parse("2018-12-31") + + assertThat(date.toString()).isEqualTo("2018-12-31") + } + + @Test + fun givenDate_whenCustomFormat_thenFormattedString() { + + var date = LocalDate.parse("2018-12-31") + + var formatter = DateTimeFormatter.ofPattern("dd-MMMM-yyyy") + var formattedDate = date.format(formatter) + + assertThat(formattedDate).isEqualTo("31-December-2018") + } + } \ No newline at end of file diff --git a/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/PeriodDateUnitTest.kt b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/PeriodDateUnitTest.kt similarity index 96% rename from kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/PeriodDateUnitTest.kt rename to core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/PeriodDateUnitTest.kt index e6b66634d3..e8ca2971e8 100644 --- a/kotlin-libraries/src/test/kotlin/com/baeldung/kotlin/dates/PeriodDateUnitTest.kt +++ b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/PeriodDateUnitTest.kt @@ -1,48 +1,48 @@ -package com.baeldung.kotlin.dates - -import org.assertj.core.api.Assertions.assertThat -import org.junit.jupiter.api.Test -import java.time.LocalDate -import java.time.Period - -class PeriodDateUnitTest { - - @Test - fun givenYMD_thenCreatePeriod() { - var period = Period.of(1, 2, 3) - - assertThat(period.toString()).isEqualTo("P1Y2M3D") - } - - @Test - fun givenPeriod_whenAdd_thenModifiedDate() { - var period = Period.of(1, 2, 3) - - var date = LocalDate.of(2018, 6, 25) - var modifiedDate = date.plus(period) - - assertThat(modifiedDate).isEqualTo("2019-08-28") - } - - @Test - fun givenPeriod_whenSubtracted_thenModifiedDate() { - var period = Period.of(1, 2, 3) - - var date = LocalDate.of(2018, 6, 25) - var modifiedDate = date.minus(period) - - assertThat(modifiedDate).isEqualTo("2017-04-22") - } - - @Test - fun givenTwoDate_whenUsingBetween_thenDiffOfDates() { - - var date1 = LocalDate.parse("2018-06-25") - var date2 = LocalDate.parse("2018-12-25") - - var period = Period.between(date1, date2) - - assertThat(period.toString()).isEqualTo("P6M") - } - +package com.baeldung.kotlin.dates + +import org.assertj.core.api.Assertions.assertThat +import org.junit.jupiter.api.Test +import java.time.LocalDate +import java.time.Period + +class PeriodDateUnitTest { + + @Test + fun givenYMD_thenCreatePeriod() { + var period = Period.of(1, 2, 3) + + assertThat(period.toString()).isEqualTo("P1Y2M3D") + } + + @Test + fun givenPeriod_whenAdd_thenModifiedDate() { + var period = Period.of(1, 2, 3) + + var date = LocalDate.of(2018, 6, 25) + var modifiedDate = date.plus(period) + + assertThat(modifiedDate).isEqualTo("2019-08-28") + } + + @Test + fun givenPeriod_whenSubtracted_thenModifiedDate() { + var period = Period.of(1, 2, 3) + + var date = LocalDate.of(2018, 6, 25) + var modifiedDate = date.minus(period) + + assertThat(modifiedDate).isEqualTo("2017-04-22") + } + + @Test + fun givenTwoDate_whenUsingBetween_thenDiffOfDates() { + + var date1 = LocalDate.parse("2018-06-25") + var date2 = LocalDate.parse("2018-12-25") + + var period = Period.between(date1, date2) + + assertThat(period.toString()).isEqualTo("P6M") + } + } \ No newline at end of file diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/datetime/UseLocalDateTimeUnitTest.kt b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/datetime/UseLocalDateTimeUnitTest.kt similarity index 92% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/datetime/UseLocalDateTimeUnitTest.kt rename to core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/datetime/UseLocalDateTimeUnitTest.kt index 8f9f8374ed..f3615a527c 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/datetime/UseLocalDateTimeUnitTest.kt +++ b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/datetime/UseLocalDateTimeUnitTest.kt @@ -1,14 +1,12 @@ package com.baeldung.kotlin.datetime -import com.baeldung.datetime.UseLocalDateTime +import com.baeldung.dates.datetime.UseLocalDateTime +import org.junit.Assert.assertEquals +import org.junit.Test import java.time.LocalDate import java.time.LocalTime import java.time.Month -import org.junit.Test - -import org.junit.Assert.assertEquals - class UseLocalDateTimeUnitTest { var useLocalDateTime = UseLocalDateTime() diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/datetime/UseLocalDateUnitTest.kt b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/datetime/UseLocalDateUnitTest.kt similarity index 97% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/datetime/UseLocalDateUnitTest.kt rename to core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/datetime/UseLocalDateUnitTest.kt index ac42e91c6c..e6353c9dab 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/datetime/UseLocalDateUnitTest.kt +++ b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/datetime/UseLocalDateUnitTest.kt @@ -1,6 +1,6 @@ package com.baeldung.kotlin.datetime -import com.baeldung.datetime.UseLocalDate +import com.baeldung.dates.datetime.UseLocalDate import org.junit.Assert import org.junit.Test import java.time.DayOfWeek diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/datetime/UseLocalTimeUnitTest.kt b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/datetime/UseLocalTimeUnitTest.kt similarity index 95% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/datetime/UseLocalTimeUnitTest.kt rename to core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/datetime/UseLocalTimeUnitTest.kt index 83fc57f850..1afe03ca48 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/datetime/UseLocalTimeUnitTest.kt +++ b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/datetime/UseLocalTimeUnitTest.kt @@ -1,10 +1,9 @@ package com.baeldung.kotlin.datetime -import com.baeldung.datetime.UseLocalTime -import java.time.LocalTime - +import com.baeldung.dates.datetime.UseLocalTime import org.junit.Assert import org.junit.Test +import java.time.LocalTime class UseLocalTimeUnitTest { diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/datetime/UsePeriodUnitTest.kt b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/datetime/UsePeriodUnitTest.kt similarity index 94% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/datetime/UsePeriodUnitTest.kt rename to core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/datetime/UsePeriodUnitTest.kt index 48be72feb0..36e1e5533a 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/datetime/UsePeriodUnitTest.kt +++ b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/datetime/UsePeriodUnitTest.kt @@ -1,11 +1,10 @@ package com.baeldung.kotlin.datetime -import com.baeldung.datetime.UsePeriod -import java.time.LocalDate -import java.time.Period - +import com.baeldung.dates.datetime.UsePeriod import org.junit.Assert import org.junit.Test +import java.time.LocalDate +import java.time.Period class UsePeriodUnitTest { diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/datetime/UseZonedDateTimeUnitTest.kt b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/datetime/UseZonedDateTimeUnitTest.kt similarity index 90% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/datetime/UseZonedDateTimeUnitTest.kt rename to core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/datetime/UseZonedDateTimeUnitTest.kt index a9d7d973ef..aa2cdaa4f3 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/datetime/UseZonedDateTimeUnitTest.kt +++ b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/dates/datetime/UseZonedDateTimeUnitTest.kt @@ -1,6 +1,6 @@ package com.baeldung.kotlin.datetime -import com.baeldung.datetime.UseZonedDateTime +import com.baeldung.dates.datetime.UseZonedDateTime import org.junit.Assert import org.junit.Test import java.time.LocalDateTime diff --git a/core-kotlin-2/src/test/kotlin/com/baeldung/sequences/SequencesTest.kt b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/sequences/SequencesTest.kt similarity index 100% rename from core-kotlin-2/src/test/kotlin/com/baeldung/sequences/SequencesTest.kt rename to core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/sequences/SequencesTest.kt diff --git a/core-kotlin-2/src/test/kotlin/com/baeldung/ternary/TernaryOperatorTest.kt b/core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/ternary/TernaryOperatorTest.kt similarity index 100% rename from core-kotlin-2/src/test/kotlin/com/baeldung/ternary/TernaryOperatorTest.kt rename to core-kotlin-modules/core-kotlin-2/src/test/kotlin/com/baeldung/ternary/TernaryOperatorTest.kt diff --git a/core-kotlin-modules/core-kotlin-lang-oop-2/README.md b/core-kotlin-modules/core-kotlin-lang-oop-2/README.md index 83d8f6f38a..27536273dc 100644 --- a/core-kotlin-modules/core-kotlin-lang-oop-2/README.md +++ b/core-kotlin-modules/core-kotlin-lang-oop-2/README.md @@ -1,4 +1,4 @@ -## Core Kotlin +## Core Kotlin Lang OOP This module contains articles about Object-Oriented Programming in Kotlin @@ -7,4 +7,4 @@ This module contains articles about Object-Oriented Programming in Kotlin - [Generics in Kotlin](https://www.baeldung.com/kotlin-generics) - [Delegated Properties in Kotlin](https://www.baeldung.com/kotlin-delegated-properties) - [Delegation Pattern in Kotlin](https://www.baeldung.com/kotlin-delegation-pattern) -- [[<-- Prev]](/core-kotlin-lang-oop) +- [[<-- Prev]](/core-kotlin-modules/core-kotlin-lang-oop) diff --git a/core-kotlin-modules/core-kotlin-lang-oop/README.md b/core-kotlin-modules/core-kotlin-lang-oop/README.md index 461635f1b5..0c1aeb7850 100644 --- a/core-kotlin-modules/core-kotlin-lang-oop/README.md +++ b/core-kotlin-modules/core-kotlin-lang-oop/README.md @@ -14,4 +14,4 @@ This module contains articles about Object-Oriented Programming in Kotlin - [Guide to Kotlin Interfaces](https://www.baeldung.com/kotlin-interfaces) - [Inline Classes in Kotlin](https://www.baeldung.com/kotlin-inline-classes) - [Static Methods Behavior in Kotlin](https://www.baeldung.com/kotlin-static-methods) -- More articles: [[next -->]](/core-kotlin-lang-oop-2) +- More articles: [[next -->]](/core-kotlin-modules/core-kotlin-lang-oop-2) diff --git a/core-kotlin-modules/core-kotlin/README.md b/core-kotlin-modules/core-kotlin/README.md new file mode 100644 index 0000000000..ae595bf18d --- /dev/null +++ b/core-kotlin-modules/core-kotlin/README.md @@ -0,0 +1,16 @@ +## Core Kotlin + +This module contains articles about Kotlin core features. + +### Relevant articles: +- [Introduction to the Kotlin Language](https://www.baeldung.com/kotlin-intro) +- [Kotlin Java Interoperability](https://www.baeldung.com/kotlin-java-interoperability) +- [Get a Random Number in Kotlin](https://www.baeldung.com/kotlin-random-number) +- [Create a Java and Kotlin Project with Maven](https://www.baeldung.com/kotlin-maven-java-project) +- [Guide to Sorting in Kotlin](https://www.baeldung.com/kotlin-sort) +- [Creational Design Patterns in Kotlin: Builder](https://www.baeldung.com/kotlin-builder-pattern) +- [Kotlin Scope Functions](https://www.baeldung.com/kotlin-scope-functions) +- [Implementing a Binary Tree in Kotlin](https://www.baeldung.com/kotlin-binary-tree) +- [JUnit 5 for Kotlin Developers](https://www.baeldung.com/junit-5-kotlin) +- [Converting Kotlin Data Class from JSON using GSON](https://www.baeldung.com/kotlin-json-convert-data-class) +- [[More --> ]](/core-kotlin-modules/core-kotlin-2) diff --git a/core-kotlin-modules/core-kotlin/pom.xml b/core-kotlin-modules/core-kotlin/pom.xml new file mode 100644 index 0000000000..6e36b7c8ef --- /dev/null +++ b/core-kotlin-modules/core-kotlin/pom.xml @@ -0,0 +1,29 @@ + + + 4.0.0 + core-kotlin + core-kotlin + jar + + + com.baeldung.core-kotlin-modules + core-kotlin-modules + 1.0.0-SNAPSHOT + + + + + org.junit.platform + junit-platform-runner + ${junit.platform.version} + test + + + + + 1.1.1 + + + \ No newline at end of file diff --git a/core-kotlin/src/main/java/com/baeldung/java/ArrayExample.java b/core-kotlin-modules/core-kotlin/src/main/java/com/baeldung/interoperability/ArrayExample.java similarity index 91% rename from core-kotlin/src/main/java/com/baeldung/java/ArrayExample.java rename to core-kotlin-modules/core-kotlin/src/main/java/com/baeldung/interoperability/ArrayExample.java index ef91db517b..93b9a3984a 100644 --- a/core-kotlin/src/main/java/com/baeldung/java/ArrayExample.java +++ b/core-kotlin-modules/core-kotlin/src/main/java/com/baeldung/interoperability/ArrayExample.java @@ -1,4 +1,4 @@ -package com.baeldung.java; +package com.baeldung.interoperability; import java.io.File; import java.io.FileReader; diff --git a/core-kotlin/src/main/java/com/baeldung/java/Customer.java b/core-kotlin-modules/core-kotlin/src/main/java/com/baeldung/interoperability/Customer.java similarity index 91% rename from core-kotlin/src/main/java/com/baeldung/java/Customer.java rename to core-kotlin-modules/core-kotlin/src/main/java/com/baeldung/interoperability/Customer.java index 0156bf7b44..4a070a0f97 100644 --- a/core-kotlin/src/main/java/com/baeldung/java/Customer.java +++ b/core-kotlin-modules/core-kotlin/src/main/java/com/baeldung/interoperability/Customer.java @@ -1,4 +1,4 @@ -package com.baeldung.java; +package com.baeldung.interoperability; public class Customer { diff --git a/core-kotlin/src/main/java/com/baeldung/java/StringUtils.java b/core-kotlin-modules/core-kotlin/src/main/java/com/baeldung/introduction/StringUtils.java similarity index 77% rename from core-kotlin/src/main/java/com/baeldung/java/StringUtils.java rename to core-kotlin-modules/core-kotlin/src/main/java/com/baeldung/introduction/StringUtils.java index f405924cdf..1c477ce039 100644 --- a/core-kotlin/src/main/java/com/baeldung/java/StringUtils.java +++ b/core-kotlin-modules/core-kotlin/src/main/java/com/baeldung/introduction/StringUtils.java @@ -1,4 +1,4 @@ -package com.baeldung.java; +package com.baeldung.introduction; public class StringUtils { public static String toUpperCase(String name) { diff --git a/core-kotlin/src/main/java/com/baeldung/mavenjavakotlin/Application.java b/core-kotlin-modules/core-kotlin/src/main/java/com/baeldung/mavenjavakotlin/Application.java similarity index 91% rename from core-kotlin/src/main/java/com/baeldung/mavenjavakotlin/Application.java rename to core-kotlin-modules/core-kotlin/src/main/java/com/baeldung/mavenjavakotlin/Application.java index e2cc0f1e01..ac933d6228 100644 --- a/core-kotlin/src/main/java/com/baeldung/mavenjavakotlin/Application.java +++ b/core-kotlin-modules/core-kotlin/src/main/java/com/baeldung/mavenjavakotlin/Application.java @@ -1,7 +1,6 @@ package com.baeldung.mavenjavakotlin; import com.baeldung.mavenjavakotlin.services.JavaService; -import com.baeldung.mavenjavakotlin.services.KotlinService; public class Application { diff --git a/core-kotlin/src/main/java/com/baeldung/mavenjavakotlin/services/JavaService.java b/core-kotlin-modules/core-kotlin/src/main/java/com/baeldung/mavenjavakotlin/services/JavaService.java similarity index 100% rename from core-kotlin/src/main/java/com/baeldung/mavenjavakotlin/services/JavaService.java rename to core-kotlin-modules/core-kotlin/src/main/java/com/baeldung/mavenjavakotlin/services/JavaService.java diff --git a/core-kotlin/src/main/kotlin/com/baeldung/datastructures/Main.kt b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/binarytree/Main.kt similarity index 93% rename from core-kotlin/src/main/kotlin/com/baeldung/datastructures/Main.kt rename to core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/binarytree/Main.kt index 4fd8aa27c7..eee10fbd8b 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/datastructures/Main.kt +++ b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/binarytree/Main.kt @@ -1,4 +1,4 @@ -package com.baeldung.datastructures +package com.baeldung.binarytree /** * Example of how to use the {@link Node} class. diff --git a/core-kotlin/src/main/kotlin/com/baeldung/datastructures/Node.kt b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/binarytree/Node.kt similarity index 99% rename from core-kotlin/src/main/kotlin/com/baeldung/datastructures/Node.kt rename to core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/binarytree/Node.kt index b81afe1e4c..77bb98f828 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/datastructures/Node.kt +++ b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/binarytree/Node.kt @@ -1,4 +1,4 @@ -package com.baeldung.datastructures +package com.baeldung.binarytree /** * An ADT for a binary search tree. diff --git a/core-kotlin/src/main/kotlin/com/baeldung/builder/FoodOrder.kt b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/builder/FoodOrder.kt similarity index 100% rename from core-kotlin/src/main/kotlin/com/baeldung/builder/FoodOrder.kt rename to core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/builder/FoodOrder.kt diff --git a/core-kotlin/src/main/kotlin/com/baeldung/builder/FoodOrderApply.kt b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/builder/FoodOrderApply.kt similarity index 100% rename from core-kotlin/src/main/kotlin/com/baeldung/builder/FoodOrderApply.kt rename to core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/builder/FoodOrderApply.kt diff --git a/core-kotlin/src/main/kotlin/com/baeldung/builder/FoodOrderNamed.kt b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/builder/FoodOrderNamed.kt similarity index 100% rename from core-kotlin/src/main/kotlin/com/baeldung/builder/FoodOrderNamed.kt rename to core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/builder/FoodOrderNamed.kt diff --git a/core-kotlin/src/main/kotlin/com/baeldung/builder/Main.kt b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/builder/Main.kt similarity index 100% rename from core-kotlin/src/main/kotlin/com/baeldung/builder/Main.kt rename to core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/builder/Main.kt diff --git a/core-kotlin/src/main/kotlin/com/baeldung/kotlin/Example1.kt b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/introduction/Example1.kt similarity index 63% rename from core-kotlin/src/main/kotlin/com/baeldung/kotlin/Example1.kt rename to core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/introduction/Example1.kt index bca1e54a6c..aacd8f7915 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/kotlin/Example1.kt +++ b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/introduction/Example1.kt @@ -1,4 +1,4 @@ -package com.baeldung.kotlin +package com.baeldung.introduction fun main(args: Array){ println("hello word") diff --git a/core-kotlin/src/main/kotlin/com/baeldung/kotlin/Item.kt b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/introduction/Item.kt similarity index 89% rename from core-kotlin/src/main/kotlin/com/baeldung/kotlin/Item.kt rename to core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/introduction/Item.kt index 36994e4994..bb91dd1eae 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/kotlin/Item.kt +++ b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/introduction/Item.kt @@ -1,4 +1,4 @@ -package com.baeldung.kotlin +package com.baeldung.introduction open class Item(val id: String, val name: String = "unknown_name") { open fun getIdOfItem(): String { diff --git a/core-kotlin/src/main/kotlin/com/baeldung/kotlin/ItemService.kt b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/introduction/ItemService.kt similarity index 98% rename from core-kotlin/src/main/kotlin/com/baeldung/kotlin/ItemService.kt rename to core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/introduction/ItemService.kt index 88de1aa9be..dfcf17df7c 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/kotlin/ItemService.kt +++ b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/introduction/ItemService.kt @@ -1,4 +1,4 @@ -package com.baeldung.kotlin +package com.baeldung.introduction import java.util.* diff --git a/core-kotlin-modules/core-kotlin-lang-oop/src/main/kotlin/com/baeldung/kotlin/ListExtension.kt b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/introduction/ListExtension.kt similarity index 90% rename from core-kotlin-modules/core-kotlin-lang-oop/src/main/kotlin/com/baeldung/kotlin/ListExtension.kt rename to core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/introduction/ListExtension.kt index da1773b7c9..e71292c60a 100644 --- a/core-kotlin-modules/core-kotlin-lang-oop/src/main/kotlin/com/baeldung/kotlin/ListExtension.kt +++ b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/introduction/ListExtension.kt @@ -1,4 +1,4 @@ -package com.baeldung.kotlin +package com.baeldung.introduction import java.util.concurrent.ThreadLocalRandom diff --git a/core-kotlin/src/main/kotlin/com/baeldung/kotlin/MathematicsOperations.kt b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/introduction/MathematicsOperations.kt similarity index 75% rename from core-kotlin/src/main/kotlin/com/baeldung/kotlin/MathematicsOperations.kt rename to core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/introduction/MathematicsOperations.kt index 924f9d2323..0ed30ed5b4 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/kotlin/MathematicsOperations.kt +++ b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/introduction/MathematicsOperations.kt @@ -1,4 +1,4 @@ -package com.baeldung.kotlin +package com.baeldung.introduction class MathematicsOperations { fun addTwoNumbers(a: Int, b: Int): Int { diff --git a/core-kotlin/src/main/kotlin/com/baeldung/mavenjavakotlin/services/KotlinService.kt b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/mavenjavakotlin/KotlinService.kt similarity index 70% rename from core-kotlin/src/main/kotlin/com/baeldung/mavenjavakotlin/services/KotlinService.kt rename to core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/mavenjavakotlin/KotlinService.kt index 114b1c88df..10d6a792d8 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/mavenjavakotlin/services/KotlinService.kt +++ b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/mavenjavakotlin/KotlinService.kt @@ -1,4 +1,4 @@ -package com.baeldung.mavenjavakotlin.services +package com.baeldung.mavenjavakotlin class KotlinService { diff --git a/core-kotlin-2/src/main/kotlin/com/baeldung/scope/ScopeFunctions.kt b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/scope/ScopeFunctions.kt similarity index 100% rename from core-kotlin-2/src/main/kotlin/com/baeldung/scope/ScopeFunctions.kt rename to core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/scope/ScopeFunctions.kt diff --git a/core-kotlin/src/main/kotlin/com/baeldung/sorting/SortingExample.kt b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/sorting/SortingExample.kt similarity index 97% rename from core-kotlin/src/main/kotlin/com/baeldung/sorting/SortingExample.kt rename to core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/sorting/SortingExample.kt index 2309d23c36..bf3163bc8f 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/sorting/SortingExample.kt +++ b/core-kotlin-modules/core-kotlin/src/main/kotlin/com/baeldung/sorting/SortingExample.kt @@ -1,7 +1,5 @@ package com.baeldung.sorting -import kotlin.comparisons.* - fun sortMethodUsage() { val sortedValues = mutableListOf(1, 2, 7, 6, 5, 6) sortedValues.sort() diff --git a/core-kotlin/src/test/java/com/baeldung/kotlin/JavaCallToKotlinUnitTest.java b/core-kotlin-modules/core-kotlin/src/test/java/com/baeldung/introduction/JavaCallToKotlinUnitTest.java similarity index 90% rename from core-kotlin/src/test/java/com/baeldung/kotlin/JavaCallToKotlinUnitTest.java rename to core-kotlin-modules/core-kotlin/src/test/java/com/baeldung/introduction/JavaCallToKotlinUnitTest.java index 370f24785a..2c386eaad3 100644 --- a/core-kotlin/src/test/java/com/baeldung/kotlin/JavaCallToKotlinUnitTest.java +++ b/core-kotlin-modules/core-kotlin/src/test/java/com/baeldung/introduction/JavaCallToKotlinUnitTest.java @@ -1,4 +1,4 @@ -package com.baeldung.kotlin; +package com.baeldung.introduction; import org.junit.Test; diff --git a/core-kotlin/src/test/kotlin/com/baeldung/datastructures/NodeTest.kt b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/binarytree/NodeTest.kt similarity index 98% rename from core-kotlin/src/test/kotlin/com/baeldung/datastructures/NodeTest.kt rename to core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/binarytree/NodeTest.kt index 8a46c5f6ec..9414d7dde9 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/datastructures/NodeTest.kt +++ b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/binarytree/NodeTest.kt @@ -1,7 +1,8 @@ -package com.baeldung.datastructures +package com.baeldung.binarytree import org.junit.After -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull import org.junit.Before import org.junit.Test diff --git a/core-kotlin/src/test/kotlin/com/baeldung/builder/BuilderPatternUnitTest.kt b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/builder/BuilderPatternUnitTest.kt similarity index 100% rename from core-kotlin/src/test/kotlin/com/baeldung/builder/BuilderPatternUnitTest.kt rename to core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/builder/BuilderPatternUnitTest.kt diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/gson/GsonUnitTest.kt b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/gson/GsonUnitTest.kt similarity index 87% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/gson/GsonUnitTest.kt rename to core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/gson/GsonUnitTest.kt index bdf44d3b49..9159be96be 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/gson/GsonUnitTest.kt +++ b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/gson/GsonUnitTest.kt @@ -1,4 +1,4 @@ -package com.baeldung.kotlin.gson +package com.baeldung.gson import com.google.gson.Gson @@ -11,7 +11,7 @@ class GsonUnitTest { @Test fun givenObject_thenGetJSONString() { - var jsonString = gson.toJson(TestModel(1,"Test")) + var jsonString = gson.toJson(TestModel(1, "Test")) Assert.assertEquals(jsonString, "{\"id\":1,\"description\":\"Test\"}") } diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/ArrayTest.kt b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/interoperability/ArrayTest.kt similarity index 82% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/ArrayTest.kt rename to core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/interoperability/ArrayTest.kt index f7d1c53b13..8e9467f92a 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/ArrayTest.kt +++ b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/interoperability/ArrayTest.kt @@ -1,7 +1,5 @@ -package com.baeldung.kotlin +package com.baeldung.interoperability -import com.baeldung.java.ArrayExample -import com.baeldung.java.Customer import org.junit.Test import kotlin.test.assertEquals @@ -29,7 +27,7 @@ class ArrayTest { val constructors = instance.constructors assertEquals(constructors.size, 1) - assertEquals(constructors[0].name, "com.baeldung.java.Customer") + assertEquals(constructors[0].name, "com.baeldung.interoperability.Customer") } fun makeReadFile() { diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/CustomerTest.kt b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/interoperability/CustomerTest.kt similarity index 88% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/CustomerTest.kt rename to core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/interoperability/CustomerTest.kt index 6395dfcfed..c1b09cd0c1 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/CustomerTest.kt +++ b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/interoperability/CustomerTest.kt @@ -1,6 +1,5 @@ -package com.baeldung.kotlin +package com.baeldung.interoperability -import com.baeldung.java.Customer import org.junit.Test import kotlin.test.assertEquals diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/ItemServiceTest.kt b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/introduction/ItemServiceTest.kt similarity index 92% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/ItemServiceTest.kt rename to core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/introduction/ItemServiceTest.kt index 3d730b1283..2ba14a7462 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/ItemServiceTest.kt +++ b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/introduction/ItemServiceTest.kt @@ -1,9 +1,10 @@ -package com.baeldung.kotlin +package com.baeldung.introduction import org.junit.Test import kotlin.test.assertNotNull class ItemServiceTest { + @Test fun givenItemId_whenGetForOptionalItem_shouldMakeActionOnNonNullValue() { //given diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/KotlinJavaInteroperabilityTest.kt b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/introduction/KotlinJavaInteroperabilityTest.kt similarity index 84% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/KotlinJavaInteroperabilityTest.kt rename to core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/introduction/KotlinJavaInteroperabilityTest.kt index 91ccaabf6f..5dddf9bfc9 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/KotlinJavaInteroperabilityTest.kt +++ b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/introduction/KotlinJavaInteroperabilityTest.kt @@ -1,6 +1,5 @@ -package com.baeldung.kotlin +package com.baeldung.introduction -import com.baeldung.java.StringUtils import org.junit.Test import kotlin.test.assertEquals diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/LambdaTest.kt b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/introduction/LambdaTest.kt similarity index 91% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/LambdaTest.kt rename to core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/introduction/LambdaTest.kt index 34217336a0..5e5166074e 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/LambdaTest.kt +++ b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/introduction/LambdaTest.kt @@ -1,10 +1,11 @@ -package com.baeldung.kotlin +package com.baeldung.introduction import org.junit.Test import kotlin.test.assertEquals class LambdaTest { + @Test fun givenListOfNumber_whenDoingOperationsUsingLambda_shouldReturnProperResult() { //given diff --git a/core-kotlin-modules/core-kotlin-lang-oop/src/test/kotlin/com/baeldung/kotlin/ListExtensionTest.kt b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/introduction/ListExtensionTest.kt similarity index 79% rename from core-kotlin-modules/core-kotlin-lang-oop/src/test/kotlin/com/baeldung/kotlin/ListExtensionTest.kt rename to core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/introduction/ListExtensionTest.kt index 7a496e7437..38f244297b 100644 --- a/core-kotlin-modules/core-kotlin-lang-oop/src/test/kotlin/com/baeldung/kotlin/ListExtensionTest.kt +++ b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/introduction/ListExtensionTest.kt @@ -1,12 +1,12 @@ -package com.baeldung.kotlin +package com.baeldung.introduction -import com.baeldung.kotlin.ListExtension import org.junit.Test import kotlin.test.assertTrue class ListExtensionTest { + @Test - fun givenList_whenExecuteExtensionFunctionOnList_shouldReturnRandomElementOfList(){ + fun givenList_whenExecuteExtensionFunctionOnList_shouldReturnRandomElementOfList() { //given val elements = listOf("a", "b", "c") diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/Calculator.kt b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/junit5/Calculator.kt similarity index 91% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/Calculator.kt rename to core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/junit5/Calculator.kt index 1b61c05887..9f6e3ab2b9 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/Calculator.kt +++ b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/junit5/Calculator.kt @@ -1,4 +1,4 @@ -package com.baeldung.kotlin.junit5 +package com.baeldung.junit5 class Calculator { fun add(a: Int, b: Int) = a + b diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/CalculatorTest5.kt b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/junit5/CalculatorUnitTest.kt similarity index 97% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/CalculatorTest5.kt rename to core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/junit5/CalculatorUnitTest.kt index daaedca5a3..07cab3b76e 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/CalculatorTest5.kt +++ b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/junit5/CalculatorUnitTest.kt @@ -1,9 +1,9 @@ -package com.baeldung.kotlin.junit5 +package com.baeldung.junit5 import org.junit.jupiter.api.* import org.junit.jupiter.api.function.Executable -class CalculatorTest5 { +class CalculatorUnitTest { private val calculator = Calculator() @Test diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/DivideByZeroException.kt b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/junit5/DivideByZeroException.kt similarity index 64% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/DivideByZeroException.kt rename to core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/junit5/DivideByZeroException.kt index 60bc4e2944..5675367fd5 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/DivideByZeroException.kt +++ b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/junit5/DivideByZeroException.kt @@ -1,3 +1,3 @@ -package com.baeldung.kotlin.junit5 +package com.baeldung.junit5 class DivideByZeroException(val numerator: Int) : Exception() diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/SimpleTest5.kt b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/junit5/SimpleUnitTest.kt similarity index 88% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/SimpleTest5.kt rename to core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/junit5/SimpleUnitTest.kt index 15ff201430..e3fe998efd 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/SimpleTest5.kt +++ b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/junit5/SimpleUnitTest.kt @@ -1,10 +1,10 @@ -package com.baeldung.kotlin.junit5 +package com.baeldung.junit5 import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test -class SimpleTest5 { +class SimpleUnitTest { @Test fun `isEmpty should return true for empty lists`() { diff --git a/core-kotlin/src/test/kotlin/com/baeldung/random/RandomNumberTest.kt b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/random/RandomNumberTest.kt similarity index 100% rename from core-kotlin/src/test/kotlin/com/baeldung/random/RandomNumberTest.kt rename to core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/random/RandomNumberTest.kt diff --git a/core-kotlin-2/src/test/kotlin/com/baeldung/scope/ScopeFunctionsUnitTest.kt b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/scope/ScopeFunctionsUnitTest.kt similarity index 100% rename from core-kotlin-2/src/test/kotlin/com/baeldung/scope/ScopeFunctionsUnitTest.kt rename to core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/scope/ScopeFunctionsUnitTest.kt diff --git a/core-kotlin/src/test/kotlin/com/baeldung/sorting/SortingExampleKtTest.kt b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/sorting/SortingExampleKtTest.kt similarity index 86% rename from core-kotlin/src/test/kotlin/com/baeldung/sorting/SortingExampleKtTest.kt rename to core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/sorting/SortingExampleKtTest.kt index 8a94e29c2f..7ac0efa4ef 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/sorting/SortingExampleKtTest.kt +++ b/core-kotlin-modules/core-kotlin/src/test/kotlin/com/baeldung/sorting/SortingExampleKtTest.kt @@ -1,9 +1,8 @@ package com.baeldung.sorting +import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test -import org.junit.jupiter.api.Assertions.* - class SortingExampleKtTest { @Test diff --git a/core-kotlin-modules/pom.xml b/core-kotlin-modules/pom.xml index e49b5fb85d..24bdc189be 100644 --- a/core-kotlin-modules/pom.xml +++ b/core-kotlin-modules/pom.xml @@ -15,6 +15,8 @@ + core-kotlin + core-kotlin-2 core-kotlin-advanced core-kotlin-annotations core-kotlin-collections diff --git a/core-kotlin/.gitignore b/core-kotlin/.gitignore deleted file mode 100644 index 0c017e8f8c..0000000000 --- a/core-kotlin/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -/bin/ - -#ignore gradle -.gradle/ - - -#ignore build and generated files -build/ -node/ -out/ - -#ignore installed node modules and package lock file -node_modules/ -package-lock.json diff --git a/core-kotlin/README.md b/core-kotlin/README.md deleted file mode 100644 index 89e1b7287e..0000000000 --- a/core-kotlin/README.md +++ /dev/null @@ -1,32 +0,0 @@ -## Core Kotlin - -This module contains articles about core Kotlin. - -### Relevant articles: - -- [Introduction to the Kotlin Language](https://www.baeldung.com/kotlin) -- [Kotlin Java Interoperability](https://www.baeldung.com/kotlin-java-interoperability) -- [Generics in Kotlin](https://www.baeldung.com/kotlin-generics) -- [Data Classes in Kotlin](https://www.baeldung.com/kotlin-data-classes) -- [Delegated Properties in Kotlin](https://www.baeldung.com/kotlin-delegated-properties) -- [Sealed Classes in Kotlin](https://www.baeldung.com/kotlin-sealed-classes) -- [JUnit 5 for Kotlin Developers](https://www.baeldung.com/junit-5-kotlin) -- [Extension Methods in Kotlin](https://www.baeldung.com/kotlin-extension-methods) -- [Objects in Kotlin](https://www.baeldung.com/kotlin-objects) -- [Working with Enums in Kotlin](https://www.baeldung.com/kotlin-enum) -- [Create a Java and Kotlin Project with Maven](https://www.baeldung.com/kotlin-maven-java-project) -- [Get a Random Number in Kotlin](https://www.baeldung.com/kotlin-random-number) -- [Kotlin Constructors](https://www.baeldung.com/kotlin-constructors) -- [Creational Design Patterns in Kotlin: Builder](https://www.baeldung.com/kotlin-builder-pattern) -- [Kotlin Nested and Inner Classes](https://www.baeldung.com/kotlin-inner-classes) -- [Fuel HTTP Library with Kotlin](https://www.baeldung.com/kotlin-fuel) -- [Introduction to Kovenant Library for Kotlin](https://www.baeldung.com/kotlin-kovenant) -- [Converting Kotlin Data Class from JSON using GSON](https://www.baeldung.com/kotlin-json-convert-data-class) -- [Guide to Kotlin Interfaces](https://www.baeldung.com/kotlin-interfaces) -- [Guide to Sorting in Kotlin](https://www.baeldung.com/kotlin-sort) -- [Dependency Injection for Kotlin with Injekt](https://www.baeldung.com/kotlin-dependency-injection-with-injekt) -- [Implementing a Binary Tree in Kotlin](https://www.baeldung.com/kotlin-binary-tree) -- [Inline Classes in Kotlin](https://www.baeldung.com/kotlin-inline-classes) -- [Static Methods Behavior in Kotlin](https://www.baeldung.com/kotlin-static-methods) -- [Delegation Pattern in Kotlin](https://www.baeldung.com/kotlin-delegation-pattern) -- More articles: [[next -->]](/core-kotlin-2) diff --git a/core-kotlin/build.gradle b/core-kotlin/build.gradle deleted file mode 100755 index 2b6527fca7..0000000000 --- a/core-kotlin/build.gradle +++ /dev/null @@ -1,48 +0,0 @@ - - -group 'com.baeldung.ktor' -version '1.0-SNAPSHOT' - - -buildscript { - ext.kotlin_version = '1.2.41' - - repositories { - mavenCentral() - } - dependencies { - - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -apply plugin: 'java' -apply plugin: 'kotlin' -apply plugin: 'application' - -mainClassName = 'APIServer.kt' - -sourceCompatibility = 1.8 -compileKotlin { kotlinOptions.jvmTarget = "1.8" } -compileTestKotlin { kotlinOptions.jvmTarget = "1.8" } - -kotlin { experimental { coroutines "enable" } } - -repositories { - mavenCentral() - jcenter() - maven { url "https://dl.bintray.com/kotlin/ktor" } -} -sourceSets { - main{ - kotlin{ - srcDirs 'com/baeldung/ktor' - } - } - -} - -dependencies { - compile "ch.qos.logback:logback-classic:1.2.1" - testCompile group: 'junit', name: 'junit', version: '4.12' -} \ No newline at end of file diff --git a/core-kotlin/gradle/wrapper/gradle-wrapper.jar b/core-kotlin/gradle/wrapper/gradle-wrapper.jar deleted file mode 100755 index 01b8bf6b1f..0000000000 Binary files a/core-kotlin/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/core-kotlin/gradle/wrapper/gradle-wrapper.properties b/core-kotlin/gradle/wrapper/gradle-wrapper.properties deleted file mode 100755 index 0b83b5a3e3..0000000000 --- a/core-kotlin/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip diff --git a/core-kotlin/gradlew b/core-kotlin/gradlew deleted file mode 100755 index cccdd3d517..0000000000 --- a/core-kotlin/gradlew +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env sh - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi - -exec "$JAVACMD" "$@" diff --git a/core-kotlin/gradlew.bat b/core-kotlin/gradlew.bat deleted file mode 100755 index e95643d6a2..0000000000 --- a/core-kotlin/gradlew.bat +++ /dev/null @@ -1,84 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/core-kotlin/pom.xml b/core-kotlin/pom.xml deleted file mode 100644 index 5fe8a47f62..0000000000 --- a/core-kotlin/pom.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - 4.0.0 - core-kotlin - core-kotlin - jar - - - com.baeldung - parent-kotlin - 1.0.0-SNAPSHOT - ../parent-kotlin - - - - - org.apache.commons - commons-lang3 - ${commons-lang3.version} - - - org.junit.platform - junit-platform-runner - ${junit.platform.version} - test - - - org.assertj - assertj-core - ${assertj.version} - test - - - com.h2database - h2 - ${h2.version} - - - com.github.kittinunf.fuel - fuel - ${fuel.version} - - - com.github.kittinunf.fuel - fuel-gson - ${fuel.version} - - - com.github.kittinunf.fuel - fuel-rxjava - ${fuel.version} - - - com.github.kittinunf.fuel - fuel-coroutines - ${fuel.version} - - - nl.komponents.kovenant - kovenant - ${kovenant.version} - pom - - - uy.kohesive.injekt - injekt-core - ${injekt-core.version} - - - - - 1.1.1 - 5.2.0 - 3.10.0 - 1.15.0 - 3.3.0 - 1.16.1 - - - diff --git a/core-kotlin/resources/logback.xml b/core-kotlin/resources/logback.xml deleted file mode 100755 index 274cdcdb02..0000000000 --- a/core-kotlin/resources/logback.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - %d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - \ No newline at end of file diff --git a/core-kotlin/settings.gradle b/core-kotlin/settings.gradle deleted file mode 100755 index 13bbce9583..0000000000 --- a/core-kotlin/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -rootProject.name = 'KtorWithKotlin' - diff --git a/data-structures/README.md b/data-structures/README.md index 7eeda7c64f..e8fb374f6c 100644 --- a/data-structures/README.md +++ b/data-structures/README.md @@ -6,3 +6,6 @@ This module contains articles about data structures in Java - [The Trie Data Structure in Java](https://www.baeldung.com/trie-java) - [Implementing a Binary Tree in Java](https://www.baeldung.com/java-binary-tree) +- [Circular Linked List Java Implementation](https://www.baeldung.com/java-circular-linked-list) +- [How to Print a Binary Tree Diagram](https://www.baeldung.com/java-print-binary-tree-diagram) +- [Introduction to Big Queue](https://www.baeldung.com/java-big-queue) diff --git a/data-structures/pom.xml b/data-structures/pom.xml index f4a8ea3a14..4468f3d21f 100644 --- a/data-structures/pom.xml +++ b/data-structures/pom.xml @@ -23,7 +23,7 @@ com.leansoft bigqueue - 0.7.0 + ${bigqueue.version} @@ -39,4 +39,8 @@ + + 0.7.0 + + diff --git a/ddd/README.md b/ddd/README.md index daeb663e3b..cd7cf90d61 100644 --- a/ddd/README.md +++ b/ddd/README.md @@ -7,3 +7,4 @@ This module contains articles about Domain-driven Design (DDD) - [Persisting DDD Aggregates](https://www.baeldung.com/spring-persisting-ddd-aggregates) - [Double Dispatch in DDD](https://www.baeldung.com/ddd-double-dispatch) - [DDD Aggregates and @DomainEvents](https://www.baeldung.com/spring-data-ddd) +- [Organizing Layers Using Hexagonal Architecture, DDD, and Spring](https://www.baeldung.com/hexagonal-architecture-ddd-spring) diff --git a/dropwizard/README.md b/dropwizard/README.md new file mode 100644 index 0000000000..76311ebbb3 --- /dev/null +++ b/dropwizard/README.md @@ -0,0 +1,5 @@ +# Dropwizard + +### Relevant Articles: + +- [Introduction to Dropwizard](https://www.baeldung.com/java-dropwizard) diff --git a/dropwizard/pom.xml b/dropwizard/pom.xml new file mode 100644 index 0000000000..ddc9aa1949 --- /dev/null +++ b/dropwizard/pom.xml @@ -0,0 +1,68 @@ + + + 4.0.0 + dropwizard + 0.0.1-SNAPSHOT + dropwizard + jar + + + com.baeldung + parent-modules + 1.0.0-SNAPSHOT + + + + + io.dropwizard + dropwizard-core + ${dropwizard.version} + + + + + + + org.apache.maven.plugins + maven-shade-plugin + + true + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + package + + shade + + + + + + com.baeldung.dropwizard.introduction.IntroductionApplication + + + + + + + + + + + 2.0.0 + + + \ No newline at end of file diff --git a/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/IntroductionApplication.java b/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/IntroductionApplication.java new file mode 100644 index 0000000000..d9af590017 --- /dev/null +++ b/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/IntroductionApplication.java @@ -0,0 +1,51 @@ +package com.baeldung.dropwizard.introduction; + +import com.baeldung.dropwizard.introduction.configuration.ApplicationHealthCheck; +import com.baeldung.dropwizard.introduction.configuration.BasicConfiguration; +import com.baeldung.dropwizard.introduction.domain.Brand; +import com.baeldung.dropwizard.introduction.repository.BrandRepository; +import com.baeldung.dropwizard.introduction.resource.BrandResource; +import io.dropwizard.Application; +import io.dropwizard.configuration.ResourceConfigurationSourceProvider; +import io.dropwizard.setup.Bootstrap; +import io.dropwizard.setup.Environment; + +import java.util.ArrayList; +import java.util.List; + +public class IntroductionApplication extends Application { + + public static void main(final String[] args) throws Exception { + new IntroductionApplication().run("server", "introduction-config.yml"); + } + + @Override + public void run(final BasicConfiguration basicConfiguration, final Environment environment) { + final int defaultSize = basicConfiguration.getDefaultSize(); + final BrandRepository brandRepository = new BrandRepository(initBrands()); + final BrandResource brandResource = new BrandResource(defaultSize, brandRepository); + environment + .jersey() + .register(brandResource); + + final ApplicationHealthCheck healthCheck = new ApplicationHealthCheck(); + environment + .healthChecks() + .register("application", healthCheck); + } + + @Override + public void initialize(final Bootstrap bootstrap) { + bootstrap.setConfigurationSourceProvider(new ResourceConfigurationSourceProvider()); + super.initialize(bootstrap); + } + + private List initBrands() { + final List brands = new ArrayList<>(); + brands.add(new Brand(1L, "Brand1")); + brands.add(new Brand(2L, "Brand2")); + brands.add(new Brand(3L, "Brand3")); + + return brands; + } +} diff --git a/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/configuration/ApplicationHealthCheck.java b/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/configuration/ApplicationHealthCheck.java new file mode 100644 index 0000000000..bf4b710937 --- /dev/null +++ b/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/configuration/ApplicationHealthCheck.java @@ -0,0 +1,10 @@ +package com.baeldung.dropwizard.introduction.configuration; + +import com.codahale.metrics.health.HealthCheck; + +public class ApplicationHealthCheck extends HealthCheck { + @Override + protected Result check() throws Exception { + return Result.healthy(); + } +} diff --git a/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/configuration/BasicConfiguration.java b/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/configuration/BasicConfiguration.java new file mode 100644 index 0000000000..5098f89d62 --- /dev/null +++ b/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/configuration/BasicConfiguration.java @@ -0,0 +1,20 @@ +package com.baeldung.dropwizard.introduction.configuration; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.dropwizard.Configuration; + +import javax.validation.constraints.NotNull; + +public class BasicConfiguration extends Configuration { + @NotNull private final int defaultSize; + + @JsonCreator + public BasicConfiguration(@JsonProperty("defaultSize") final int defaultSize) { + this.defaultSize = defaultSize; + } + + public int getDefaultSize() { + return defaultSize; + } +} diff --git a/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/domain/Brand.java b/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/domain/Brand.java new file mode 100644 index 0000000000..c83f67bb6e --- /dev/null +++ b/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/domain/Brand.java @@ -0,0 +1,19 @@ +package com.baeldung.dropwizard.introduction.domain; + +public class Brand { + private final Long id; + private final String name; + + public Brand(final Long id, final String name) { + this.id = id; + this.name = name; + } + + public Long getId() { + return id; + } + + public String getName() { + return name; + } +} diff --git a/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/repository/BrandRepository.java b/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/repository/BrandRepository.java new file mode 100644 index 0000000000..3f187df3de --- /dev/null +++ b/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/repository/BrandRepository.java @@ -0,0 +1,32 @@ +package com.baeldung.dropwizard.introduction.repository; + +import com.baeldung.dropwizard.introduction.domain.Brand; +import com.google.common.collect.ImmutableList; + +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + +public class BrandRepository { + private final List brands; + + public BrandRepository(final List brands) { + this.brands = ImmutableList.copyOf(brands); + } + + public List findAll(final int size) { + return brands + .stream() + .limit(size) + .collect(Collectors.toList()); + } + + public Optional findById(final Long id) { + return brands + .stream() + .filter(brand -> brand + .getId() + .equals(id)) + .findFirst(); + } +} diff --git a/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/resource/BrandResource.java b/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/resource/BrandResource.java new file mode 100644 index 0000000000..5f97e26faf --- /dev/null +++ b/dropwizard/src/main/java/com/baeldung/dropwizard/introduction/resource/BrandResource.java @@ -0,0 +1,35 @@ +package com.baeldung.dropwizard.introduction.resource; + +import com.baeldung.dropwizard.introduction.domain.Brand; +import com.baeldung.dropwizard.introduction.repository.BrandRepository; + +import javax.ws.rs.*; +import javax.ws.rs.core.MediaType; +import java.util.List; +import java.util.Optional; + +@Path("/brands") +@Produces(MediaType.APPLICATION_JSON) +public class BrandResource { + private final int defaultSize; + private final BrandRepository brandRepository; + + public BrandResource(final int defaultSize, final BrandRepository brandRepository) { + this.defaultSize = defaultSize; + this.brandRepository = brandRepository; + + } + + @GET + public List getBrands(@QueryParam("size") final Optional size) { + return brandRepository.findAll(size.orElse(defaultSize)); + } + + @GET + @Path("/{id}") + public Brand getById(@PathParam("id") final Long id) { + return brandRepository + .findById(id) + .orElseThrow(RuntimeException::new); + } +} diff --git a/dropwizard/src/main/resources/introduction-config.yml b/dropwizard/src/main/resources/introduction-config.yml new file mode 100644 index 0000000000..02ff36de05 --- /dev/null +++ b/dropwizard/src/main/resources/introduction-config.yml @@ -0,0 +1 @@ +defaultSize: 5 \ No newline at end of file diff --git a/dropwizard/src/test/java/com/baeldung/dropwizard/introduction/repository/BrandRepositoryUnitTest.java b/dropwizard/src/test/java/com/baeldung/dropwizard/introduction/repository/BrandRepositoryUnitTest.java new file mode 100644 index 0000000000..b996883ee5 --- /dev/null +++ b/dropwizard/src/test/java/com/baeldung/dropwizard/introduction/repository/BrandRepositoryUnitTest.java @@ -0,0 +1,47 @@ +package com.baeldung.dropwizard.introduction.repository; + +import com.baeldung.dropwizard.introduction.domain.Brand; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +class BrandRepositoryUnitTest { + + private static final Brand BRAND_1 = new Brand(1L, "Brand1"); + + private final BrandRepository brandRepository = new BrandRepository(getBrands()); + + @Test + void givenSize_whenFindingAll_thenReturnList() { + final int size = 2; + + final List result = brandRepository.findAll(size); + + assertEquals(size, result.size()); + } + + @Test + void givenId_whenFindingById_thenReturnFoundBrand() { + final Long id = BRAND_1.getId(); + + final Optional result = brandRepository.findById(id); + + Assertions.assertTrue(result.isPresent()); + assertEquals(BRAND_1, result.get()); + } + + + private List getBrands() { + final List brands = new ArrayList<>(); + brands.add(BRAND_1); + brands.add(new Brand(2L, "Brand2")); + brands.add(new Brand(3L, "Brand3")); + + return brands; + } +} \ No newline at end of file diff --git a/ethereum/pom.xml b/ethereum/pom.xml index da0a7ebda8..1449d9d95c 100644 --- a/ethereum/pom.xml +++ b/ethereum/pom.xml @@ -177,8 +177,8 @@ maven-compiler-plugin ${compiler.plugin.version} - ${source.version} - ${target.version} + ${java.version} + ${java.version} @@ -189,7 +189,7 @@ org.apache.maven.plugins maven-war-plugin - 3.0.0 + ${maven-war-plugin.version} src/main/webapp false @@ -216,7 +216,5 @@ 1.7.25 2.0.4.RELEASE 3.1 - 1.8 - 1.8 diff --git a/graphql/graphql-java/pom.xml b/graphql/graphql-java/pom.xml index 3613d89ae7..793a02458a 100644 --- a/graphql/graphql-java/pom.xml +++ b/graphql/graphql-java/pom.xml @@ -11,6 +11,7 @@ com.baeldung parent-modules 1.0.0-SNAPSHOT + ../.. diff --git a/image-processing/pom.xml b/image-processing/pom.xml index 7b130329c7..09dd29556e 100644 --- a/image-processing/pom.xml +++ b/image-processing/pom.xml @@ -35,6 +35,11 @@ + + org.openpnp + opencv + 3.4.2-0 + com.twelvemonkeys.imageio imageio-core diff --git a/image-processing/src/main/java/com/baeldung/imageprocessing/opencv/CameraStream.java b/image-processing/src/main/java/com/baeldung/imageprocessing/opencv/CameraStream.java new file mode 100644 index 0000000000..3e7bd159c4 --- /dev/null +++ b/image-processing/src/main/java/com/baeldung/imageprocessing/opencv/CameraStream.java @@ -0,0 +1,87 @@ +package com.baeldung.imageprocessing.opencv; + +import javafx.animation.AnimationTimer; +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; +import javafx.scene.layout.HBox; +import javafx.stage.Stage; +import nu.pattern.OpenCV; +import org.opencv.core.Mat; +import org.opencv.core.MatOfByte; +import org.opencv.core.MatOfRect; +import org.opencv.core.Rect; +import org.opencv.core.Scalar; +import org.opencv.core.Size; +import org.opencv.imgcodecs.Imgcodecs; +import org.opencv.imgproc.Imgproc; +import org.opencv.objdetect.CascadeClassifier; +import org.opencv.objdetect.Objdetect; +import org.opencv.videoio.VideoCapture; + +import java.io.ByteArrayInputStream; + +public class CameraStream extends Application { + private VideoCapture capture; + + public void start(Stage stage) throws Exception { + OpenCV.loadShared(); + capture= new VideoCapture(0); // The number is the ID of the camera + ImageView imageView = new ImageView(); + HBox hbox = new HBox(imageView); + Scene scene = new Scene(hbox); + stage.setScene(scene); + stage.show(); + new AnimationTimer(){ + @Override + public void handle(long l) { + imageView.setImage(getCapture()); + } + }.start(); + } + + public Image getCapture() { + Mat mat = new Mat(); + capture.read(mat); + return mat2Img(mat); + } + + public Image getCaptureWithFaceDetection() { + Mat mat = new Mat(); + capture.read(mat); + Mat haarClassifiedImg = detectFace(mat); + return mat2Img(haarClassifiedImg); + } + + public Image mat2Img(Mat mat) { + MatOfByte bytes = new MatOfByte(); + Imgcodecs.imencode("img", mat, bytes); + ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes.toArray()); + Image img = new Image(inputStream); return img; + } + + public static void main(String[] args) { + Application.launch(args); + } + + public static Mat detectFace(Mat inputImage) { + MatOfRect facesDetected = new MatOfRect(); + CascadeClassifier cascadeClassifier = new CascadeClassifier(); + int minFaceSize = Math.round(inputImage.rows() * 0.1f); + cascadeClassifier.load("./src/main/resources/haarcascades/haarcascade_frontalface_alt.xml"); + cascadeClassifier.detectMultiScale(inputImage, + facesDetected, + 1.1, + 3, + Objdetect.CASCADE_SCALE_IMAGE, + new Size(minFaceSize, minFaceSize), + new Size() + ); + Rect[] facesArray = facesDetected.toArray(); + for(Rect face : facesArray) { + Imgproc.rectangle(inputImage, face.tl(), face.br(), new Scalar(0, 0, 255), 3 ); + } + return inputImage; + } +} \ No newline at end of file diff --git a/image-processing/src/main/java/com/baeldung/imageprocessing/opencv/FaceDetection.java b/image-processing/src/main/java/com/baeldung/imageprocessing/opencv/FaceDetection.java new file mode 100644 index 0000000000..c53f484510 --- /dev/null +++ b/image-processing/src/main/java/com/baeldung/imageprocessing/opencv/FaceDetection.java @@ -0,0 +1,56 @@ +package com.baeldung.imageprocessing.opencv; + +import org.opencv.core.Mat; +import org.opencv.core.MatOfByte; +import org.opencv.core.MatOfRect; +import org.opencv.core.Rect; +import org.opencv.core.Scalar; +import org.opencv.core.Size; +import org.opencv.imgcodecs.Imgcodecs; +import org.opencv.imgproc.Imgproc; +import org.opencv.objdetect.CascadeClassifier; +import org.opencv.objdetect.Objdetect; +import javafx.scene.image.Image; +import java.io.ByteArrayInputStream; + +public class FaceDetection { + + public static Mat loadImage(String imagePath) { + Imgcodecs imageCodecs = new Imgcodecs(); + return imageCodecs.imread(imagePath); + } + + public static void saveImage(Mat imageMatrix, String targetPath) { + Imgcodecs imgcodecs = new Imgcodecs(); + imgcodecs.imwrite(targetPath, imageMatrix); + } + + public static void detectFace(String sourceImagePath, String targetImagePath) { + Mat loadedImage = loadImage(sourceImagePath); + MatOfRect facesDetected = new MatOfRect(); + CascadeClassifier cascadeClassifier = new CascadeClassifier(); + int minFaceSize = Math.round(loadedImage.rows() * 0.1f); + cascadeClassifier.load("./src/main/resources/haarcascades/haarcascade_frontalface_alt.xml"); + cascadeClassifier.detectMultiScale(loadedImage, + facesDetected, + 1.1, + 3, + Objdetect.CASCADE_SCALE_IMAGE, + new Size(minFaceSize, minFaceSize), + new Size() + ); + Rect[] facesArray = facesDetected.toArray(); + for(Rect face : facesArray) { + Imgproc.rectangle(loadedImage, face.tl(), face.br(), new Scalar(0, 0, 255), 3 ); + } + saveImage(loadedImage, targetImagePath); + } + + public Image mat2Img(Mat mat) { + MatOfByte bytes = new MatOfByte(); + Imgcodecs.imencode("img", mat, bytes); + ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes.toArray()); + Image img = new Image(inputStream); return img; + } + +} \ No newline at end of file diff --git a/image-processing/src/main/resources/haarcascades/haarcascade_frontalface_alt.xml b/image-processing/src/main/resources/haarcascades/haarcascade_frontalface_alt.xml new file mode 100644 index 0000000000..be36d2b85f --- /dev/null +++ b/image-processing/src/main/resources/haarcascades/haarcascade_frontalface_alt.xml @@ -0,0 +1,24350 @@ + + + + BOOST + HAAR + 20 + 20 + + 213 + + 0 + 22 + + <_> + 3 + 8.2268941402435303e-01 + + <_> + + 0 -1 0 4.0141958743333817e-03 + + 3.3794190734624863e-02 8.3781069517135620e-01 + <_> + + 0 -1 1 1.5151339583098888e-02 + + 1.5141320228576660e-01 7.4888122081756592e-01 + <_> + + 0 -1 2 4.2109931819140911e-03 + + 9.0049281716346741e-02 6.3748198747634888e-01 + <_> + 16 + 6.9566087722778320e+00 + + <_> + + 0 -1 3 1.6227109590545297e-03 + + 6.9308586418628693e-02 7.1109461784362793e-01 + <_> + + 0 -1 4 2.2906649392098188e-03 + + 1.7958030104637146e-01 6.6686922311782837e-01 + <_> + + 0 -1 5 5.0025708042085171e-03 + + 1.6936729848384857e-01 6.5540069341659546e-01 + <_> + + 0 -1 6 7.9659894108772278e-03 + + 5.8663320541381836e-01 9.1414518654346466e-02 + <_> + + 0 -1 7 -3.5227010957896709e-03 + + 1.4131669700145721e-01 6.0318958759307861e-01 + <_> + + 0 -1 8 3.6667689681053162e-02 + + 3.6756721138954163e-01 7.9203182458877563e-01 + <_> + + 0 -1 9 9.3361474573612213e-03 + + 6.1613857746124268e-01 2.0885099470615387e-01 + <_> + + 0 -1 10 8.6961314082145691e-03 + + 2.8362309932708740e-01 6.3602739572525024e-01 + <_> + + 0 -1 11 1.1488880263641477e-03 + + 2.2235809266567230e-01 5.8007007837295532e-01 + <_> + + 0 -1 12 -2.1484689787030220e-03 + + 2.4064640700817108e-01 5.7870548963546753e-01 + <_> + + 0 -1 13 2.1219060290604830e-03 + + 5.5596548318862915e-01 1.3622370362281799e-01 + <_> + + 0 -1 14 -9.3949146568775177e-02 + + 8.5027372837066650e-01 4.7177401185035706e-01 + <_> + + 0 -1 15 1.3777789426967502e-03 + + 5.9936738014221191e-01 2.8345298767089844e-01 + <_> + + 0 -1 16 7.3063157498836517e-02 + + 4.3418860435485840e-01 7.0600342750549316e-01 + <_> + + 0 -1 17 3.6767389974556863e-04 + + 3.0278879404067993e-01 6.0515749454498291e-01 + <_> + + 0 -1 18 -6.0479710809886456e-03 + + 1.7984339594841003e-01 5.6752568483352661e-01 + <_> + 21 + 9.4985427856445312e+00 + + <_> + + 0 -1 19 -1.6510689631104469e-02 + + 6.6442251205444336e-01 1.4248579740524292e-01 + <_> + + 0 -1 20 2.7052499353885651e-03 + + 6.3253521919250488e-01 1.2884770333766937e-01 + <_> + + 0 -1 21 2.8069869149476290e-03 + + 1.2402880191802979e-01 6.1931931972503662e-01 + <_> + + 0 -1 22 -1.5402400167658925e-03 + + 1.4321430027484894e-01 5.6700158119201660e-01 + <_> + + 0 -1 23 -5.6386279175058007e-04 + + 1.6574330627918243e-01 5.9052079916000366e-01 + <_> + + 0 -1 24 1.9253729842603207e-03 + + 2.6955071091651917e-01 5.7388240098953247e-01 + <_> + + 0 -1 25 -5.0214841030538082e-03 + + 1.8935389816761017e-01 5.7827740907669067e-01 + <_> + + 0 -1 26 2.6365420781075954e-03 + + 2.3093290627002716e-01 5.6954258680343628e-01 + <_> + + 0 -1 27 -1.5127769438549876e-03 + + 2.7596020698547363e-01 5.9566420316696167e-01 + <_> + + 0 -1 28 -1.0157439857721329e-02 + + 1.7325380444526672e-01 5.5220472812652588e-01 + <_> + + 0 -1 29 -1.1953660286962986e-02 + + 1.3394099473953247e-01 5.5590140819549561e-01 + <_> + + 0 -1 30 4.8859491944313049e-03 + + 3.6287039518356323e-01 6.1888492107391357e-01 + <_> + + 0 -1 31 -8.0132916569709778e-02 + + 9.1211050748825073e-02 5.4759448766708374e-01 + <_> + + 0 -1 32 1.0643280111253262e-03 + + 3.7151429057121277e-01 5.7113999128341675e-01 + <_> + + 0 -1 33 -1.3419450260698795e-03 + + 5.9533137083053589e-01 3.3180978894233704e-01 + <_> + + 0 -1 34 -5.4601140320301056e-02 + + 1.8440659344196320e-01 5.6028461456298828e-01 + <_> + + 0 -1 35 2.9071690514683723e-03 + + 3.5942441225051880e-01 6.1317151784896851e-01 + <_> + + 0 -1 36 7.4718717951327562e-04 + + 5.9943532943725586e-01 3.4595629572868347e-01 + <_> + + 0 -1 37 4.3013808317482471e-03 + + 4.1726520657539368e-01 6.9908452033996582e-01 + <_> + + 0 -1 38 4.5017572119832039e-03 + + 4.5097151398658752e-01 7.8014570474624634e-01 + <_> + + 0 -1 39 2.4138500913977623e-02 + + 5.4382127523422241e-01 1.3198269903659821e-01 + <_> + 39 + 1.8412969589233398e+01 + + <_> + + 0 -1 40 1.9212230108678341e-03 + + 1.4152669906616211e-01 6.1998707056045532e-01 + <_> + + 0 -1 41 -1.2748669541906565e-04 + + 6.1910742521286011e-01 1.8849289417266846e-01 + <_> + + 0 -1 42 5.1409931620582938e-04 + + 1.4873969554901123e-01 5.8579277992248535e-01 + <_> + + 0 -1 43 4.1878609918057919e-03 + + 2.7469098567962646e-01 6.3592398166656494e-01 + <_> + + 0 -1 44 5.1015717908740044e-03 + + 5.8708512783050537e-01 2.1756289899349213e-01 + <_> + + 0 -1 45 -2.1448440384119749e-03 + + 5.8809447288513184e-01 2.9795908927917480e-01 + <_> + + 0 -1 46 -2.8977119363844395e-03 + + 2.3733270168304443e-01 5.8766472339630127e-01 + <_> + + 0 -1 47 -2.1610679104924202e-02 + + 1.2206549942493439e-01 5.1942020654678345e-01 + <_> + + 0 -1 48 -4.6299318782985210e-03 + + 2.6312309503555298e-01 5.8174091577529907e-01 + <_> + + 0 -1 49 5.9393711853772402e-04 + + 3.6386200785636902e-01 5.6985449790954590e-01 + <_> + + 0 -1 50 5.3878661245107651e-02 + + 4.3035310506820679e-01 7.5593662261962891e-01 + <_> + + 0 -1 51 1.8887349870055914e-03 + + 2.1226030588150024e-01 5.6134271621704102e-01 + <_> + + 0 -1 52 -2.3635339457541704e-03 + + 5.6318491697311401e-01 2.6427671313285828e-01 + <_> + + 0 -1 53 2.4017799645662308e-02 + + 5.7971078157424927e-01 2.7517059445381165e-01 + <_> + + 0 -1 54 2.0543030404951423e-04 + + 2.7052420377731323e-01 5.7525688409805298e-01 + <_> + + 0 -1 55 8.4790197433903813e-04 + + 5.4356247186660767e-01 2.3348769545555115e-01 + <_> + + 0 -1 56 1.4091329649090767e-03 + + 5.3194248676300049e-01 2.0631550252437592e-01 + <_> + + 0 -1 57 1.4642629539594054e-03 + + 5.4189807176589966e-01 3.0688610672950745e-01 + <_> + + 0 -1 58 1.6352549428120255e-03 + + 3.6953729391098022e-01 6.1128681898117065e-01 + <_> + + 0 -1 59 8.3172752056270838e-04 + + 3.5650369524955750e-01 6.0252362489700317e-01 + <_> + + 0 -1 60 -2.0998890977352858e-03 + + 1.9139820337295532e-01 5.3628271818161011e-01 + <_> + + 0 -1 61 -7.4213981861248612e-04 + + 3.8355550169944763e-01 5.5293101072311401e-01 + <_> + + 0 -1 62 3.2655049581080675e-03 + + 4.3128961324691772e-01 7.1018958091735840e-01 + <_> + + 0 -1 63 8.9134991867467761e-04 + + 3.9848309755325317e-01 6.3919639587402344e-01 + <_> + + 0 -1 64 -1.5284179709851742e-02 + + 2.3667329549789429e-01 5.4337137937545776e-01 + <_> + + 0 -1 65 4.8381411470472813e-03 + + 5.8175009489059448e-01 3.2391890883445740e-01 + <_> + + 0 -1 66 -9.1093179071322083e-04 + + 5.5405938625335693e-01 2.9118689894676208e-01 + <_> + + 0 -1 67 -6.1275060288608074e-03 + + 1.7752550542354584e-01 5.1966291666030884e-01 + <_> + + 0 -1 68 -4.4576259097084403e-04 + + 3.0241701006889343e-01 5.5335938930511475e-01 + <_> + + 0 -1 69 2.2646540775895119e-02 + + 4.4149309396743774e-01 6.9753772020339966e-01 + <_> + + 0 -1 70 -1.8804960418492556e-03 + + 2.7913948893547058e-01 5.4979521036148071e-01 + <_> + + 0 -1 71 7.0889107882976532e-03 + + 5.2631992101669312e-01 2.3855470120906830e-01 + <_> + + 0 -1 72 1.7318050377070904e-03 + + 4.3193790316581726e-01 6.9836008548736572e-01 + <_> + + 0 -1 73 -6.8482700735330582e-03 + + 3.0820429325103760e-01 5.3909200429916382e-01 + <_> + + 0 -1 74 -1.5062530110299122e-05 + + 5.5219221115112305e-01 3.1203660368919373e-01 + <_> + + 0 -1 75 2.9475569725036621e-02 + + 5.4013228416442871e-01 1.7706030607223511e-01 + <_> + + 0 -1 76 8.1387329846620560e-03 + + 5.1786178350448608e-01 1.2110190093517303e-01 + <_> + + 0 -1 77 2.0942950621247292e-02 + + 5.2902942895889282e-01 3.3112218976020813e-01 + <_> + + 0 -1 78 -9.5665529370307922e-03 + + 7.4719941616058350e-01 4.4519689679145813e-01 + <_> + 33 + 1.5324139595031738e+01 + + <_> + + 0 -1 79 -2.8206960996612906e-04 + + 2.0640860497951508e-01 6.0767322778701782e-01 + <_> + + 0 -1 80 1.6790600493550301e-03 + + 5.8519971370697021e-01 1.2553839385509491e-01 + <_> + + 0 -1 81 6.9827912375330925e-04 + + 9.4018429517745972e-02 5.7289612293243408e-01 + <_> + + 0 -1 82 7.8959012171253562e-04 + + 1.7819879949092865e-01 5.6943088769912720e-01 + <_> + + 0 -1 83 -2.8560499195009470e-03 + + 1.6383990645408630e-01 5.7886648178100586e-01 + <_> + + 0 -1 84 -3.8122469559311867e-03 + + 2.0854400098323822e-01 5.5085647106170654e-01 + <_> + + 0 -1 85 1.5896620461717248e-03 + + 5.7027608156204224e-01 1.8572150170803070e-01 + <_> + + 0 -1 86 1.0078339837491512e-02 + + 5.1169431209564209e-01 2.1897700428962708e-01 + <_> + + 0 -1 87 -6.3526302576065063e-02 + + 7.1313798427581787e-01 4.0438130497932434e-01 + <_> + + 0 -1 88 -9.1031491756439209e-03 + + 2.5671818852424622e-01 5.4639732837677002e-01 + <_> + + 0 -1 89 -2.4035000242292881e-03 + + 1.7006659507751465e-01 5.5909740924835205e-01 + <_> + + 0 -1 90 1.5226360410451889e-03 + + 5.4105567932128906e-01 2.6190540194511414e-01 + <_> + + 0 -1 91 1.7997439950704575e-02 + + 3.7324368953704834e-01 6.5352207422256470e-01 + <_> + + 0 -1 92 -6.4538191072642803e-03 + + 2.6264819502830505e-01 5.5374461412429810e-01 + <_> + + 0 -1 93 -1.1880760081112385e-02 + + 2.0037539303302765e-01 5.5447459220886230e-01 + <_> + + 0 -1 94 1.2713660253211856e-03 + + 5.5919027328491211e-01 3.0319759249687195e-01 + <_> + + 0 -1 95 1.1376109905540943e-03 + + 2.7304071187973022e-01 5.6465089321136475e-01 + <_> + + 0 -1 96 -4.2651998810470104e-03 + + 1.4059090614318848e-01 5.4618209600448608e-01 + <_> + + 0 -1 97 -2.9602861031889915e-03 + + 1.7950350046157837e-01 5.4592901468276978e-01 + <_> + + 0 -1 98 -8.8448226451873779e-03 + + 5.7367831468582153e-01 2.8092199563980103e-01 + <_> + + 0 -1 99 -6.6430689767003059e-03 + + 2.3706759512424469e-01 5.5038261413574219e-01 + <_> + + 0 -1 100 3.9997808635234833e-03 + + 5.6081998348236084e-01 3.3042821288108826e-01 + <_> + + 0 -1 101 -4.1221720166504383e-03 + + 1.6401059925556183e-01 5.3789931535720825e-01 + <_> + + 0 -1 102 1.5624909661710262e-02 + + 5.2276492118835449e-01 2.2886039316654205e-01 + <_> + + 0 -1 103 -1.0356419719755650e-02 + + 7.0161938667297363e-01 4.2529278993606567e-01 + <_> + + 0 -1 104 -8.7960809469223022e-03 + + 2.7673470973968506e-01 5.3558301925659180e-01 + <_> + + 0 -1 105 1.6226939857006073e-01 + + 4.3422400951385498e-01 7.4425792694091797e-01 + <_> + + 0 -1 106 4.5542530715465546e-03 + + 5.7264858484268188e-01 2.5821250677108765e-01 + <_> + + 0 -1 107 -2.1309209987521172e-03 + + 2.1068480610847473e-01 5.3610187768936157e-01 + <_> + + 0 -1 108 -1.3208420015871525e-02 + + 7.5937908887863159e-01 4.5524680614471436e-01 + <_> + + 0 -1 109 -6.5996676683425903e-02 + + 1.2524759769439697e-01 5.3440397977828979e-01 + <_> + + 0 -1 110 7.9142656177282333e-03 + + 3.3153840899467468e-01 5.6010431051254272e-01 + <_> + + 0 -1 111 2.0894279703497887e-02 + + 5.5060499906539917e-01 2.7688381075859070e-01 + <_> + 44 + 2.1010639190673828e+01 + + <_> + + 0 -1 112 1.1961159761995077e-03 + + 1.7626909911632538e-01 6.1562412977218628e-01 + <_> + + 0 -1 113 -1.8679830245673656e-03 + + 6.1181068420410156e-01 1.8323999643325806e-01 + <_> + + 0 -1 114 -1.9579799845814705e-04 + + 9.9044263362884521e-02 5.7238161563873291e-01 + <_> + + 0 -1 115 -8.0255657667294145e-04 + + 5.5798798799514771e-01 2.3772829771041870e-01 + <_> + + 0 -1 116 -2.4510810617357492e-03 + + 2.2314579784870148e-01 5.8589351177215576e-01 + <_> + + 0 -1 117 5.0361850298941135e-04 + + 2.6539939641952515e-01 5.7941037416458130e-01 + <_> + + 0 -1 118 4.0293349884450436e-03 + + 5.8038270473480225e-01 2.4848650395870209e-01 + <_> + + 0 -1 119 -1.4451709575951099e-02 + + 1.8303519487380981e-01 5.4842048883438110e-01 + <_> + + 0 -1 120 2.0380979403853416e-03 + + 3.3635589480400085e-01 6.0510927438735962e-01 + <_> + + 0 -1 121 -1.6155190533027053e-03 + + 2.2866420447826385e-01 5.4412460327148438e-01 + <_> + + 0 -1 122 3.3458340913057327e-03 + + 5.6259131431579590e-01 2.3923380672931671e-01 + <_> + + 0 -1 123 1.6379579901695251e-03 + + 3.9069938659667969e-01 5.9646219015121460e-01 + <_> + + 0 -1 124 3.0251210555434227e-02 + + 5.2484822273254395e-01 1.5757469832897186e-01 + <_> + + 0 -1 125 3.7251990288496017e-02 + + 4.1943109035491943e-01 6.7484188079833984e-01 + <_> + + 0 -1 126 -2.5109790265560150e-02 + + 1.8825499713420868e-01 5.4734510183334351e-01 + <_> + + 0 -1 127 -5.3099058568477631e-03 + + 1.3399730622768402e-01 5.2271109819412231e-01 + <_> + + 0 -1 128 1.2086479691788554e-03 + + 3.7620881199836731e-01 6.1096358299255371e-01 + <_> + + 0 -1 129 -2.1907679736614227e-02 + + 2.6631429791450500e-01 5.4040068387985229e-01 + <_> + + 0 -1 130 5.4116579703986645e-03 + + 5.3635787963867188e-01 2.2322730720043182e-01 + <_> + + 0 -1 131 6.9946326315402985e-02 + + 5.3582328557968140e-01 2.4536980688571930e-01 + <_> + + 0 -1 132 3.4520021290518343e-04 + + 2.4096719920635223e-01 5.3769302368164062e-01 + <_> + + 0 -1 133 1.2627709656953812e-03 + + 5.4258567094802856e-01 3.1556931138038635e-01 + <_> + + 0 -1 134 2.2719509899616241e-02 + + 4.1584059596061707e-01 6.5978652238845825e-01 + <_> + + 0 -1 135 -1.8111000536009669e-03 + + 2.8112530708312988e-01 5.5052447319030762e-01 + <_> + + 0 -1 136 3.3469670452177525e-03 + + 5.2600282430648804e-01 1.8914650380611420e-01 + <_> + + 0 -1 137 4.0791751234792173e-04 + + 5.6735092401504517e-01 3.3442100882530212e-01 + <_> + + 0 -1 138 1.2734799645841122e-02 + + 5.3435921669006348e-01 2.3956120014190674e-01 + <_> + + 0 -1 139 -7.3119727894663811e-03 + + 6.0108900070190430e-01 4.0222078561782837e-01 + <_> + + 0 -1 140 -5.6948751211166382e-02 + + 8.1991511583328247e-01 4.5431908965110779e-01 + <_> + + 0 -1 141 -5.0116591155529022e-03 + + 2.2002810239791870e-01 5.3577107191085815e-01 + <_> + + 0 -1 142 6.0334368608891964e-03 + + 4.4130811095237732e-01 7.1817511320114136e-01 + <_> + + 0 -1 143 3.9437441155314445e-03 + + 5.4788607358932495e-01 2.7917331457138062e-01 + <_> + + 0 -1 144 -3.6591119132936001e-03 + + 6.3578677177429199e-01 3.9897239208221436e-01 + <_> + + 0 -1 145 -3.8456181064248085e-03 + + 3.4936860203742981e-01 5.3006649017333984e-01 + <_> + + 0 -1 146 -7.1926261298358440e-03 + + 1.1196149885654449e-01 5.2296727895736694e-01 + <_> + + 0 -1 147 -5.2798941731452942e-02 + + 2.3871029913425446e-01 5.4534512758255005e-01 + <_> + + 0 -1 148 -7.9537667334079742e-03 + + 7.5869178771972656e-01 4.4393768906593323e-01 + <_> + + 0 -1 149 -2.7344180271029472e-03 + + 2.5654768943786621e-01 5.4893219470977783e-01 + <_> + + 0 -1 150 -1.8507939530536532e-03 + + 6.7343479394912720e-01 4.2524749040603638e-01 + <_> + + 0 -1 151 1.5918919816613197e-02 + + 5.4883527755737305e-01 2.2926619648933411e-01 + <_> + + 0 -1 152 -1.2687679845839739e-03 + + 6.1043310165405273e-01 4.0223899483680725e-01 + <_> + + 0 -1 153 6.2883910723030567e-03 + + 5.3108531236648560e-01 1.5361930429935455e-01 + <_> + + 0 -1 154 -6.2259892001748085e-03 + + 1.7291119694709778e-01 5.2416062355041504e-01 + <_> + + 0 -1 155 -1.2132599949836731e-02 + + 6.5977597236633301e-01 4.3251821398735046e-01 + <_> + 50 + 2.3918790817260742e+01 + + <_> + + 0 -1 156 -3.9184908382594585e-03 + + 6.1034351587295532e-01 1.4693309366703033e-01 + <_> + + 0 -1 157 1.5971299726516008e-03 + + 2.6323631405830383e-01 5.8964669704437256e-01 + <_> + + 0 -1 158 1.7780110239982605e-02 + + 5.8728742599487305e-01 1.7603619396686554e-01 + <_> + + 0 -1 159 6.5334769897162914e-04 + + 1.5678019821643829e-01 5.5960661172866821e-01 + <_> + + 0 -1 160 -2.8353091329336166e-04 + + 1.9131539762020111e-01 5.7320362329483032e-01 + <_> + + 0 -1 161 1.6104689566418529e-03 + + 2.9149138927459717e-01 5.6230807304382324e-01 + <_> + + 0 -1 162 -9.7750619053840637e-02 + + 1.9434769451618195e-01 5.6482332944869995e-01 + <_> + + 0 -1 163 5.5182358482852578e-04 + + 3.1346169114112854e-01 5.5046397447586060e-01 + <_> + + 0 -1 164 -1.2858220376074314e-02 + + 2.5364819169044495e-01 5.7601428031921387e-01 + <_> + + 0 -1 165 4.1530239395797253e-03 + + 5.7677221298217773e-01 3.6597740650177002e-01 + <_> + + 0 -1 166 1.7092459602281451e-03 + + 2.8431910276412964e-01 5.9189391136169434e-01 + <_> + + 0 -1 167 7.5217359699308872e-03 + + 4.0524271130561829e-01 6.1831092834472656e-01 + <_> + + 0 -1 168 2.2479810286313295e-03 + + 5.7837551832199097e-01 3.1354010105133057e-01 + <_> + + 0 -1 169 5.2006211131811142e-02 + + 5.5413120985031128e-01 1.9166369736194611e-01 + <_> + + 0 -1 170 1.2085529975593090e-02 + + 4.0326559543609619e-01 6.6445910930633545e-01 + <_> + + 0 -1 171 1.4687820112158079e-05 + + 3.5359779000282288e-01 5.7093828916549683e-01 + <_> + + 0 -1 172 7.1395188570022583e-06 + + 3.0374449491500854e-01 5.6102699041366577e-01 + <_> + + 0 -1 173 -4.6001640148460865e-03 + + 7.1810871362686157e-01 4.5803260803222656e-01 + <_> + + 0 -1 174 2.0058949012309313e-03 + + 5.6219518184661865e-01 2.9536840319633484e-01 + <_> + + 0 -1 175 4.5050270855426788e-03 + + 4.6153879165649414e-01 7.6190179586410522e-01 + <_> + + 0 -1 176 1.1746830306947231e-02 + + 5.3438371419906616e-01 1.7725290358066559e-01 + <_> + + 0 -1 177 -5.8316338807344437e-02 + + 1.6862459480762482e-01 5.3407722711563110e-01 + <_> + + 0 -1 178 2.3629379575140774e-04 + + 3.7920561432838440e-01 6.0268038511276245e-01 + <_> + + 0 -1 179 -7.8156180679798126e-03 + + 1.5128670632839203e-01 5.3243237733840942e-01 + <_> + + 0 -1 180 -1.0876160115003586e-02 + + 2.0818220078945160e-01 5.3199452161788940e-01 + <_> + + 0 -1 181 -2.7745519764721394e-03 + + 4.0982469916343689e-01 5.2103281021118164e-01 + <_> + + 0 -1 182 -7.8276381827890873e-04 + + 5.6932741403579712e-01 3.4788420796394348e-01 + <_> + + 0 -1 183 1.3870409689843655e-02 + + 5.3267508745193481e-01 2.2576980292797089e-01 + <_> + + 0 -1 184 -2.3674910888075829e-02 + + 1.5513050556182861e-01 5.2007079124450684e-01 + <_> + + 0 -1 185 -1.4879409718560055e-05 + + 5.5005669593811035e-01 3.8201761245727539e-01 + <_> + + 0 -1 186 3.6190641112625599e-03 + + 4.2386838793754578e-01 6.6397482156753540e-01 + <_> + + 0 -1 187 -1.9817110151052475e-02 + + 2.1500380337238312e-01 5.3823578357696533e-01 + <_> + + 0 -1 188 -3.8154039066284895e-03 + + 6.6757112741470337e-01 4.2152971029281616e-01 + <_> + + 0 -1 189 -4.9775829538702965e-03 + + 2.2672890126705170e-01 5.3863281011581421e-01 + <_> + + 0 -1 190 2.2441020701080561e-03 + + 4.3086910247802734e-01 6.8557357788085938e-01 + <_> + + 0 -1 191 1.2282459996640682e-02 + + 5.8366149663925171e-01 3.4674790501594543e-01 + <_> + + 0 -1 192 -2.8548699337989092e-03 + + 7.0169448852539062e-01 4.3114539980888367e-01 + <_> + + 0 -1 193 -3.7875669077038765e-03 + + 2.8953450918197632e-01 5.2249461412429810e-01 + <_> + + 0 -1 194 -1.2201230274513364e-03 + + 2.9755708575248718e-01 5.4816448688507080e-01 + <_> + + 0 -1 195 1.0160599835216999e-02 + + 4.8888179659843445e-01 8.1826978921890259e-01 + <_> + + 0 -1 196 -1.6174569725990295e-02 + + 1.4814929664134979e-01 5.2399927377700806e-01 + <_> + + 0 -1 197 1.9292460754513741e-02 + + 4.7863098978996277e-01 7.3781907558441162e-01 + <_> + + 0 -1 198 -3.2479539513587952e-03 + + 7.3742228746414185e-01 4.4706439971923828e-01 + <_> + + 0 -1 199 -9.3803480267524719e-03 + + 3.4891548752784729e-01 5.5379962921142578e-01 + <_> + + 0 -1 200 -1.2606129981577396e-02 + + 2.3796869814395905e-01 5.3154432773590088e-01 + <_> + + 0 -1 201 -2.5621930137276649e-02 + + 1.9646880030632019e-01 5.1387697458267212e-01 + <_> + + 0 -1 202 -7.5741496402770281e-05 + + 5.5905228853225708e-01 3.3658531308174133e-01 + <_> + + 0 -1 203 -8.9210882782936096e-02 + + 6.3404656946659088e-02 5.1626348495483398e-01 + <_> + + 0 -1 204 -2.7670480776578188e-03 + + 7.3234677314758301e-01 4.4907060265541077e-01 + <_> + + 0 -1 205 2.7152578695677221e-04 + + 4.1148349642753601e-01 5.9855180978775024e-01 + <_> + 51 + 2.4527879714965820e+01 + + <_> + + 0 -1 206 1.4786219689995050e-03 + + 2.6635450124740601e-01 6.6433167457580566e-01 + <_> + + 0 -1 207 -1.8741659587249160e-03 + + 6.1438488960266113e-01 2.5185129046440125e-01 + <_> + + 0 -1 208 -1.7151009524241090e-03 + + 5.7663410902023315e-01 2.3974630236625671e-01 + <_> + + 0 -1 209 -1.8939269939437509e-03 + + 5.6820458173751831e-01 2.5291448831558228e-01 + <_> + + 0 -1 210 -5.3006052039563656e-03 + + 1.6406759619712830e-01 5.5560797452926636e-01 + <_> + + 0 -1 211 -4.6662531793117523e-02 + + 6.1231541633605957e-01 4.7628301382064819e-01 + <_> + + 0 -1 212 -7.9431332414969802e-04 + + 5.7078588008880615e-01 2.8394040465354919e-01 + <_> + + 0 -1 213 1.4891670085489750e-02 + + 4.0896728634834290e-01 6.0063672065734863e-01 + <_> + + 0 -1 214 -1.2046529445797205e-03 + + 5.7124507427215576e-01 2.7052891254425049e-01 + <_> + + 0 -1 215 6.0619381256401539e-03 + + 5.2625042200088501e-01 3.2622259855270386e-01 + <_> + + 0 -1 216 -2.5286648888140917e-03 + + 6.8538308143615723e-01 4.1992568969726562e-01 + <_> + + 0 -1 217 -5.9010218828916550e-03 + + 3.2662820816040039e-01 5.4348129034042358e-01 + <_> + + 0 -1 218 5.6702760048210621e-03 + + 5.4684108495712280e-01 2.3190039396286011e-01 + <_> + + 0 -1 219 -3.0304100364446640e-03 + + 5.5706679821014404e-01 2.7082380652427673e-01 + <_> + + 0 -1 220 2.9803649522364140e-03 + + 3.7005689740180969e-01 5.8906257152557373e-01 + <_> + + 0 -1 221 -7.5840510427951813e-02 + + 2.1400700509548187e-01 5.4199481010437012e-01 + <_> + + 0 -1 222 1.9262539222836494e-02 + + 5.5267721414566040e-01 2.7265900373458862e-01 + <_> + + 0 -1 223 1.8888259364757687e-04 + + 3.9580118656158447e-01 6.0172098875045776e-01 + <_> + + 0 -1 224 2.9369549825787544e-02 + + 5.2413737773895264e-01 1.4357580244541168e-01 + <_> + + 0 -1 225 1.0417619487270713e-03 + + 3.3854091167449951e-01 5.9299832582473755e-01 + <_> + + 0 -1 226 2.6125640142709017e-03 + + 5.4853779077529907e-01 3.0215978622436523e-01 + <_> + + 0 -1 227 9.6977467183023691e-04 + + 3.3752760291099548e-01 5.5320328474044800e-01 + <_> + + 0 -1 228 5.9512659208849072e-04 + + 5.6317430734634399e-01 3.3593991398811340e-01 + <_> + + 0 -1 229 -1.0156559944152832e-01 + + 6.3735038042068481e-02 5.2304250001907349e-01 + <_> + + 0 -1 230 3.6156699061393738e-02 + + 5.1369631290435791e-01 1.0295289754867554e-01 + <_> + + 0 -1 231 3.4624140243977308e-03 + + 3.8793200254440308e-01 5.5582892894744873e-01 + <_> + + 0 -1 232 1.9554980099201202e-02 + + 5.2500867843627930e-01 1.8758599460124969e-01 + <_> + + 0 -1 233 -2.3121440317481756e-03 + + 6.6720288991928101e-01 4.6796411275863647e-01 + <_> + + 0 -1 234 -1.8605289515107870e-03 + + 7.1633791923522949e-01 4.3346709012985229e-01 + <_> + + 0 -1 235 -9.4026362057775259e-04 + + 3.0213609337806702e-01 5.6502032279968262e-01 + <_> + + 0 -1 236 -5.2418331615626812e-03 + + 1.8200090527534485e-01 5.2502560615539551e-01 + <_> + + 0 -1 237 1.1729019752237946e-04 + + 3.3891880512237549e-01 5.4459732770919800e-01 + <_> + + 0 -1 238 1.1878840159624815e-03 + + 4.0853491425514221e-01 6.2535631656646729e-01 + <_> + + 0 -1 239 -1.0881359688937664e-02 + + 3.3783990144729614e-01 5.7000827789306641e-01 + <_> + + 0 -1 240 1.7354859737679362e-03 + + 4.2046359181404114e-01 6.5230387449264526e-01 + <_> + + 0 -1 241 -6.5119052305817604e-03 + + 2.5952160358428955e-01 5.4281437397003174e-01 + <_> + + 0 -1 242 -1.2136430013924837e-03 + + 6.1651438474655151e-01 3.9778938889503479e-01 + <_> + + 0 -1 243 -1.0354240424931049e-02 + + 1.6280280053615570e-01 5.2195048332214355e-01 + <_> + + 0 -1 244 5.5858830455690622e-04 + + 3.1996509432792664e-01 5.5035740137100220e-01 + <_> + + 0 -1 245 1.5299649909138680e-02 + + 4.1039940714836121e-01 6.1223882436752319e-01 + <_> + + 0 -1 246 -2.1588210016489029e-02 + + 1.0349129885435104e-01 5.1973849534988403e-01 + <_> + + 0 -1 247 -1.2834629416465759e-01 + + 8.4938651323318481e-01 4.8931029438972473e-01 + <_> + + 0 -1 248 -2.2927189711481333e-03 + + 3.1301578879356384e-01 5.4715752601623535e-01 + <_> + + 0 -1 249 7.9915106296539307e-02 + + 4.8563209176063538e-01 6.0739892721176147e-01 + <_> + + 0 -1 250 -7.9441092908382416e-02 + + 8.3946740627288818e-01 4.6245330572128296e-01 + <_> + + 0 -1 251 -5.2800010889768600e-03 + + 1.8816959857940674e-01 5.3066980838775635e-01 + <_> + + 0 -1 252 1.0463109938427806e-03 + + 5.2712291479110718e-01 2.5830659270286560e-01 + <_> + + 0 -1 253 2.6317298761568964e-04 + + 4.2353048920631409e-01 5.7354408502578735e-01 + <_> + + 0 -1 254 -3.6173160187900066e-03 + + 6.9343960285186768e-01 4.4954448938369751e-01 + <_> + + 0 -1 255 1.1421879753470421e-02 + + 5.9009212255477905e-01 4.1381931304931641e-01 + <_> + + 0 -1 256 -1.9963278900831938e-03 + + 6.4663827419281006e-01 4.3272399902343750e-01 + <_> + 56 + 2.7153350830078125e+01 + + <_> + + 0 -1 257 -9.9691245704889297e-03 + + 6.1423242092132568e-01 2.4822120368480682e-01 + <_> + + 0 -1 258 7.3073059320449829e-04 + + 5.7049518823623657e-01 2.3219659924507141e-01 + <_> + + 0 -1 259 6.4045301405712962e-04 + + 2.1122519671916962e-01 5.8149331808090210e-01 + <_> + + 0 -1 260 4.5424019917845726e-03 + + 2.9504820704460144e-01 5.8663117885589600e-01 + <_> + + 0 -1 261 9.2477443104144186e-05 + + 2.9909908771514893e-01 5.7913267612457275e-01 + <_> + + 0 -1 262 -8.6603146046400070e-03 + + 2.8130298852920532e-01 5.6355422735214233e-01 + <_> + + 0 -1 263 8.0515816807746887e-03 + + 3.5353690385818481e-01 6.0547572374343872e-01 + <_> + + 0 -1 264 4.3835240649059415e-04 + + 5.5965322256088257e-01 2.7315109968185425e-01 + <_> + + 0 -1 265 -9.8168973636347800e-05 + + 5.9780317544937134e-01 3.6385610699653625e-01 + <_> + + 0 -1 266 -1.1298790341243148e-03 + + 2.7552521228790283e-01 5.4327291250228882e-01 + <_> + + 0 -1 267 6.4356150105595589e-03 + + 4.3056419491767883e-01 7.0698332786560059e-01 + <_> + + 0 -1 268 -5.6829329580068588e-02 + + 2.4952429533004761e-01 5.2949970960617065e-01 + <_> + + 0 -1 269 4.0668169967830181e-03 + + 5.4785531759262085e-01 2.4977239966392517e-01 + <_> + + 0 -1 270 4.8164798499783501e-05 + + 3.9386010169982910e-01 5.7063561677932739e-01 + <_> + + 0 -1 271 6.1795017682015896e-03 + + 4.4076061248779297e-01 7.3947668075561523e-01 + <_> + + 0 -1 272 6.4985752105712891e-03 + + 5.4452431201934814e-01 2.4791529774665833e-01 + <_> + + 0 -1 273 -1.0211090557277203e-03 + + 2.5447669625282288e-01 5.3389710187911987e-01 + <_> + + 0 -1 274 -5.4247528314590454e-03 + + 2.7188581228256226e-01 5.3240692615509033e-01 + <_> + + 0 -1 275 -1.0559899965301156e-03 + + 3.1782880425453186e-01 5.5345088243484497e-01 + <_> + + 0 -1 276 6.6465808777138591e-04 + + 4.2842191457748413e-01 6.5581941604614258e-01 + <_> + + 0 -1 277 -2.7524109464138746e-04 + + 5.9028607606887817e-01 3.8102629780769348e-01 + <_> + + 0 -1 278 4.2293202131986618e-03 + + 3.8164898753166199e-01 5.7093858718872070e-01 + <_> + + 0 -1 279 -3.2868210691958666e-03 + + 1.7477439343929291e-01 5.2595442533493042e-01 + <_> + + 0 -1 280 1.5611879643984139e-04 + + 3.6017221212387085e-01 5.7256120443344116e-01 + <_> + + 0 -1 281 -7.3621381488919724e-06 + + 5.4018580913543701e-01 3.0444970726966858e-01 + <_> + + 0 -1 282 -1.4767250046133995e-02 + + 3.2207700610160828e-01 5.5734348297119141e-01 + <_> + + 0 -1 283 2.4489590898156166e-02 + + 4.3015280365943909e-01 6.5188127756118774e-01 + <_> + + 0 -1 284 -3.7652091123163700e-04 + + 3.5645830631256104e-01 5.5982369184494019e-01 + <_> + + 0 -1 285 7.3657688517414499e-06 + + 3.4907829761505127e-01 5.5618977546691895e-01 + <_> + + 0 -1 286 -1.5099939890205860e-02 + + 1.7762720584869385e-01 5.3352999687194824e-01 + <_> + + 0 -1 287 -3.8316650316119194e-03 + + 6.1496877670288086e-01 4.2213940620422363e-01 + <_> + + 0 -1 288 1.6925400123000145e-02 + + 5.4130148887634277e-01 2.1665850281715393e-01 + <_> + + 0 -1 289 -3.0477850232273340e-03 + + 6.4494907855987549e-01 4.3546178936958313e-01 + <_> + + 0 -1 290 3.2140589319169521e-03 + + 5.4001551866531372e-01 3.5232171416282654e-01 + <_> + + 0 -1 291 -4.0023201145231724e-03 + + 2.7745240926742554e-01 5.3384172916412354e-01 + <_> + + 0 -1 292 7.4182129465043545e-03 + + 5.6767392158508301e-01 3.7028178572654724e-01 + <_> + + 0 -1 293 -8.8764587417244911e-03 + + 7.7492219209671021e-01 4.5836889743804932e-01 + <_> + + 0 -1 294 2.7311739977449179e-03 + + 5.3387218713760376e-01 3.9966610074043274e-01 + <_> + + 0 -1 295 -2.5082379579544067e-03 + + 5.6119632720947266e-01 3.7774989008903503e-01 + <_> + + 0 -1 296 -8.0541074275970459e-03 + + 2.9152289032936096e-01 5.1791828870773315e-01 + <_> + + 0 -1 297 -9.7938813269138336e-04 + + 5.5364328622817993e-01 3.7001928687095642e-01 + <_> + + 0 -1 298 -5.8745909482240677e-03 + + 3.7543910741806030e-01 5.6793761253356934e-01 + <_> + + 0 -1 299 -4.4936719350516796e-03 + + 7.0196992158889771e-01 4.4809499382972717e-01 + <_> + + 0 -1 300 -5.4389229044318199e-03 + + 2.3103649914264679e-01 5.3133869171142578e-01 + <_> + + 0 -1 301 -7.5094640487805009e-04 + + 5.8648687601089478e-01 4.1293430328369141e-01 + <_> + + 0 -1 302 1.4528800420521293e-05 + + 3.7324070930480957e-01 5.6196212768554688e-01 + <_> + + 0 -1 303 4.0758069604635239e-02 + + 5.3120911121368408e-01 2.7205219864845276e-01 + <_> + + 0 -1 304 6.6505931317806244e-03 + + 4.7100159525871277e-01 6.6934937238693237e-01 + <_> + + 0 -1 305 4.5759351924061775e-03 + + 5.1678192615509033e-01 1.6372759640216827e-01 + <_> + + 0 -1 306 6.5269311890006065e-03 + + 5.3976088762283325e-01 2.9385319352149963e-01 + <_> + + 0 -1 307 -1.3660379685461521e-02 + + 7.0864880084991455e-01 4.5322000980377197e-01 + <_> + + 0 -1 308 2.7358869090676308e-02 + + 5.2064812183380127e-01 3.5892319679260254e-01 + <_> + + 0 -1 309 6.2197551596909761e-04 + + 3.5070759057998657e-01 5.4411232471466064e-01 + <_> + + 0 -1 310 -3.3077080734074116e-03 + + 5.8595228195190430e-01 4.0248918533325195e-01 + <_> + + 0 -1 311 -1.0631109587848186e-02 + + 6.7432671785354614e-01 4.4226029515266418e-01 + <_> + + 0 -1 312 1.9441649317741394e-02 + + 5.2827161550521851e-01 1.7979049682617188e-01 + <_> + 71 + 3.4554111480712891e+01 + + <_> + + 0 -1 313 -5.5052167735993862e-03 + + 5.9147310256958008e-01 2.6265591382980347e-01 + <_> + + 0 -1 314 1.9562279339879751e-03 + + 2.3125819861888885e-01 5.7416272163391113e-01 + <_> + + 0 -1 315 -8.8924784213304520e-03 + + 1.6565300524234772e-01 5.6266540288925171e-01 + <_> + + 0 -1 316 8.3638377487659454e-02 + + 5.4234498739242554e-01 1.9572949409484863e-01 + <_> + + 0 -1 317 1.2282270472496748e-03 + + 3.4179040789604187e-01 5.9925037622451782e-01 + <_> + + 0 -1 318 5.7629169896245003e-03 + + 3.7195819616317749e-01 6.0799038410186768e-01 + <_> + + 0 -1 319 -1.6417410224676132e-03 + + 2.5774860382080078e-01 5.5769157409667969e-01 + <_> + + 0 -1 320 3.4113149158656597e-03 + + 2.9507490992546082e-01 5.5141717195510864e-01 + <_> + + 0 -1 321 -1.1069320142269135e-02 + + 7.5693589448928833e-01 4.4770789146423340e-01 + <_> + + 0 -1 322 3.4865971654653549e-02 + + 5.5837088823318481e-01 2.6696211099624634e-01 + <_> + + 0 -1 323 6.5701099811121821e-04 + + 5.6273132562637329e-01 2.9888901114463806e-01 + <_> + + 0 -1 324 -2.4339130148291588e-02 + + 2.7711850404739380e-01 5.1088631153106689e-01 + <_> + + 0 -1 325 5.9435202274471521e-04 + + 5.5806517601013184e-01 3.1203418970108032e-01 + <_> + + 0 -1 326 2.2971509024500847e-03 + + 3.3302500844001770e-01 5.6790757179260254e-01 + <_> + + 0 -1 327 -3.7801829166710377e-03 + + 2.9905349016189575e-01 5.3448081016540527e-01 + <_> + + 0 -1 328 -1.3420669734477997e-01 + + 1.4638589322566986e-01 5.3925681114196777e-01 + <_> + + 0 -1 329 7.5224548345431685e-04 + + 3.7469539046287537e-01 5.6927347183227539e-01 + <_> + + 0 -1 330 -4.0545541793107986e-02 + + 2.7547478675842285e-01 5.4842978715896606e-01 + <_> + + 0 -1 331 1.2572970008477569e-03 + + 3.7445840239524841e-01 5.7560759782791138e-01 + <_> + + 0 -1 332 -7.4249948374927044e-03 + + 7.5138592720031738e-01 4.7282311320304871e-01 + <_> + + 0 -1 333 5.0908129196614027e-04 + + 5.4048967361450195e-01 2.9323211312294006e-01 + <_> + + 0 -1 334 -1.2808450264856219e-03 + + 6.1697798967361450e-01 4.2733490467071533e-01 + <_> + + 0 -1 335 -1.8348860321566463e-03 + + 2.0484960079193115e-01 5.2064722776412964e-01 + <_> + + 0 -1 336 2.7484869584441185e-02 + + 5.2529847621917725e-01 1.6755220293998718e-01 + <_> + + 0 -1 337 2.2372419480234385e-03 + + 5.2677828073501587e-01 2.7776581048965454e-01 + <_> + + 0 -1 338 -8.8635291904211044e-03 + + 6.9545578956604004e-01 4.8120489716529846e-01 + <_> + + 0 -1 339 4.1753971017897129e-03 + + 4.2918878793716431e-01 6.3491958379745483e-01 + <_> + + 0 -1 340 -1.7098189564421773e-03 + + 2.9305368661880493e-01 5.3612488508224487e-01 + <_> + + 0 -1 341 6.5328548662364483e-03 + + 4.4953250885009766e-01 7.4096941947937012e-01 + <_> + + 0 -1 342 -9.5372907817363739e-03 + + 3.1491199135780334e-01 5.4165017604827881e-01 + <_> + + 0 -1 343 2.5310989469289780e-02 + + 5.1218920946121216e-01 1.3117079436779022e-01 + <_> + + 0 -1 344 3.6460969597101212e-02 + + 5.1759117841720581e-01 2.5913399457931519e-01 + <_> + + 0 -1 345 2.0854329690337181e-02 + + 5.1371401548385620e-01 1.5823160111904144e-01 + <_> + + 0 -1 346 -8.7207747856155038e-04 + + 5.5743098258972168e-01 4.3989789485931396e-01 + <_> + + 0 -1 347 -1.5227000403683633e-05 + + 5.5489408969879150e-01 3.7080699205398560e-01 + <_> + + 0 -1 348 -8.4316509310156107e-04 + + 3.3874198794364929e-01 5.5542111396789551e-01 + <_> + + 0 -1 349 3.6037859972566366e-03 + + 5.3580617904663086e-01 3.4111711382865906e-01 + <_> + + 0 -1 350 -6.8057891912758350e-03 + + 6.1252027750015259e-01 4.3458628654479980e-01 + <_> + + 0 -1 351 -4.7021660953760147e-02 + + 2.3581659793853760e-01 5.1937389373779297e-01 + <_> + + 0 -1 352 -3.6954108625650406e-02 + + 7.3231112957000732e-01 4.7609439492225647e-01 + <_> + + 0 -1 353 1.0439479956403375e-03 + + 5.4194551706314087e-01 3.4113308787345886e-01 + <_> + + 0 -1 354 -2.1050689974799752e-04 + + 2.8216940164566040e-01 5.5549472570419312e-01 + <_> + + 0 -1 355 -8.0831587314605713e-02 + + 9.1299301385879517e-01 4.6974349021911621e-01 + <_> + + 0 -1 356 -3.6579059087671340e-04 + + 6.0226702690124512e-01 3.9782929420471191e-01 + <_> + + 0 -1 357 -1.2545920617412776e-04 + + 5.6132131814956665e-01 3.8455399870872498e-01 + <_> + + 0 -1 358 -6.8786486983299255e-02 + + 2.2616119682788849e-01 5.3004968166351318e-01 + <_> + + 0 -1 359 1.2415789999067783e-02 + + 4.0756919980049133e-01 5.8288121223449707e-01 + <_> + + 0 -1 360 -4.7174817882478237e-03 + + 2.8272539377212524e-01 5.2677577733993530e-01 + <_> + + 0 -1 361 3.8136858493089676e-02 + + 5.0747412443161011e-01 1.0236159712076187e-01 + <_> + + 0 -1 362 -2.8168049175292253e-03 + + 6.1690068244934082e-01 4.3596929311752319e-01 + <_> + + 0 -1 363 8.1303603947162628e-03 + + 4.5244330167770386e-01 7.6060950756072998e-01 + <_> + + 0 -1 364 6.0056019574403763e-03 + + 5.2404087781906128e-01 1.8597120046615601e-01 + <_> + + 0 -1 365 1.9139319658279419e-02 + + 5.2093791961669922e-01 2.3320719599723816e-01 + <_> + + 0 -1 366 1.6445759683847427e-02 + + 5.4507029056549072e-01 3.2642349600791931e-01 + <_> + + 0 -1 367 -3.7356890738010406e-02 + + 6.9990468025207520e-01 4.5332419872283936e-01 + <_> + + 0 -1 368 -1.9727900624275208e-02 + + 2.6536649465560913e-01 5.4128098487854004e-01 + <_> + + 0 -1 369 6.6972579807043076e-03 + + 4.4805660843849182e-01 7.1386522054672241e-01 + <_> + + 0 -1 370 7.4457528535276651e-04 + + 4.2313501238822937e-01 5.4713201522827148e-01 + <_> + + 0 -1 371 1.1790640419349074e-03 + + 5.3417021036148071e-01 3.1304550170898438e-01 + <_> + + 0 -1 372 3.4980610013008118e-02 + + 5.1186597347259521e-01 3.4305301308631897e-01 + <_> + + 0 -1 373 5.6859792675822973e-04 + + 3.5321870446205139e-01 5.4686397314071655e-01 + <_> + + 0 -1 374 -1.1340649798512459e-02 + + 2.8423538804054260e-01 5.3487008810043335e-01 + <_> + + 0 -1 375 -6.6228108480572701e-03 + + 6.8836402893066406e-01 4.4926649332046509e-01 + <_> + + 0 -1 376 -8.0160330981016159e-03 + + 1.7098939418792725e-01 5.2243089675903320e-01 + <_> + + 0 -1 377 1.4206819469109178e-03 + + 5.2908462285995483e-01 2.9933831095695496e-01 + <_> + + 0 -1 378 -2.7801711112260818e-03 + + 6.4988541603088379e-01 4.4604998826980591e-01 + <_> + + 0 -1 379 -1.4747589593753219e-03 + + 3.2604381442070007e-01 5.3881132602691650e-01 + <_> + + 0 -1 380 -2.3830339312553406e-02 + + 7.5289410352706909e-01 4.8012199997901917e-01 + <_> + + 0 -1 381 6.9369790144264698e-03 + + 5.3351658582687378e-01 3.2614278793334961e-01 + <_> + + 0 -1 382 8.2806255668401718e-03 + + 4.5803940296173096e-01 5.7378298044204712e-01 + <_> + + 0 -1 383 -1.0439500212669373e-02 + + 2.5923201441764832e-01 5.2338278293609619e-01 + <_> + 80 + 3.9107288360595703e+01 + + <_> + + 0 -1 384 7.2006587870419025e-03 + + 3.2588860392570496e-01 6.8498080968856812e-01 + <_> + + 0 -1 385 -2.8593589086085558e-03 + + 5.8388811349868774e-01 2.5378298759460449e-01 + <_> + + 0 -1 386 6.8580528022721410e-04 + + 5.7080817222595215e-01 2.8124240040779114e-01 + <_> + + 0 -1 387 7.9580191522836685e-03 + + 2.5010511279106140e-01 5.5442607402801514e-01 + <_> + + 0 -1 388 -1.2124150525778532e-03 + + 2.3853680491447449e-01 5.4333502054214478e-01 + <_> + + 0 -1 389 7.9426132142543793e-03 + + 3.9550709724426270e-01 6.2207579612731934e-01 + <_> + + 0 -1 390 2.4630590341985226e-03 + + 5.6397080421447754e-01 2.9923579096794128e-01 + <_> + + 0 -1 391 -6.0396599583327770e-03 + + 2.1865129470825195e-01 5.4116767644882202e-01 + <_> + + 0 -1 392 -1.2988339876756072e-03 + + 2.3507060110569000e-01 5.3645849227905273e-01 + <_> + + 0 -1 393 2.2299369447864592e-04 + + 3.8041129708290100e-01 5.7296061515808105e-01 + <_> + + 0 -1 394 1.4654280385002494e-03 + + 2.5101679563522339e-01 5.2582687139511108e-01 + <_> + + 0 -1 395 -8.1210042117163539e-04 + + 5.9928238391876221e-01 3.8511589169502258e-01 + <_> + + 0 -1 396 -1.3836020370945334e-03 + + 5.6813961267471313e-01 3.6365869641304016e-01 + <_> + + 0 -1 397 -2.7936449274420738e-02 + + 1.4913170039653778e-01 5.3775602579116821e-01 + <_> + + 0 -1 398 -4.6919551095925272e-04 + + 3.6924299597740173e-01 5.5724847316741943e-01 + <_> + + 0 -1 399 -4.9829659983515739e-03 + + 6.7585092782974243e-01 4.5325040817260742e-01 + <_> + + 0 -1 400 1.8815309740602970e-03 + + 5.3680229187011719e-01 2.9325398802757263e-01 + <_> + + 0 -1 401 -1.9067550078034401e-02 + + 1.6493770480155945e-01 5.3300672769546509e-01 + <_> + + 0 -1 402 -4.6906559728085995e-03 + + 1.9639259576797485e-01 5.1193618774414062e-01 + <_> + + 0 -1 403 5.9777139686048031e-03 + + 4.6711719036102295e-01 7.0083981752395630e-01 + <_> + + 0 -1 404 -3.3303130418062210e-02 + + 1.1554169654846191e-01 5.1041620969772339e-01 + <_> + + 0 -1 405 9.0744107961654663e-02 + + 5.1496601104736328e-01 1.3061730563640594e-01 + <_> + + 0 -1 406 9.3555898638442159e-04 + + 3.6054810881614685e-01 5.4398590326309204e-01 + <_> + + 0 -1 407 1.4901650138199329e-02 + + 4.8862120509147644e-01 7.6875698566436768e-01 + <_> + + 0 -1 408 6.1594118596985936e-04 + + 5.3568130731582642e-01 3.2409390807151794e-01 + <_> + + 0 -1 409 -5.0670988857746124e-02 + + 1.8486219644546509e-01 5.2304041385650635e-01 + <_> + + 0 -1 410 6.8665749859064817e-04 + + 3.8405799865722656e-01 5.5179458856582642e-01 + <_> + + 0 -1 411 8.3712432533502579e-03 + + 4.2885640263557434e-01 6.1317539215087891e-01 + <_> + + 0 -1 412 -1.2953069526702166e-03 + + 2.9136741161346436e-01 5.2807378768920898e-01 + <_> + + 0 -1 413 -4.1941680014133453e-02 + + 7.5547999143600464e-01 4.8560309410095215e-01 + <_> + + 0 -1 414 -2.3529380559921265e-02 + + 2.8382799029350281e-01 5.2560812234878540e-01 + <_> + + 0 -1 415 4.0857449173927307e-02 + + 4.8709350824356079e-01 6.2772971391677856e-01 + <_> + + 0 -1 416 -2.5406869128346443e-02 + + 7.0997077226638794e-01 4.5750290155410767e-01 + <_> + + 0 -1 417 -4.1415440500713885e-04 + + 4.0308868885040283e-01 5.4694122076034546e-01 + <_> + + 0 -1 418 2.1824119612574577e-02 + + 4.5020240545272827e-01 6.7687010765075684e-01 + <_> + + 0 -1 419 1.4114039950072765e-02 + + 5.4428607225418091e-01 3.7917000055313110e-01 + <_> + + 0 -1 420 6.7214590671937913e-05 + + 4.2004638910293579e-01 5.8734762668609619e-01 + <_> + + 0 -1 421 -7.9417638480663300e-03 + + 3.7925618886947632e-01 5.5852657556533813e-01 + <_> + + 0 -1 422 -7.2144409641623497e-03 + + 7.2531038522720337e-01 4.6035489439964294e-01 + <_> + + 0 -1 423 2.5817339774221182e-03 + + 4.6933019161224365e-01 5.9002387523651123e-01 + <_> + + 0 -1 424 1.3409319519996643e-01 + + 5.1492130756378174e-01 1.8088449537754059e-01 + <_> + + 0 -1 425 2.2962710354477167e-03 + + 5.3997439146041870e-01 3.7178671360015869e-01 + <_> + + 0 -1 426 -2.1575849968940020e-03 + + 2.4084959924221039e-01 5.1488637924194336e-01 + <_> + + 0 -1 427 -4.9196188338100910e-03 + + 6.5735882520675659e-01 4.7387400269508362e-01 + <_> + + 0 -1 428 1.6267469618469477e-03 + + 4.1928219795227051e-01 6.3031142950057983e-01 + <_> + + 0 -1 429 3.3413388882763684e-04 + + 5.5402982234954834e-01 3.7021011114120483e-01 + <_> + + 0 -1 430 -2.6698080822825432e-02 + + 1.7109179496765137e-01 5.1014107465744019e-01 + <_> + + 0 -1 431 -3.0561879277229309e-02 + + 1.9042180478572845e-01 5.1687937974929810e-01 + <_> + + 0 -1 432 2.8511548880487680e-03 + + 4.4475069642066956e-01 6.3138538599014282e-01 + <_> + + 0 -1 433 -3.6211479455232620e-02 + + 2.4907270073890686e-01 5.3773492574691772e-01 + <_> + + 0 -1 434 -2.4115189444273710e-03 + + 5.3812432289123535e-01 3.6642369627952576e-01 + <_> + + 0 -1 435 -7.7253201743587852e-04 + + 5.5302321910858154e-01 3.5415500402450562e-01 + <_> + + 0 -1 436 2.9481729143299162e-04 + + 4.1326990723609924e-01 5.6672430038452148e-01 + <_> + + 0 -1 437 -6.2334560789167881e-03 + + 9.8787233233451843e-02 5.1986688375473022e-01 + <_> + + 0 -1 438 -2.6274729520082474e-02 + + 9.1127492487430573e-02 5.0281071662902832e-01 + <_> + + 0 -1 439 5.3212260827422142e-03 + + 4.7266489267349243e-01 6.2227207422256470e-01 + <_> + + 0 -1 440 -4.1129058226943016e-03 + + 2.1574570238590240e-01 5.1378047466278076e-01 + <_> + + 0 -1 441 3.2457809429615736e-03 + + 5.4107707738876343e-01 3.7217769026756287e-01 + <_> + + 0 -1 442 -1.6359709203243256e-02 + + 7.7878749370574951e-01 4.6852919459342957e-01 + <_> + + 0 -1 443 3.2166109303943813e-04 + + 5.4789870977401733e-01 4.2403739690780640e-01 + <_> + + 0 -1 444 6.4452440710738301e-04 + + 5.3305608034133911e-01 3.5013249516487122e-01 + <_> + + 0 -1 445 -7.8909732401371002e-03 + + 6.9235211610794067e-01 4.7265690565109253e-01 + <_> + + 0 -1 446 4.8336211591959000e-02 + + 5.0559002161026001e-01 7.5749203562736511e-02 + <_> + + 0 -1 447 -7.5178127735853195e-04 + + 3.7837418913841248e-01 5.5385738611221313e-01 + <_> + + 0 -1 448 -2.4953910615295172e-03 + + 3.0816510319709778e-01 5.3596121072769165e-01 + <_> + + 0 -1 449 -2.2385010961443186e-03 + + 6.6339588165283203e-01 4.6493428945541382e-01 + <_> + + 0 -1 450 -1.7988430336117744e-03 + + 6.5968447923660278e-01 4.3471878767013550e-01 + <_> + + 0 -1 451 8.7860915809869766e-03 + + 5.2318328619003296e-01 2.3155799508094788e-01 + <_> + + 0 -1 452 3.6715380847454071e-03 + + 5.2042502164840698e-01 2.9773768782615662e-01 + <_> + + 0 -1 453 -3.5336449742317200e-02 + + 7.2388780117034912e-01 4.8615050315856934e-01 + <_> + + 0 -1 454 -6.9189240457490087e-04 + + 3.1050220131874084e-01 5.2298247814178467e-01 + <_> + + 0 -1 455 -3.3946109469980001e-03 + + 3.1389680504798889e-01 5.2101737260818481e-01 + <_> + + 0 -1 456 9.8569283727556467e-04 + + 4.5365801453590393e-01 6.5850979089736938e-01 + <_> + + 0 -1 457 -5.0163101404905319e-02 + + 1.8044540286064148e-01 5.1989167928695679e-01 + <_> + + 0 -1 458 -2.2367259953171015e-03 + + 7.2557020187377930e-01 4.6513590216636658e-01 + <_> + + 0 -1 459 7.4326287722215056e-04 + + 4.4129210710525513e-01 5.8985459804534912e-01 + <_> + + 0 -1 460 -9.3485182151198387e-04 + + 3.5000529885292053e-01 5.3660178184509277e-01 + <_> + + 0 -1 461 1.7497939988970757e-02 + + 4.9121949076652527e-01 8.3152848482131958e-01 + <_> + + 0 -1 462 -1.5200000489130616e-03 + + 3.5702759027481079e-01 5.3705602884292603e-01 + <_> + + 0 -1 463 7.8003940870985389e-04 + + 4.3537721037864685e-01 5.9673351049423218e-01 + <_> + 103 + 5.0610481262207031e+01 + + <_> + + 0 -1 464 -9.9945552647113800e-03 + + 6.1625832319259644e-01 3.0545330047607422e-01 + <_> + + 0 -1 465 -1.1085229925811291e-03 + + 5.8182948827743530e-01 3.1555780768394470e-01 + <_> + + 0 -1 466 1.0364380432292819e-03 + + 2.5520521402359009e-01 5.6929117441177368e-01 + <_> + + 0 -1 467 6.8211311008781195e-04 + + 3.6850899457931519e-01 5.9349310398101807e-01 + <_> + + 0 -1 468 -6.8057340104132891e-04 + + 2.3323920369148254e-01 5.4747921228408813e-01 + <_> + + 0 -1 469 2.6068789884448051e-04 + + 3.2574570178985596e-01 5.6675457954406738e-01 + <_> + + 0 -1 470 5.1607372006401420e-04 + + 3.7447169423103333e-01 5.8454728126525879e-01 + <_> + + 0 -1 471 8.5007521556690335e-04 + + 3.4203711152076721e-01 5.5228072404861450e-01 + <_> + + 0 -1 472 -1.8607829697430134e-03 + + 2.8044199943542480e-01 5.3754240274429321e-01 + <_> + + 0 -1 473 -1.5033970121294260e-03 + + 2.5790509581565857e-01 5.4989522695541382e-01 + <_> + + 0 -1 474 2.3478909861296415e-03 + + 4.1751560568809509e-01 6.3137108087539673e-01 + <_> + + 0 -1 475 -2.8880240279249847e-04 + + 5.8651697635650635e-01 4.0526661276817322e-01 + <_> + + 0 -1 476 8.9405477046966553e-03 + + 5.2111411094665527e-01 2.3186540603637695e-01 + <_> + + 0 -1 477 -1.9327739253640175e-02 + + 2.7534329891204834e-01 5.2415257692337036e-01 + <_> + + 0 -1 478 -2.0202060113660991e-04 + + 5.7229787111282349e-01 3.6771959066390991e-01 + <_> + + 0 -1 479 2.1179069299250841e-03 + + 4.4661080837249756e-01 5.5424308776855469e-01 + <_> + + 0 -1 480 -1.7743760254234076e-03 + + 2.8132531046867371e-01 5.3009599447250366e-01 + <_> + + 0 -1 481 4.2234458960592747e-03 + + 4.3997099995613098e-01 5.7954281568527222e-01 + <_> + + 0 -1 482 -1.4375220052897930e-02 + + 2.9811179637908936e-01 5.2920591831207275e-01 + <_> + + 0 -1 483 -1.5349180437624454e-02 + + 7.7052152156829834e-01 4.7481718659400940e-01 + <_> + + 0 -1 484 1.5152279956964776e-05 + + 3.7188440561294556e-01 5.5768972635269165e-01 + <_> + + 0 -1 485 -9.1293919831514359e-03 + + 3.6151960492134094e-01 5.2867668867111206e-01 + <_> + + 0 -1 486 2.2512159775942564e-03 + + 5.3647047281265259e-01 3.4862980246543884e-01 + <_> + + 0 -1 487 -4.9696918576955795e-03 + + 6.9276517629623413e-01 4.6768361330032349e-01 + <_> + + 0 -1 488 -1.2829010374844074e-02 + + 7.7121537923812866e-01 4.6607351303100586e-01 + <_> + + 0 -1 489 -9.3660065904259682e-03 + + 3.3749839663505554e-01 5.3512877225875854e-01 + <_> + + 0 -1 490 3.2452319283038378e-03 + + 5.3251898288726807e-01 3.2896101474761963e-01 + <_> + + 0 -1 491 -1.1723560281097889e-02 + + 6.8376529216766357e-01 4.7543001174926758e-01 + <_> + + 0 -1 492 2.9257940695970319e-05 + + 3.5720878839492798e-01 5.3605020046234131e-01 + <_> + + 0 -1 493 -2.2244219508138485e-05 + + 5.5414271354675293e-01 3.5520640015602112e-01 + <_> + + 0 -1 494 5.0881509669125080e-03 + + 5.0708442926406860e-01 1.2564620375633240e-01 + <_> + + 0 -1 495 2.7429679408669472e-02 + + 5.2695602178573608e-01 1.6258180141448975e-01 + <_> + + 0 -1 496 -6.4142867922782898e-03 + + 7.1455889940261841e-01 4.5841971039772034e-01 + <_> + + 0 -1 497 3.3479959238320589e-03 + + 5.3986120223999023e-01 3.4946969151496887e-01 + <_> + + 0 -1 498 -8.2635492086410522e-02 + + 2.4391929805278778e-01 5.1602262258529663e-01 + <_> + + 0 -1 499 1.0261740535497665e-03 + + 3.8868919014930725e-01 5.7679080963134766e-01 + <_> + + 0 -1 500 -1.6307090409100056e-03 + + 3.3894580602645874e-01 5.3477007150650024e-01 + <_> + + 0 -1 501 2.4546680506318808e-03 + + 4.6014139056205750e-01 6.3872468471527100e-01 + <_> + + 0 -1 502 -9.9476519972085953e-04 + + 5.7698792219161987e-01 4.1203960776329041e-01 + <_> + + 0 -1 503 1.5409190207719803e-02 + + 4.8787090182304382e-01 7.0898222923278809e-01 + <_> + + 0 -1 504 1.1784400558099151e-03 + + 5.2635532617568970e-01 2.8952449560165405e-01 + <_> + + 0 -1 505 -2.7701919898390770e-02 + + 1.4988289773464203e-01 5.2196067571640015e-01 + <_> + + 0 -1 506 -2.9505399987101555e-02 + + 2.4893319234251976e-02 4.9998161196708679e-01 + <_> + + 0 -1 507 4.5159430010244250e-04 + + 5.4646229743957520e-01 4.0296629071235657e-01 + <_> + + 0 -1 508 7.1772639639675617e-03 + + 4.2710569500923157e-01 5.8662968873977661e-01 + <_> + + 0 -1 509 -7.4182048439979553e-02 + + 6.8741792440414429e-01 4.9190279841423035e-01 + <_> + + 0 -1 510 -1.7254160717129707e-02 + + 3.3706760406494141e-01 5.3487390279769897e-01 + <_> + + 0 -1 511 1.4851559884846210e-02 + + 4.6267929673194885e-01 6.1299049854278564e-01 + <_> + + 0 -1 512 1.0002000257372856e-02 + + 5.3461229801177979e-01 3.4234538674354553e-01 + <_> + + 0 -1 513 2.0138120744377375e-03 + + 4.6438300609588623e-01 5.8243042230606079e-01 + <_> + + 0 -1 514 1.5135470312088728e-03 + + 5.1963961124420166e-01 2.8561499714851379e-01 + <_> + + 0 -1 515 3.1381431035697460e-03 + + 4.8381629586219788e-01 5.9585297107696533e-01 + <_> + + 0 -1 516 -5.1450440660119057e-03 + + 8.9203029870986938e-01 4.7414121031761169e-01 + <_> + + 0 -1 517 -4.4736708514392376e-03 + + 2.0339429378509521e-01 5.3372788429260254e-01 + <_> + + 0 -1 518 1.9628470763564110e-03 + + 4.5716339349746704e-01 6.7258632183074951e-01 + <_> + + 0 -1 519 5.4260450415313244e-03 + + 5.2711081504821777e-01 2.8456708788871765e-01 + <_> + + 0 -1 520 4.9611460417509079e-04 + + 4.1383129358291626e-01 5.7185977697372437e-01 + <_> + + 0 -1 521 9.3728788197040558e-03 + + 5.2251511812210083e-01 2.8048470616340637e-01 + <_> + + 0 -1 522 6.0500897234305739e-04 + + 5.2367687225341797e-01 3.3145239949226379e-01 + <_> + + 0 -1 523 5.6792551185935736e-04 + + 4.5310598611831665e-01 6.2769711017608643e-01 + <_> + + 0 -1 524 2.4644339457154274e-02 + + 5.1308518648147583e-01 2.0171439647674561e-01 + <_> + + 0 -1 525 -1.0290450416505337e-02 + + 7.7865952253341675e-01 4.8766410350799561e-01 + <_> + + 0 -1 526 2.0629419013857841e-03 + + 4.2885988950729370e-01 5.8812642097473145e-01 + <_> + + 0 -1 527 -5.0519481301307678e-03 + + 3.5239779949188232e-01 5.2860087156295776e-01 + <_> + + 0 -1 528 -5.7692620903253555e-03 + + 6.8410861492156982e-01 4.5880940556526184e-01 + <_> + + 0 -1 529 -4.5789941214025021e-04 + + 3.5655200481414795e-01 5.4859781265258789e-01 + <_> + + 0 -1 530 -7.5918837683275342e-04 + + 3.3687931299209595e-01 5.2541971206665039e-01 + <_> + + 0 -1 531 -1.7737259622663260e-03 + + 3.4221610426902771e-01 5.4540151357650757e-01 + <_> + + 0 -1 532 -8.5610467940568924e-03 + + 6.5336120128631592e-01 4.4858568906784058e-01 + <_> + + 0 -1 533 1.7277270089834929e-03 + + 5.3075802326202393e-01 3.9253529906272888e-01 + <_> + + 0 -1 534 -2.8199609369039536e-02 + + 6.8574589490890503e-01 4.5885840058326721e-01 + <_> + + 0 -1 535 -1.7781109781935811e-03 + + 4.0378510951995850e-01 5.3698569536209106e-01 + <_> + + 0 -1 536 3.3177141449414194e-04 + + 5.3997987508773804e-01 3.7057501077651978e-01 + <_> + + 0 -1 537 2.6385399978607893e-03 + + 4.6654370427131653e-01 6.4527308940887451e-01 + <_> + + 0 -1 538 -2.1183069329708815e-03 + + 5.9147810935974121e-01 4.0646770596504211e-01 + <_> + + 0 -1 539 -1.4773289673030376e-02 + + 3.6420381069183350e-01 5.2947628498077393e-01 + <_> + + 0 -1 540 -1.6815440729260445e-02 + + 2.6642319560050964e-01 5.1449728012084961e-01 + <_> + + 0 -1 541 -6.3370140269398689e-03 + + 6.7795312404632568e-01 4.8520979285240173e-01 + <_> + + 0 -1 542 -4.4560048991115764e-05 + + 5.6139647960662842e-01 4.1530540585517883e-01 + <_> + + 0 -1 543 -1.0240620467811823e-03 + + 5.9644782543182373e-01 4.5663040876388550e-01 + <_> + + 0 -1 544 -2.3161689750850201e-03 + + 2.9761150479316711e-01 5.1881599426269531e-01 + <_> + + 0 -1 545 5.3217571973800659e-01 + + 5.1878392696380615e-01 2.2026319801807404e-01 + <_> + + 0 -1 546 -1.6643050312995911e-01 + + 1.8660229444503784e-01 5.0603431463241577e-01 + <_> + + 0 -1 547 1.1253529787063599e-01 + + 5.2121251821517944e-01 1.1850229650735855e-01 + <_> + + 0 -1 548 9.3046864494681358e-03 + + 4.5899370312690735e-01 6.8261492252349854e-01 + <_> + + 0 -1 549 -4.6255099587142467e-03 + + 3.0799409747123718e-01 5.2250087261199951e-01 + <_> + + 0 -1 550 -1.1116469651460648e-01 + + 2.1010440587997437e-01 5.0808018445968628e-01 + <_> + + 0 -1 551 -1.0888439603149891e-02 + + 5.7653552293777466e-01 4.7904640436172485e-01 + <_> + + 0 -1 552 5.8564301580190659e-03 + + 5.0651001930236816e-01 1.5635989606380463e-01 + <_> + + 0 -1 553 5.4854389280080795e-02 + + 4.9669149518013000e-01 7.2305107116699219e-01 + <_> + + 0 -1 554 -1.1197339743375778e-02 + + 2.1949790418148041e-01 5.0987982749938965e-01 + <_> + + 0 -1 555 4.4069071300327778e-03 + + 4.7784018516540527e-01 6.7709028720855713e-01 + <_> + + 0 -1 556 -6.3665293157100677e-02 + + 1.9363629817962646e-01 5.0810241699218750e-01 + <_> + + 0 -1 557 -9.8081491887569427e-03 + + 5.9990632534027100e-01 4.8103410005569458e-01 + <_> + + 0 -1 558 -2.1717099007219076e-03 + + 3.3383339643478394e-01 5.2354729175567627e-01 + <_> + + 0 -1 559 -1.3315520249307156e-02 + + 6.6170698404312134e-01 4.9192130565643311e-01 + <_> + + 0 -1 560 2.5442079640924931e-03 + + 4.4887441396713257e-01 6.0821849107742310e-01 + <_> + + 0 -1 561 1.2037839740514755e-02 + + 5.4093921184539795e-01 3.2924321293830872e-01 + <_> + + 0 -1 562 -2.0701050758361816e-02 + + 6.8191200494766235e-01 4.5949959754943848e-01 + <_> + + 0 -1 563 2.7608279138803482e-02 + + 4.6307921409606934e-01 5.7672828435897827e-01 + <_> + + 0 -1 564 1.2370620388537645e-03 + + 5.1653790473937988e-01 2.6350161433219910e-01 + <_> + + 0 -1 565 -3.7669338285923004e-02 + + 2.5363931059837341e-01 5.2789801359176636e-01 + <_> + + 0 -1 566 -1.8057259730994701e-03 + + 3.9851561188697815e-01 5.5175000429153442e-01 + <_> + 111 + 5.4620071411132812e+01 + + <_> + + 0 -1 567 4.4299028813838959e-03 + + 2.8910180926322937e-01 6.3352262973785400e-01 + <_> + + 0 -1 568 -2.3813319858163595e-03 + + 6.2117892503738403e-01 3.4774878621101379e-01 + <_> + + 0 -1 569 2.2915711160749197e-03 + + 2.2544120252132416e-01 5.5821180343627930e-01 + <_> + + 0 -1 570 9.9457940086722374e-04 + + 3.7117108702659607e-01 5.9300708770751953e-01 + <_> + + 0 -1 571 7.7164667891338468e-04 + + 5.6517201662063599e-01 3.3479958772659302e-01 + <_> + + 0 -1 572 -1.1386410333216190e-03 + + 3.0691260099411011e-01 5.5086308717727661e-01 + <_> + + 0 -1 573 -1.6403039626311511e-04 + + 5.7628279924392700e-01 3.6990478634834290e-01 + <_> + + 0 -1 574 2.9793529392918572e-05 + + 2.6442441344261169e-01 5.4379111528396606e-01 + <_> + + 0 -1 575 8.5774902254343033e-03 + + 5.0511389970779419e-01 1.7957249283790588e-01 + <_> + + 0 -1 576 -2.6032689493149519e-04 + + 5.8269691467285156e-01 4.4468268752098083e-01 + <_> + + 0 -1 577 -6.1404630541801453e-03 + + 3.1138521432876587e-01 5.3469717502593994e-01 + <_> + + 0 -1 578 -2.3086950182914734e-02 + + 3.2779461145401001e-01 5.3311979770660400e-01 + <_> + + 0 -1 579 -1.4243650250136852e-02 + + 7.3817098140716553e-01 4.5880630612373352e-01 + <_> + + 0 -1 580 1.9487129524350166e-02 + + 5.2566307783126831e-01 2.2744719684123993e-01 + <_> + + 0 -1 581 -9.6681108698248863e-04 + + 5.5112308263778687e-01 3.8150069117546082e-01 + <_> + + 0 -1 582 3.1474709976464510e-03 + + 5.4256367683410645e-01 2.5437268614768982e-01 + <_> + + 0 -1 583 -1.8026070029009134e-04 + + 5.3801918029785156e-01 3.4063041210174561e-01 + <_> + + 0 -1 584 -6.0266260989010334e-03 + + 3.0358019471168518e-01 5.4205721616744995e-01 + <_> + + 0 -1 585 4.4462960795499384e-04 + + 3.9909970760345459e-01 5.6601101160049438e-01 + <_> + + 0 -1 586 2.2609760053455830e-03 + + 5.5628067255020142e-01 3.9406880736351013e-01 + <_> + + 0 -1 587 5.1133058965206146e-02 + + 4.6096539497375488e-01 7.1185618638992310e-01 + <_> + + 0 -1 588 -1.7786309123039246e-02 + + 2.3161660134792328e-01 5.3221440315246582e-01 + <_> + + 0 -1 589 -4.9679628573358059e-03 + + 2.3307719826698303e-01 5.1220291852951050e-01 + <_> + + 0 -1 590 2.0667689386755228e-03 + + 4.6574440598487854e-01 6.4554882049560547e-01 + <_> + + 0 -1 591 7.4413768015801907e-03 + + 5.1543921232223511e-01 2.3616339266300201e-01 + <_> + + 0 -1 592 -3.6277279723435640e-03 + + 6.2197732925415039e-01 4.4766610860824585e-01 + <_> + + 0 -1 593 -5.3530759178102016e-03 + + 1.8373550474643707e-01 5.1022082567214966e-01 + <_> + + 0 -1 594 1.4530919492244720e-01 + + 5.1459872722625732e-01 1.5359309315681458e-01 + <_> + + 0 -1 595 2.4394490756094456e-03 + + 5.3436601161956787e-01 3.6246618628501892e-01 + <_> + + 0 -1 596 -3.1283390708267689e-03 + + 6.2150079011917114e-01 4.8455920815467834e-01 + <_> + + 0 -1 597 1.7940260004252195e-03 + + 4.2992618680000305e-01 5.8241981267929077e-01 + <_> + + 0 -1 598 3.6253821104764938e-02 + + 5.2603340148925781e-01 1.4394679665565491e-01 + <_> + + 0 -1 599 -5.1746722310781479e-03 + + 3.5065388679504395e-01 5.2870452404022217e-01 + <_> + + 0 -1 600 6.5383297624066472e-04 + + 4.8096409440040588e-01 6.1220401525497437e-01 + <_> + + 0 -1 601 -2.6480229571461678e-02 + + 1.1393620073795319e-01 5.0455862283706665e-01 + <_> + + 0 -1 602 -3.0440660193562508e-03 + + 6.3520950078964233e-01 4.7947341203689575e-01 + <_> + + 0 -1 603 3.6993520334362984e-03 + + 5.1311182975769043e-01 2.4985109269618988e-01 + <_> + + 0 -1 604 -3.6762931267730892e-04 + + 5.4213947057723999e-01 3.7095320224761963e-01 + <_> + + 0 -1 605 -4.1382260620594025e-02 + + 1.8949599564075470e-01 5.0816917419433594e-01 + <_> + + 0 -1 606 -1.0532729793339968e-03 + + 6.4543670415878296e-01 4.7836089134216309e-01 + <_> + + 0 -1 607 -2.1648600231856108e-03 + + 6.2150311470031738e-01 4.4998261332511902e-01 + <_> + + 0 -1 608 -5.6747748749330640e-04 + + 3.7126109004020691e-01 5.4193347692489624e-01 + <_> + + 0 -1 609 1.7375840246677399e-01 + + 5.0236439704895020e-01 1.2157420068979263e-01 + <_> + + 0 -1 610 -2.9049699660390615e-03 + + 3.2402679324150085e-01 5.3818839788436890e-01 + <_> + + 0 -1 611 1.2299539521336555e-03 + + 4.1655078530311584e-01 5.7034862041473389e-01 + <_> + + 0 -1 612 -5.4329237900674343e-04 + + 3.8540428876876831e-01 5.5475491285324097e-01 + <_> + + 0 -1 613 -8.3297258242964745e-03 + + 2.2044940292835236e-01 5.0970828533172607e-01 + <_> + + 0 -1 614 -1.0417630255687982e-04 + + 5.6070661544799805e-01 4.3030360341072083e-01 + <_> + + 0 -1 615 3.1204700469970703e-02 + + 4.6216571331024170e-01 6.9820040464401245e-01 + <_> + + 0 -1 616 7.8943502157926559e-03 + + 5.2695941925048828e-01 2.2690680623054504e-01 + <_> + + 0 -1 617 -4.3645310215651989e-03 + + 6.3592231273651123e-01 4.5379561185836792e-01 + <_> + + 0 -1 618 7.6793059706687927e-03 + + 5.2747678756713867e-01 2.7404838800430298e-01 + <_> + + 0 -1 619 -2.5431139394640923e-02 + + 2.0385199785232544e-01 5.0717329978942871e-01 + <_> + + 0 -1 620 8.2000601105391979e-04 + + 4.5874550938606262e-01 6.1198681592941284e-01 + <_> + + 0 -1 621 2.9284600168466568e-03 + + 5.0712740421295166e-01 2.0282049477100372e-01 + <_> + + 0 -1 622 4.5256470912136137e-05 + + 4.8121041059494019e-01 5.4308217763900757e-01 + <_> + + 0 -1 623 1.3158309739083052e-03 + + 4.6258139610290527e-01 6.7793232202529907e-01 + <_> + + 0 -1 624 1.5870389761403203e-03 + + 5.3862917423248291e-01 3.4314650297164917e-01 + <_> + + 0 -1 625 -2.1539660170674324e-02 + + 2.5942500680685043e-02 5.0032228231430054e-01 + <_> + + 0 -1 626 1.4334480278193951e-02 + + 5.2028447389602661e-01 1.5906329452991486e-01 + <_> + + 0 -1 627 -8.3881383761763573e-03 + + 7.2824811935424805e-01 4.6480441093444824e-01 + <_> + + 0 -1 628 9.1906841844320297e-03 + + 5.5623567104339600e-01 3.9231911301612854e-01 + <_> + + 0 -1 629 -5.8453059755265713e-03 + + 6.8033927679061890e-01 4.6291279792785645e-01 + <_> + + 0 -1 630 -5.4707799106836319e-02 + + 2.5616711378097534e-01 5.2061259746551514e-01 + <_> + + 0 -1 631 9.1142775490880013e-03 + + 5.1896202564239502e-01 3.0538770556449890e-01 + <_> + + 0 -1 632 -1.5575000084936619e-02 + + 1.2950749695301056e-01 5.1690948009490967e-01 + <_> + + 0 -1 633 -1.2050600344082341e-04 + + 5.7350981235504150e-01 4.2308250069618225e-01 + <_> + + 0 -1 634 1.2273970060050488e-03 + + 5.2898782491683960e-01 4.0797919034957886e-01 + <_> + + 0 -1 635 -1.2186600361019373e-03 + + 6.5756398439407349e-01 4.5744091272354126e-01 + <_> + + 0 -1 636 -3.3256649039685726e-03 + + 3.6280471086502075e-01 5.1950198411941528e-01 + <_> + + 0 -1 637 -1.3288309797644615e-02 + + 1.2842659652233124e-01 5.0434887409210205e-01 + <_> + + 0 -1 638 -3.3839771058410406e-03 + + 6.2922400236129761e-01 4.7575059533119202e-01 + <_> + + 0 -1 639 -2.1954220533370972e-01 + + 1.4877319335937500e-01 5.0650137662887573e-01 + <_> + + 0 -1 640 4.9111708067357540e-03 + + 4.2561021447181702e-01 5.6658387184143066e-01 + <_> + + 0 -1 641 -1.8744950648397207e-04 + + 4.0041440725326538e-01 5.5868571996688843e-01 + <_> + + 0 -1 642 -5.2178641781210899e-03 + + 6.0091161727905273e-01 4.8127061128616333e-01 + <_> + + 0 -1 643 -1.1111519997939467e-03 + + 3.5149338841438293e-01 5.2870899438858032e-01 + <_> + + 0 -1 644 4.4036400504410267e-03 + + 4.6422758698463440e-01 5.9240859746932983e-01 + <_> + + 0 -1 645 1.2299499660730362e-01 + + 5.0255292654037476e-01 6.9152481853961945e-02 + <_> + + 0 -1 646 -1.2313510291278362e-02 + + 5.8845919370651245e-01 4.9340128898620605e-01 + <_> + + 0 -1 647 4.1471039876341820e-03 + + 4.3722391128540039e-01 5.8934777975082397e-01 + <_> + + 0 -1 648 -3.5502649843692780e-03 + + 4.3275511264801025e-01 5.3962701559066772e-01 + <_> + + 0 -1 649 -1.9224269315600395e-02 + + 1.9131340086460114e-01 5.0683307647705078e-01 + <_> + + 0 -1 650 1.4395059552043676e-03 + + 5.3081780672073364e-01 4.2435330152511597e-01 + <_> + + 0 -1 651 -6.7751999013125896e-03 + + 6.3653957843780518e-01 4.5400860905647278e-01 + <_> + + 0 -1 652 7.0119630545377731e-03 + + 5.1898342370986938e-01 3.0261999368667603e-01 + <_> + + 0 -1 653 5.4014651104807854e-03 + + 5.1050621271133423e-01 2.5576829910278320e-01 + <_> + + 0 -1 654 9.0274988906458020e-04 + + 4.6969148516654968e-01 5.8618277311325073e-01 + <_> + + 0 -1 655 1.1474450118839741e-02 + + 5.0536459684371948e-01 1.5271779894828796e-01 + <_> + + 0 -1 656 -6.7023430019617081e-03 + + 6.5089809894561768e-01 4.8906040191650391e-01 + <_> + + 0 -1 657 -2.0462959073483944e-03 + + 6.2418168783187866e-01 4.5146000385284424e-01 + <_> + + 0 -1 658 -9.9951568990945816e-03 + + 3.4327811002731323e-01 5.4009538888931274e-01 + <_> + + 0 -1 659 -3.5700708627700806e-02 + + 1.8780590593814850e-01 5.0740778446197510e-01 + <_> + + 0 -1 660 4.5584561303257942e-04 + + 3.8052770495414734e-01 5.4025697708129883e-01 + <_> + + 0 -1 661 -5.4260600358247757e-02 + + 6.8437147140502930e-01 4.5950970053672791e-01 + <_> + + 0 -1 662 6.0600461438298225e-03 + + 5.5029052495956421e-01 4.5005279779434204e-01 + <_> + + 0 -1 663 -6.4791832119226456e-03 + + 3.3688580989837646e-01 5.3107571601867676e-01 + <_> + + 0 -1 664 -1.4939469983801246e-03 + + 6.4876401424407959e-01 4.7561758756637573e-01 + <_> + + 0 -1 665 1.4610530342906713e-05 + + 4.0345790982246399e-01 5.4510641098022461e-01 + <_> + + 0 -1 666 -7.2321938350796700e-03 + + 6.3868737220764160e-01 4.8247399926185608e-01 + <_> + + 0 -1 667 -4.0645818226039410e-03 + + 2.9864218831062317e-01 5.1573359966278076e-01 + <_> + + 0 -1 668 3.0463080853223801e-02 + + 5.0221997499465942e-01 7.1599560976028442e-01 + <_> + + 0 -1 669 -8.0544911324977875e-03 + + 6.4924520254135132e-01 4.6192750334739685e-01 + <_> + + 0 -1 670 3.9505138993263245e-02 + + 5.1505708694458008e-01 2.4506139755249023e-01 + <_> + + 0 -1 671 8.4530208259820938e-03 + + 4.5736691355705261e-01 6.3940370082855225e-01 + <_> + + 0 -1 672 -1.1688120430335402e-03 + + 3.8655120134353638e-01 5.4836612939834595e-01 + <_> + + 0 -1 673 2.8070670086890459e-03 + + 5.1285791397094727e-01 2.7014800906181335e-01 + <_> + + 0 -1 674 4.7365209320560098e-04 + + 4.0515819191932678e-01 5.3874611854553223e-01 + <_> + + 0 -1 675 1.1741080321371555e-02 + + 5.2959501743316650e-01 3.7194138765335083e-01 + <_> + + 0 -1 676 3.1833238899707794e-03 + + 4.7894069552421570e-01 6.8951261043548584e-01 + <_> + + 0 -1 677 7.0241501089185476e-04 + + 5.3844892978668213e-01 3.9180809259414673e-01 + <_> + 102 + 5.0169731140136719e+01 + + <_> + + 0 -1 678 1.7059929668903351e-02 + + 3.9485278725624084e-01 7.1425348520278931e-01 + <_> + + 0 -1 679 2.1840840578079224e-02 + + 3.3703160285949707e-01 6.0900169610977173e-01 + <_> + + 0 -1 680 2.4520049919374287e-04 + + 3.5005760192871094e-01 5.9879022836685181e-01 + <_> + + 0 -1 681 8.3272606134414673e-03 + + 3.2675281167030334e-01 5.6972408294677734e-01 + <_> + + 0 -1 682 5.7148298947140574e-04 + + 3.0445998907089233e-01 5.5316567420959473e-01 + <_> + + 0 -1 683 6.7373987985774875e-04 + + 3.6500120162963867e-01 5.6726312637329102e-01 + <_> + + 0 -1 684 3.4681590477703139e-05 + + 3.3135411143302917e-01 5.3887271881103516e-01 + <_> + + 0 -1 685 -5.8563398197293282e-03 + + 2.6979428529739380e-01 5.4987788200378418e-01 + <_> + + 0 -1 686 8.5102273151278496e-03 + + 5.2693581581115723e-01 2.7628791332244873e-01 + <_> + + 0 -1 687 -6.9817207753658295e-02 + + 2.9096031188964844e-01 5.2592468261718750e-01 + <_> + + 0 -1 688 -8.6113670840859413e-04 + + 5.8925771713256836e-01 4.0736979246139526e-01 + <_> + + 0 -1 689 9.7149249631911516e-04 + + 3.5235640406608582e-01 5.4158622026443481e-01 + <_> + + 0 -1 690 -1.4727490452060010e-05 + + 5.4230177402496338e-01 3.5031560063362122e-01 + <_> + + 0 -1 691 4.8420291393995285e-02 + + 5.1939457654953003e-01 3.4111958742141724e-01 + <_> + + 0 -1 692 1.3257140526548028e-03 + + 3.1577691435813904e-01 5.3353762626647949e-01 + <_> + + 0 -1 693 1.4922149603080470e-05 + + 4.4512999057769775e-01 5.5365538597106934e-01 + <_> + + 0 -1 694 -2.7173398993909359e-03 + + 3.0317419767379761e-01 5.2480888366699219e-01 + <_> + + 0 -1 695 2.9219500720500946e-03 + + 4.7814530134201050e-01 6.6060417890548706e-01 + <_> + + 0 -1 696 -1.9804988987743855e-03 + + 3.1863081455230713e-01 5.2876251935958862e-01 + <_> + + 0 -1 697 -4.0012109093368053e-03 + + 6.4135968685150146e-01 4.7499281167984009e-01 + <_> + + 0 -1 698 -4.3491991236805916e-03 + + 1.5074980258941650e-01 5.0989967584609985e-01 + <_> + + 0 -1 699 1.3490889687091112e-03 + + 4.3161588907241821e-01 5.8811670541763306e-01 + <_> + + 0 -1 700 1.8597070127725601e-02 + + 4.7355538606643677e-01 9.0897941589355469e-01 + <_> + + 0 -1 701 -1.8562379991635680e-03 + + 3.5531890392303467e-01 5.5778372287750244e-01 + <_> + + 0 -1 702 2.2940430790185928e-03 + + 4.5000949501991272e-01 6.5808779001235962e-01 + <_> + + 0 -1 703 2.9982850537635386e-04 + + 5.6292420625686646e-01 3.9758789539337158e-01 + <_> + + 0 -1 704 3.5455459728837013e-03 + + 5.3815472126007080e-01 3.6054858565330505e-01 + <_> + + 0 -1 705 9.6104722470045090e-03 + + 5.2559971809387207e-01 1.7967459559440613e-01 + <_> + + 0 -1 706 -6.2783220782876015e-03 + + 2.2728569805622101e-01 5.1140302419662476e-01 + <_> + + 0 -1 707 3.4598479978740215e-03 + + 4.6263080835342407e-01 6.6082191467285156e-01 + <_> + + 0 -1 708 -1.3112019514665008e-03 + + 6.3175398111343384e-01 4.4368579983711243e-01 + <_> + + 0 -1 709 2.6876179035753012e-03 + + 5.4211097955703735e-01 4.0540221333503723e-01 + <_> + + 0 -1 710 3.9118169806897640e-03 + + 5.3584778308868408e-01 3.2734549045562744e-01 + <_> + + 0 -1 711 -1.4206450432538986e-02 + + 7.7935767173767090e-01 4.9757811427116394e-01 + <_> + + 0 -1 712 7.1705528534948826e-04 + + 5.2973198890686035e-01 3.5609039664268494e-01 + <_> + + 0 -1 713 1.6635019565001130e-03 + + 4.6780940890312195e-01 5.8164817094802856e-01 + <_> + + 0 -1 714 3.3686188980937004e-03 + + 5.2767342329025269e-01 3.4464201331138611e-01 + <_> + + 0 -1 715 1.2799530290067196e-02 + + 4.8346799612045288e-01 7.4721592664718628e-01 + <_> + + 0 -1 716 3.3901201095432043e-03 + + 4.5118591189384460e-01 6.4017212390899658e-01 + <_> + + 0 -1 717 4.7070779837667942e-03 + + 5.3356587886810303e-01 3.5552209615707397e-01 + <_> + + 0 -1 718 1.4819339849054813e-03 + + 4.2507070302963257e-01 5.7727241516113281e-01 + <_> + + 0 -1 719 -6.9995759986341000e-03 + + 3.0033200979232788e-01 5.2929002046585083e-01 + <_> + + 0 -1 720 1.5939010307192802e-02 + + 5.0673192739486694e-01 1.6755819320678711e-01 + <_> + + 0 -1 721 7.6377349905669689e-03 + + 4.7950699925422668e-01 7.0856010913848877e-01 + <_> + + 0 -1 722 6.7334040068089962e-03 + + 5.1331132650375366e-01 2.1624700725078583e-01 + <_> + + 0 -1 723 -1.2858809903264046e-02 + + 1.9388419389724731e-01 5.2513718605041504e-01 + <_> + + 0 -1 724 -6.2270800117403269e-04 + + 5.6865382194519043e-01 4.1978681087493896e-01 + <_> + + 0 -1 725 -5.2651681471616030e-04 + + 4.2241689562797546e-01 5.4296958446502686e-01 + <_> + + 0 -1 726 1.1075099930167198e-02 + + 5.1137751340866089e-01 2.5145179033279419e-01 + <_> + + 0 -1 727 -3.6728251725435257e-02 + + 7.1946620941162109e-01 4.8496189713478088e-01 + <_> + + 0 -1 728 -2.8207109426148236e-04 + + 3.8402619957923889e-01 5.3944462537765503e-01 + <_> + + 0 -1 729 -2.7489690110087395e-03 + + 5.9370887279510498e-01 4.5691820979118347e-01 + <_> + + 0 -1 730 1.0047519579529762e-02 + + 5.1385760307312012e-01 2.8022980690002441e-01 + <_> + + 0 -1 731 -8.1497840583324432e-03 + + 6.0900372266769409e-01 4.6361210942268372e-01 + <_> + + 0 -1 732 -6.8833888508379459e-03 + + 3.4586110711097717e-01 5.2546602487564087e-01 + <_> + + 0 -1 733 -1.4039360394235700e-05 + + 5.6931042671203613e-01 4.0820831060409546e-01 + <_> + + 0 -1 734 1.5498419525101781e-03 + + 4.3505370616912842e-01 5.8065170049667358e-01 + <_> + + 0 -1 735 -6.7841499112546444e-03 + + 1.4688730239868164e-01 5.1827752590179443e-01 + <_> + + 0 -1 736 2.1705629478674382e-04 + + 5.2935242652893066e-01 3.4561741352081299e-01 + <_> + + 0 -1 737 3.1198898795992136e-04 + + 4.6524509787559509e-01 5.9424138069152832e-01 + <_> + + 0 -1 738 5.4507530294358730e-03 + + 4.6535089612007141e-01 7.0248460769653320e-01 + <_> + + 0 -1 739 -2.5818689027801156e-04 + + 5.4972952604293823e-01 3.7689670920372009e-01 + <_> + + 0 -1 740 -1.7442539334297180e-02 + + 3.9190879464149475e-01 5.4574978351593018e-01 + <_> + + 0 -1 741 -4.5343529433012009e-02 + + 1.6313570737838745e-01 5.1549088954925537e-01 + <_> + + 0 -1 742 1.9190689781680703e-03 + + 5.1458978652954102e-01 2.7918958663940430e-01 + <_> + + 0 -1 743 -6.0177869163453579e-03 + + 6.5176361799240112e-01 4.7563329339027405e-01 + <_> + + 0 -1 744 -4.0720738470554352e-03 + + 5.5146527290344238e-01 4.0926858782768250e-01 + <_> + + 0 -1 745 3.9855059003457427e-04 + + 3.1652408838272095e-01 5.2855509519577026e-01 + <_> + + 0 -1 746 -6.5418570302426815e-03 + + 6.8533778190612793e-01 4.6528089046478271e-01 + <_> + + 0 -1 747 3.4845089539885521e-03 + + 5.4845881462097168e-01 4.5027598738670349e-01 + <_> + + 0 -1 748 -1.3696780428290367e-02 + + 6.3957798480987549e-01 4.5725551247596741e-01 + <_> + + 0 -1 749 -1.7347140237689018e-02 + + 2.7510729432106018e-01 5.1816147565841675e-01 + <_> + + 0 -1 750 -4.0885428898036480e-03 + + 3.3256360888481140e-01 5.1949840784072876e-01 + <_> + + 0 -1 751 -9.4687901437282562e-03 + + 5.9422808885574341e-01 4.8518198728561401e-01 + <_> + + 0 -1 752 1.7084840219467878e-03 + + 4.1671109199523926e-01 5.5198061466217041e-01 + <_> + + 0 -1 753 9.4809094443917274e-03 + + 5.4338949918746948e-01 4.2085149884223938e-01 + <_> + + 0 -1 754 -4.7389650717377663e-03 + + 6.4071899652481079e-01 4.5606550574302673e-01 + <_> + + 0 -1 755 6.5761050209403038e-03 + + 5.2145552635192871e-01 2.2582270205020905e-01 + <_> + + 0 -1 756 -2.1690549328923225e-03 + + 3.1515279412269592e-01 5.1567047834396362e-01 + <_> + + 0 -1 757 1.4660170301795006e-02 + + 4.8708370327949524e-01 6.6899412870407104e-01 + <_> + + 0 -1 758 1.7231999663636088e-04 + + 3.5697489976882935e-01 5.2510780096054077e-01 + <_> + + 0 -1 759 -2.1803760901093483e-02 + + 8.8259208202362061e-01 4.9663299322128296e-01 + <_> + + 0 -1 760 -9.4736106693744659e-02 + + 1.4461620151996613e-01 5.0611138343811035e-01 + <_> + + 0 -1 761 5.5825551971793175e-03 + + 5.3964787721633911e-01 4.2380660772323608e-01 + <_> + + 0 -1 762 1.9517090404406190e-03 + + 4.1704109311103821e-01 5.4977869987487793e-01 + <_> + + 0 -1 763 1.2149900197982788e-02 + + 4.6983671188354492e-01 5.6642740964889526e-01 + <_> + + 0 -1 764 -7.5169620104134083e-03 + + 6.2677729129791260e-01 4.4631358981132507e-01 + <_> + + 0 -1 765 -7.1667909622192383e-02 + + 3.0970111489295959e-01 5.2210032939910889e-01 + <_> + + 0 -1 766 -8.8292419910430908e-02 + + 8.1123888492584229e-02 5.0063651800155640e-01 + <_> + + 0 -1 767 3.1063079833984375e-02 + + 5.1555037498474121e-01 1.2822559475898743e-01 + <_> + + 0 -1 768 4.6621840447187424e-02 + + 4.6997779607772827e-01 7.3639607429504395e-01 + <_> + + 0 -1 769 -1.2189489789307117e-02 + + 3.9205300807952881e-01 5.5189967155456543e-01 + <_> + + 0 -1 770 1.3016110286116600e-02 + + 5.2606582641601562e-01 3.6851361393928528e-01 + <_> + + 0 -1 771 -3.4952899441123009e-03 + + 6.3392949104309082e-01 4.7162809967994690e-01 + <_> + + 0 -1 772 -4.4015039748046547e-05 + + 5.3330272436141968e-01 3.7761849164962769e-01 + <_> + + 0 -1 773 -1.0966490209102631e-01 + + 1.7653420567512512e-01 5.1983469724655151e-01 + <_> + + 0 -1 774 -9.0279558207839727e-04 + + 5.3241598606109619e-01 3.8389080762863159e-01 + <_> + + 0 -1 775 7.1126641705632210e-04 + + 4.6479299664497375e-01 5.7552242279052734e-01 + <_> + + 0 -1 776 -3.1250279862433672e-03 + + 3.2367089390754700e-01 5.1667708158493042e-01 + <_> + + 0 -1 777 2.4144679773598909e-03 + + 4.7874391078948975e-01 6.4597177505493164e-01 + <_> + + 0 -1 778 4.4391240226104856e-04 + + 4.4093081355094910e-01 6.0102558135986328e-01 + <_> + + 0 -1 779 -2.2611189342569560e-04 + + 4.0381139516830444e-01 5.4932558536529541e-01 + <_> + 135 + 6.6669120788574219e+01 + + <_> + + 0 -1 780 -4.6901289373636246e-02 + + 6.6001719236373901e-01 3.7438011169433594e-01 + <_> + + 0 -1 781 -1.4568349579349160e-03 + + 5.7839912176132202e-01 3.4377971291542053e-01 + <_> + + 0 -1 782 5.5598369799554348e-03 + + 3.6222669482231140e-01 5.9082162380218506e-01 + <_> + + 0 -1 783 7.3170487303286791e-04 + + 5.5004191398620605e-01 2.8735581040382385e-01 + <_> + + 0 -1 784 1.3318009441718459e-03 + + 2.6731699705123901e-01 5.4310190677642822e-01 + <_> + + 0 -1 785 2.4347059661522508e-04 + + 3.8550278544425964e-01 5.7413887977600098e-01 + <_> + + 0 -1 786 -3.0512469820678234e-03 + + 5.5032098293304443e-01 3.4628450870513916e-01 + <_> + + 0 -1 787 -6.8657199153676629e-04 + + 3.2912218570709229e-01 5.4295092821121216e-01 + <_> + + 0 -1 788 1.4668200165033340e-03 + + 3.5883820056915283e-01 5.3518110513687134e-01 + <_> + + 0 -1 789 3.2021870720200241e-04 + + 4.2968419194221497e-01 5.7002341747283936e-01 + <_> + + 0 -1 790 7.4122188379988074e-04 + + 5.2821648120880127e-01 3.3668708801269531e-01 + <_> + + 0 -1 791 3.8330298848450184e-03 + + 4.5595678687095642e-01 6.2573361396789551e-01 + <_> + + 0 -1 792 -1.5456439927220345e-02 + + 2.3501169681549072e-01 5.1294529438018799e-01 + <_> + + 0 -1 793 2.6796779129654169e-03 + + 5.3294152021408081e-01 4.1550621390342712e-01 + <_> + + 0 -1 794 2.8296569362282753e-03 + + 4.2730879783630371e-01 5.8045381307601929e-01 + <_> + + 0 -1 795 -3.9444249123334885e-03 + + 2.9126119613647461e-01 5.2026861906051636e-01 + <_> + + 0 -1 796 2.7179559692740440e-03 + + 5.3076881170272827e-01 3.5856771469116211e-01 + <_> + + 0 -1 797 5.9077627956867218e-03 + + 4.7037750482559204e-01 5.9415858983993530e-01 + <_> + + 0 -1 798 -4.2240349575877190e-03 + + 2.1415670216083527e-01 5.0887960195541382e-01 + <_> + + 0 -1 799 4.0725888684391975e-03 + + 4.7664138674736023e-01 6.8410611152648926e-01 + <_> + + 0 -1 800 1.0149530135095119e-02 + + 5.3607988357543945e-01 3.7484970688819885e-01 + <_> + + 0 -1 801 -1.8864999583456665e-04 + + 5.7201302051544189e-01 3.8538050651550293e-01 + <_> + + 0 -1 802 -4.8864358104765415e-03 + + 3.6931228637695312e-01 5.3409588336944580e-01 + <_> + + 0 -1 803 2.6158479973673820e-02 + + 4.9623748660087585e-01 6.0599899291992188e-01 + <_> + + 0 -1 804 4.8560759751126170e-04 + + 4.4389459490776062e-01 6.0124689340591431e-01 + <_> + + 0 -1 805 1.1268709786236286e-02 + + 5.2442502975463867e-01 1.8403880298137665e-01 + <_> + + 0 -1 806 -2.8114619199186563e-03 + + 6.0602837800979614e-01 4.4098970293998718e-01 + <_> + + 0 -1 807 -5.6112729944288731e-03 + + 3.8911709189414978e-01 5.5892372131347656e-01 + <_> + + 0 -1 808 8.5680093616247177e-03 + + 5.0693458318710327e-01 2.0626190304756165e-01 + <_> + + 0 -1 809 -3.8172779022715986e-04 + + 5.8822017908096313e-01 4.1926109790802002e-01 + <_> + + 0 -1 810 -1.7680290329735726e-04 + + 5.5336058139801025e-01 4.0033689141273499e-01 + <_> + + 0 -1 811 6.5112537704408169e-03 + + 3.3101469278335571e-01 5.4441910982131958e-01 + <_> + + 0 -1 812 -6.5948683186434209e-05 + + 5.4338318109512329e-01 3.9449059963226318e-01 + <_> + + 0 -1 813 6.9939051754772663e-03 + + 5.6003582477569580e-01 4.1927140951156616e-01 + <_> + + 0 -1 814 -4.6744439750909805e-03 + + 6.6854667663574219e-01 4.6049609780311584e-01 + <_> + + 0 -1 815 1.1589850299060345e-02 + + 5.3571212291717529e-01 2.9268300533294678e-01 + <_> + + 0 -1 816 1.3007840141654015e-02 + + 4.6798178553581238e-01 7.3074632883071899e-01 + <_> + + 0 -1 817 -1.1008579749614000e-03 + + 3.9375010132789612e-01 5.4150652885437012e-01 + <_> + + 0 -1 818 6.0472649056464434e-04 + + 4.2423760890960693e-01 5.6040412187576294e-01 + <_> + + 0 -1 819 -1.4494840055704117e-02 + + 3.6312100291252136e-01 5.2931827306747437e-01 + <_> + + 0 -1 820 -5.3056948818266392e-03 + + 6.8604522943496704e-01 4.6218210458755493e-01 + <_> + + 0 -1 821 -8.1829127157106996e-04 + + 3.9440968632698059e-01 5.4204392433166504e-01 + <_> + + 0 -1 822 -1.9077520817518234e-02 + + 1.9626219570636749e-01 5.0378918647766113e-01 + <_> + + 0 -1 823 3.5549470339901745e-04 + + 4.0862590074539185e-01 5.6139731407165527e-01 + <_> + + 0 -1 824 1.9679730758070946e-03 + + 4.4891211390495300e-01 5.9261232614517212e-01 + <_> + + 0 -1 825 6.9189141504466534e-03 + + 5.3359258174896240e-01 3.7283858656883240e-01 + <_> + + 0 -1 826 2.9872779268771410e-03 + + 5.1113212108612061e-01 2.9756438732147217e-01 + <_> + + 0 -1 827 -6.2264618463814259e-03 + + 5.5414897203445435e-01 4.8245379328727722e-01 + <_> + + 0 -1 828 1.3353300280869007e-02 + + 4.5864239335060120e-01 6.4147979021072388e-01 + <_> + + 0 -1 829 3.3505238592624664e-02 + + 5.3924250602722168e-01 3.4299948811531067e-01 + <_> + + 0 -1 830 -2.5294460356235504e-03 + + 1.7037139832973480e-01 5.0133150815963745e-01 + <_> + + 0 -1 831 -1.2801629491150379e-03 + + 5.3054618835449219e-01 4.6974050998687744e-01 + <_> + + 0 -1 832 7.0687388069927692e-03 + + 4.6155458688735962e-01 6.4365047216415405e-01 + <_> + + 0 -1 833 9.6880499040707946e-04 + + 4.8335990309715271e-01 6.0438942909240723e-01 + <_> + + 0 -1 834 3.9647659286856651e-03 + + 5.1876372098922729e-01 3.2318168878555298e-01 + <_> + + 0 -1 835 -2.2057730704545975e-02 + + 4.0792569518089294e-01 5.2009809017181396e-01 + <_> + + 0 -1 836 -6.6906312713399529e-04 + + 5.3316092491149902e-01 3.8156008720397949e-01 + <_> + + 0 -1 837 -6.7009328631684184e-04 + + 5.6554222106933594e-01 4.6889019012451172e-01 + <_> + + 0 -1 838 7.4284552829340100e-04 + + 4.5343810319900513e-01 6.2874001264572144e-01 + <_> + + 0 -1 839 2.2227810695767403e-03 + + 5.3506332635879517e-01 3.3036559820175171e-01 + <_> + + 0 -1 840 -5.4130521602928638e-03 + + 1.1136870086193085e-01 5.0054347515106201e-01 + <_> + + 0 -1 841 -1.4520040167553816e-05 + + 5.6287378072738647e-01 4.3251338601112366e-01 + <_> + + 0 -1 842 2.3369169502984732e-04 + + 4.1658350825309753e-01 5.4477912187576294e-01 + <_> + + 0 -1 843 4.2894547805190086e-03 + + 4.8603910207748413e-01 6.7786490917205811e-01 + <_> + + 0 -1 844 5.9103150852024555e-03 + + 5.2623051404953003e-01 3.6121138930320740e-01 + <_> + + 0 -1 845 1.2900539673864841e-02 + + 5.3193771839141846e-01 3.2502880692481995e-01 + <_> + + 0 -1 846 4.6982979401946068e-03 + + 4.6182450652122498e-01 6.6659259796142578e-01 + <_> + + 0 -1 847 1.0439859703183174e-02 + + 5.5056709051132202e-01 3.8836041092872620e-01 + <_> + + 0 -1 848 3.0443191062659025e-03 + + 4.6978530287742615e-01 7.3018449544906616e-01 + <_> + + 0 -1 849 -6.1593751888722181e-04 + + 3.8308390974998474e-01 5.4649841785430908e-01 + <_> + + 0 -1 850 -3.4247159492224455e-03 + + 2.5663000345230103e-01 5.0895309448242188e-01 + <_> + + 0 -1 851 -9.3538565561175346e-03 + + 6.4699661731719971e-01 4.9407958984375000e-01 + <_> + + 0 -1 852 5.2338998764753342e-02 + + 4.7459828853607178e-01 7.8787708282470703e-01 + <_> + + 0 -1 853 3.5765620414167643e-03 + + 5.3066647052764893e-01 2.7484980225563049e-01 + <_> + + 0 -1 854 7.1555317845195532e-04 + + 5.4131257534027100e-01 4.0419089794158936e-01 + <_> + + 0 -1 855 -1.0516679845750332e-02 + + 6.1585122346878052e-01 4.8152831196784973e-01 + <_> + + 0 -1 856 7.7347927726805210e-03 + + 4.6958059072494507e-01 7.0289808511734009e-01 + <_> + + 0 -1 857 -4.3226778507232666e-03 + + 2.8495660424232483e-01 5.3046840429306030e-01 + <_> + + 0 -1 858 -2.5534399319440126e-03 + + 7.0569849014282227e-01 4.6888920664787292e-01 + <_> + + 0 -1 859 1.0268510231981054e-04 + + 3.9029321074485779e-01 5.5734640359878540e-01 + <_> + + 0 -1 860 7.1395188570022583e-06 + + 3.6842319369316101e-01 5.2639877796173096e-01 + <_> + + 0 -1 861 -1.6711989883333445e-03 + + 3.8491758704185486e-01 5.3872710466384888e-01 + <_> + + 0 -1 862 4.9260449595749378e-03 + + 4.7297719120979309e-01 7.4472510814666748e-01 + <_> + + 0 -1 863 4.3908702209591866e-03 + + 4.8091810941696167e-01 5.5919218063354492e-01 + <_> + + 0 -1 864 -1.7793629318475723e-02 + + 6.9036781787872314e-01 4.6769270300865173e-01 + <_> + + 0 -1 865 2.0469669252634048e-03 + + 5.3706902265548706e-01 3.3081620931625366e-01 + <_> + + 0 -1 866 2.9891489073634148e-02 + + 5.1398652791976929e-01 3.3090591430664062e-01 + <_> + + 0 -1 867 1.5494900289922953e-03 + + 4.6602371335029602e-01 6.0783427953720093e-01 + <_> + + 0 -1 868 1.4956969534978271e-03 + + 4.4048359990119934e-01 5.8639198541641235e-01 + <_> + + 0 -1 869 9.5885928021743894e-04 + + 5.4359710216522217e-01 4.2085230350494385e-01 + <_> + + 0 -1 870 4.9643701640889049e-04 + + 5.3705781698226929e-01 4.0006220340728760e-01 + <_> + + 0 -1 871 -2.7280810754746199e-03 + + 5.6594127416610718e-01 4.2596429586410522e-01 + <_> + + 0 -1 872 2.3026480339467525e-03 + + 5.1616579294204712e-01 3.3508691191673279e-01 + <_> + + 0 -1 873 2.5151631236076355e-01 + + 4.8696619272232056e-01 7.1473097801208496e-01 + <_> + + 0 -1 874 -4.6328022144734859e-03 + + 2.7274489402770996e-01 5.0837898254394531e-01 + <_> + + 0 -1 875 -4.0434490889310837e-02 + + 6.8514388799667358e-01 5.0217670202255249e-01 + <_> + + 0 -1 876 1.4972220014897175e-05 + + 4.2844650149345398e-01 5.5225551128387451e-01 + <_> + + 0 -1 877 -2.4050309730228037e-04 + + 4.2261189222335815e-01 5.3900748491287231e-01 + <_> + + 0 -1 878 2.3657839745283127e-02 + + 4.7446319460868835e-01 7.5043660402297974e-01 + <_> + + 0 -1 879 -8.1449104472994804e-03 + + 4.2450588941574097e-01 5.5383628606796265e-01 + <_> + + 0 -1 880 -3.6992130335420370e-03 + + 5.9523570537567139e-01 4.5297130942344666e-01 + <_> + + 0 -1 881 -6.7718601785600185e-03 + + 4.1377940773963928e-01 5.4733997583389282e-01 + <_> + + 0 -1 882 4.2669530957937241e-03 + + 4.4841149449348450e-01 5.7979941368103027e-01 + <_> + + 0 -1 883 1.7791989957913756e-03 + + 5.6248587369918823e-01 4.4324448704719543e-01 + <_> + + 0 -1 884 1.6774770338088274e-03 + + 4.6377518773078918e-01 6.3642418384552002e-01 + <_> + + 0 -1 885 1.1732629500329494e-03 + + 4.5445030927658081e-01 5.9144157171249390e-01 + <_> + + 0 -1 886 8.6998171173036098e-04 + + 5.3347527980804443e-01 3.8859179615974426e-01 + <_> + + 0 -1 887 7.6378340600058436e-04 + + 5.3985852003097534e-01 3.7449419498443604e-01 + <_> + + 0 -1 888 1.5684569370932877e-04 + + 4.3178731203079224e-01 5.6146162748336792e-01 + <_> + + 0 -1 889 -2.1511370316147804e-02 + + 1.7859250307083130e-01 5.1855427026748657e-01 + <_> + + 0 -1 890 1.3081369979772717e-04 + + 4.3424990773200989e-01 5.6828498840332031e-01 + <_> + + 0 -1 891 2.1992040798068047e-02 + + 5.1617169380187988e-01 2.3793940246105194e-01 + <_> + + 0 -1 892 -8.0136500764638186e-04 + + 5.9867632389068604e-01 4.4664269685745239e-01 + <_> + + 0 -1 893 -8.2736099138855934e-03 + + 4.1082179546356201e-01 5.2510571479797363e-01 + <_> + + 0 -1 894 3.6831789184361696e-03 + + 5.1738142967224121e-01 3.3975180983543396e-01 + <_> + + 0 -1 895 -7.9525681212544441e-03 + + 6.8889832496643066e-01 4.8459240794181824e-01 + <_> + + 0 -1 896 1.5382299898192286e-03 + + 5.1785671710968018e-01 3.4541139006614685e-01 + <_> + + 0 -1 897 -1.4043530449271202e-02 + + 1.6784210503101349e-01 5.1886677742004395e-01 + <_> + + 0 -1 898 1.4315890148282051e-03 + + 4.3682569265365601e-01 5.6557738780975342e-01 + <_> + + 0 -1 899 -3.4014228731393814e-02 + + 7.8022962808609009e-01 4.9592170119285583e-01 + <_> + + 0 -1 900 -1.2027299962937832e-02 + + 1.5851010382175446e-01 5.0322318077087402e-01 + <_> + + 0 -1 901 1.3316619396209717e-01 + + 5.1633048057556152e-01 2.7551281452178955e-01 + <_> + + 0 -1 902 -1.5221949433907866e-03 + + 3.7283179163932800e-01 5.2145522832870483e-01 + <_> + + 0 -1 903 -9.3929271679371595e-04 + + 5.8383792638778687e-01 4.5111650228500366e-01 + <_> + + 0 -1 904 2.7719739824533463e-02 + + 4.7282868623733521e-01 7.3315447568893433e-01 + <_> + + 0 -1 905 3.1030150130391121e-03 + + 5.3022021055221558e-01 4.1015630960464478e-01 + <_> + + 0 -1 906 7.7861219644546509e-02 + + 4.9983340501785278e-01 1.2729619443416595e-01 + <_> + + 0 -1 907 -1.5854939818382263e-02 + + 5.0833359360694885e-02 5.1656562089920044e-01 + <_> + + 0 -1 908 -4.9725300632417202e-03 + + 6.7981338500976562e-01 4.6842318773269653e-01 + <_> + + 0 -1 909 -9.7676506265997887e-04 + + 6.0107719898223877e-01 4.7889319062232971e-01 + <_> + + 0 -1 910 -2.4647710379213095e-03 + + 3.3933979272842407e-01 5.2205038070678711e-01 + <_> + + 0 -1 911 -6.7937700077891350e-03 + + 4.3651369214057922e-01 5.2396631240844727e-01 + <_> + + 0 -1 912 3.2608021050691605e-02 + + 5.0527238845825195e-01 2.4252149462699890e-01 + <_> + + 0 -1 913 -5.8514421107247472e-04 + + 5.7339739799499512e-01 4.7585740685462952e-01 + <_> + + 0 -1 914 -2.9632600024342537e-02 + + 3.8922891020774841e-01 5.2635979652404785e-01 + <_> + 137 + 6.7698921203613281e+01 + + <_> + + 0 -1 915 4.6550851315259933e-02 + + 3.2769501209259033e-01 6.2405228614807129e-01 + <_> + + 0 -1 916 7.9537127166986465e-03 + + 4.2564851045608521e-01 6.9429391622543335e-01 + <_> + + 0 -1 917 6.8221561377868056e-04 + + 3.7114870548248291e-01 5.9007328748703003e-01 + <_> + + 0 -1 918 -1.9348249770700932e-04 + + 2.0411339402198792e-01 5.3005450963973999e-01 + <_> + + 0 -1 919 -2.6710508973337710e-04 + + 5.4161262512207031e-01 3.1031790375709534e-01 + <_> + + 0 -1 920 2.7818060480058193e-03 + + 5.2778327465057373e-01 3.4670698642730713e-01 + <_> + + 0 -1 921 -4.6779078547842801e-04 + + 5.3082311153411865e-01 3.2944920659065247e-01 + <_> + + 0 -1 922 -3.0335160772665404e-05 + + 5.7738727331161499e-01 3.8520970940589905e-01 + <_> + + 0 -1 923 7.8038009814918041e-04 + + 4.3174389004707336e-01 6.1500579118728638e-01 + <_> + + 0 -1 924 -4.2553851380944252e-03 + + 2.9339039325714111e-01 5.3242927789688110e-01 + <_> + + 0 -1 925 -2.4735610350035131e-04 + + 5.4688447713851929e-01 3.8430300354957581e-01 + <_> + + 0 -1 926 -1.4724259381182492e-04 + + 4.2815428972244263e-01 5.7555872201919556e-01 + <_> + + 0 -1 927 1.1864770203828812e-03 + + 3.7473011016845703e-01 5.4714661836624146e-01 + <_> + + 0 -1 928 2.3936580400913954e-03 + + 4.5377838611602783e-01 6.1115288734436035e-01 + <_> + + 0 -1 929 -1.5390539774671197e-03 + + 2.9713419079780579e-01 5.1895380020141602e-01 + <_> + + 0 -1 930 -7.1968790143728256e-03 + + 6.6990667581558228e-01 4.7264769673347473e-01 + <_> + + 0 -1 931 -4.1499789222143590e-04 + + 3.3849540352821350e-01 5.2603179216384888e-01 + <_> + + 0 -1 932 4.4359830208122730e-03 + + 5.3991222381591797e-01 3.9201408624649048e-01 + <_> + + 0 -1 933 2.6606200262904167e-03 + + 4.4825780391693115e-01 6.1196178197860718e-01 + <_> + + 0 -1 934 -1.5287200221791863e-03 + + 3.7112379074096680e-01 5.3402662277221680e-01 + <_> + + 0 -1 935 -4.7397250309586525e-03 + + 6.0310882329940796e-01 4.4551450014114380e-01 + <_> + + 0 -1 936 -1.4829129911959171e-02 + + 2.8387540578842163e-01 5.3418618440628052e-01 + <_> + + 0 -1 937 9.2275557108223438e-04 + + 5.2095472812652588e-01 3.3616539835929871e-01 + <_> + + 0 -1 938 8.3529807627201080e-02 + + 5.1199698448181152e-01 8.1164449453353882e-02 + <_> + + 0 -1 939 -7.5633148662745953e-04 + + 3.3171200752258301e-01 5.1898312568664551e-01 + <_> + + 0 -1 940 9.8403859883546829e-03 + + 5.2475982904434204e-01 2.3349590599536896e-01 + <_> + + 0 -1 941 -1.5953830443322659e-03 + + 5.7500940561294556e-01 4.2956221103668213e-01 + <_> + + 0 -1 942 3.4766020689858124e-05 + + 4.3424451351165771e-01 5.5640292167663574e-01 + <_> + + 0 -1 943 2.9862910509109497e-02 + + 4.5791471004486084e-01 6.5791881084442139e-01 + <_> + + 0 -1 944 1.1325590312480927e-02 + + 5.2743119001388550e-01 3.6738881468772888e-01 + <_> + + 0 -1 945 -8.7828645482659340e-03 + + 7.1003687381744385e-01 4.6421670913696289e-01 + <_> + + 0 -1 946 4.3639959767460823e-03 + + 5.2792161703109741e-01 2.7058771252632141e-01 + <_> + + 0 -1 947 4.1804728098213673e-03 + + 5.0725251436233521e-01 2.4490830302238464e-01 + <_> + + 0 -1 948 -4.5668511302210391e-04 + + 4.2831051349639893e-01 5.5486911535263062e-01 + <_> + + 0 -1 949 -3.7140368949621916e-03 + + 5.5193877220153809e-01 4.1036531329154968e-01 + <_> + + 0 -1 950 -2.5304289534687996e-02 + + 6.8670022487640381e-01 4.8698890209197998e-01 + <_> + + 0 -1 951 -3.4454080741852522e-04 + + 3.7288740277290344e-01 5.2876931428909302e-01 + <_> + + 0 -1 952 -8.3935231668874621e-04 + + 6.0601520538330078e-01 4.6160620450973511e-01 + <_> + + 0 -1 953 1.7280049622058868e-02 + + 5.0496357679367065e-01 1.8198239803314209e-01 + <_> + + 0 -1 954 -6.3595077954232693e-03 + + 1.6312399506568909e-01 5.2327787876129150e-01 + <_> + + 0 -1 955 1.0298109846189618e-03 + + 4.4632780551910400e-01 6.1765491962432861e-01 + <_> + + 0 -1 956 1.0117109632119536e-03 + + 5.4733848571777344e-01 4.3006989359855652e-01 + <_> + + 0 -1 957 -1.0308800265192986e-02 + + 1.1669850349426270e-01 5.0008672475814819e-01 + <_> + + 0 -1 958 5.4682018235325813e-03 + + 4.7692871093750000e-01 6.7192137241363525e-01 + <_> + + 0 -1 959 -9.1696460731327534e-04 + + 3.4710898995399475e-01 5.1781648397445679e-01 + <_> + + 0 -1 960 2.3922820109874010e-03 + + 4.7852361202239990e-01 6.2163108587265015e-01 + <_> + + 0 -1 961 -7.5573818758130074e-03 + + 5.8147960901260376e-01 4.4100850820541382e-01 + <_> + + 0 -1 962 -7.7024032361805439e-04 + + 3.8780000805854797e-01 5.4657220840454102e-01 + <_> + + 0 -1 963 -8.7125990539789200e-03 + + 1.6600510478019714e-01 4.9958360195159912e-01 + <_> + + 0 -1 964 -1.0306320153176785e-02 + + 4.0933910012245178e-01 5.2742338180541992e-01 + <_> + + 0 -1 965 -2.0940979011356831e-03 + + 6.2061947584152222e-01 4.5722800493240356e-01 + <_> + + 0 -1 966 6.8099051713943481e-03 + + 5.5677592754364014e-01 4.1556000709533691e-01 + <_> + + 0 -1 967 -1.0746059706434608e-03 + + 5.6389278173446655e-01 4.3530249595642090e-01 + <_> + + 0 -1 968 2.1550289820879698e-03 + + 4.8262658715248108e-01 6.7497581243515015e-01 + <_> + + 0 -1 969 3.1742319464683533e-02 + + 5.0483798980712891e-01 1.8832489848136902e-01 + <_> + + 0 -1 970 -7.8382723033428192e-02 + + 2.3695489764213562e-01 5.2601581811904907e-01 + <_> + + 0 -1 971 5.7415119372308254e-03 + + 5.0488287210464478e-01 2.7764698863029480e-01 + <_> + + 0 -1 972 -2.9014600440859795e-03 + + 6.2386047840118408e-01 4.6933171153068542e-01 + <_> + + 0 -1 973 -2.6427931152284145e-03 + + 3.3141419291496277e-01 5.1697772741317749e-01 + <_> + + 0 -1 974 -1.0949660092592239e-01 + + 2.3800450563430786e-01 5.1834410429000854e-01 + <_> + + 0 -1 975 7.4075913289561868e-05 + + 4.0696358680725098e-01 5.3621500730514526e-01 + <_> + + 0 -1 976 -5.0593802006915212e-04 + + 5.5067062377929688e-01 4.3745940923690796e-01 + <_> + + 0 -1 977 -8.2131777890026569e-04 + + 5.5257099866867065e-01 4.2093759775161743e-01 + <_> + + 0 -1 978 -6.0276539443293586e-05 + + 5.4554748535156250e-01 4.7482660412788391e-01 + <_> + + 0 -1 979 6.8065142259001732e-03 + + 5.1579958200454712e-01 3.4245771169662476e-01 + <_> + + 0 -1 980 1.7202789895236492e-03 + + 5.0132077932357788e-01 6.3312637805938721e-01 + <_> + + 0 -1 981 -1.3016929733566940e-04 + + 5.5397182703018188e-01 4.2268699407577515e-01 + <_> + + 0 -1 982 -4.8016388900578022e-03 + + 4.4250950217247009e-01 5.4307800531387329e-01 + <_> + + 0 -1 983 -2.5399310979992151e-03 + + 7.1457821130752563e-01 4.6976050734519958e-01 + <_> + + 0 -1 984 -1.4278929447755218e-03 + + 4.0704450011253357e-01 5.3996050357818604e-01 + <_> + + 0 -1 985 -2.5142550468444824e-02 + + 7.8846907615661621e-01 4.7473520040512085e-01 + <_> + + 0 -1 986 -3.8899609353393316e-03 + + 4.2961919307708740e-01 5.5771100521087646e-01 + <_> + + 0 -1 987 4.3947459198534489e-03 + + 4.6931621432304382e-01 7.0239442586898804e-01 + <_> + + 0 -1 988 2.4678420275449753e-02 + + 5.2423220872879028e-01 3.8125100731849670e-01 + <_> + + 0 -1 989 3.8047678768634796e-02 + + 5.0117397308349609e-01 1.6878280043601990e-01 + <_> + + 0 -1 990 7.9424865543842316e-03 + + 4.8285821080207825e-01 6.3695681095123291e-01 + <_> + + 0 -1 991 -1.5110049862414598e-03 + + 5.9064859151840210e-01 4.4876679778099060e-01 + <_> + + 0 -1 992 6.4201741479337215e-03 + + 5.2410978078842163e-01 2.9905700683593750e-01 + <_> + + 0 -1 993 -2.9802159406244755e-03 + + 3.0414658784866333e-01 5.0784897804260254e-01 + <_> + + 0 -1 994 -7.4580078944563866e-04 + + 4.1281390190124512e-01 5.2568262815475464e-01 + <_> + + 0 -1 995 -1.0470950044691563e-02 + + 5.8083951473236084e-01 4.4942960143089294e-01 + <_> + + 0 -1 996 9.3369204550981522e-03 + + 5.2465528249740601e-01 2.6589488983154297e-01 + <_> + + 0 -1 997 2.7936900034546852e-02 + + 4.6749550104141235e-01 7.0872569084167480e-01 + <_> + + 0 -1 998 7.4277678504586220e-03 + + 5.4094868898391724e-01 3.7585180997848511e-01 + <_> + + 0 -1 999 -2.3584509268403053e-02 + + 3.7586399912834167e-01 5.2385509014129639e-01 + <_> + + 0 -1 1000 1.1452640173956752e-03 + + 4.3295788764953613e-01 5.8042472600936890e-01 + <_> + + 0 -1 1001 -4.3468660442158580e-04 + + 5.2806180715560913e-01 3.8730698823928833e-01 + <_> + + 0 -1 1002 1.0648540221154690e-02 + + 4.9021130800247192e-01 5.6812518835067749e-01 + <_> + + 0 -1 1003 -3.9418050437234342e-04 + + 5.5708801746368408e-01 4.3182510137557983e-01 + <_> + + 0 -1 1004 -1.3270479394122958e-04 + + 5.6584399938583374e-01 4.3435549736022949e-01 + <_> + + 0 -1 1005 -2.0125510636717081e-03 + + 6.0567390918731689e-01 4.5375239849090576e-01 + <_> + + 0 -1 1006 2.4854319635778666e-03 + + 5.3904771804809570e-01 4.1380101442337036e-01 + <_> + + 0 -1 1007 1.8237880431115627e-03 + + 4.3548288941383362e-01 5.7171887159347534e-01 + <_> + + 0 -1 1008 -1.6656659543514252e-02 + + 3.0109131336212158e-01 5.2161228656768799e-01 + <_> + + 0 -1 1009 8.0349558265879750e-04 + + 5.3001511096954346e-01 3.8183969259262085e-01 + <_> + + 0 -1 1010 3.4170378930866718e-03 + + 5.3280287981033325e-01 4.2414000630378723e-01 + <_> + + 0 -1 1011 -3.6222729249857366e-04 + + 5.4917281866073608e-01 4.1869771480560303e-01 + <_> + + 0 -1 1012 -1.1630020290613174e-01 + + 1.4407220482826233e-01 5.2264511585235596e-01 + <_> + + 0 -1 1013 -1.4695010147988796e-02 + + 7.7477252483367920e-01 4.7157171368598938e-01 + <_> + + 0 -1 1014 2.1972130052745342e-03 + + 5.3554338216781616e-01 3.3156448602676392e-01 + <_> + + 0 -1 1015 -4.6965209185145795e-04 + + 5.7672351598739624e-01 4.4581368565559387e-01 + <_> + + 0 -1 1016 6.5144998952746391e-03 + + 5.2156740427017212e-01 3.6478888988494873e-01 + <_> + + 0 -1 1017 2.1300060674548149e-02 + + 4.9942049384117126e-01 1.5679509937763214e-01 + <_> + + 0 -1 1018 3.1881409231573343e-03 + + 4.7422000765800476e-01 6.2872701883316040e-01 + <_> + + 0 -1 1019 9.0019777417182922e-04 + + 5.3479540348052979e-01 3.9437520503997803e-01 + <_> + + 0 -1 1020 -5.1772277802228928e-03 + + 6.7271918058395386e-01 5.0131380558013916e-01 + <_> + + 0 -1 1021 -4.3764649890363216e-03 + + 3.1066751480102539e-01 5.1287931203842163e-01 + <_> + + 0 -1 1022 2.6299960445612669e-03 + + 4.8863101005554199e-01 5.7552158832550049e-01 + <_> + + 0 -1 1023 -2.0458688959479332e-03 + + 6.0257941484451294e-01 4.5580768585205078e-01 + <_> + + 0 -1 1024 6.9482706487178802e-02 + + 5.2407479286193848e-01 2.1852590143680573e-01 + <_> + + 0 -1 1025 2.4048939347267151e-02 + + 5.0118672847747803e-01 2.0906220376491547e-01 + <_> + + 0 -1 1026 3.1095340382307768e-03 + + 4.8667120933532715e-01 7.1085482835769653e-01 + <_> + + 0 -1 1027 -1.2503260513767600e-03 + + 3.4078910946846008e-01 5.1561951637268066e-01 + <_> + + 0 -1 1028 -1.0281190043315291e-03 + + 5.5755722522735596e-01 4.4394320249557495e-01 + <_> + + 0 -1 1029 -8.8893622159957886e-03 + + 6.4020007848739624e-01 4.6204420924186707e-01 + <_> + + 0 -1 1030 -6.1094801640138030e-04 + + 3.7664419412612915e-01 5.4488998651504517e-01 + <_> + + 0 -1 1031 -5.7686357758939266e-03 + + 3.3186489343643188e-01 5.1336771249771118e-01 + <_> + + 0 -1 1032 1.8506490159779787e-03 + + 4.9035701155662537e-01 6.4069348573684692e-01 + <_> + + 0 -1 1033 -9.9799469113349915e-02 + + 1.5360510349273682e-01 5.0155621767044067e-01 + <_> + + 0 -1 1034 -3.5128349065780640e-01 + + 5.8823131024837494e-02 5.1743787527084351e-01 + <_> + + 0 -1 1035 -4.5244570821523666e-02 + + 6.9614887237548828e-01 4.6778729557991028e-01 + <_> + + 0 -1 1036 7.1481578052043915e-02 + + 5.1679861545562744e-01 1.0380929708480835e-01 + <_> + + 0 -1 1037 2.1895780228078365e-03 + + 4.2730781435966492e-01 5.5320608615875244e-01 + <_> + + 0 -1 1038 -5.9242651332169771e-04 + + 4.6389439702033997e-01 5.2763891220092773e-01 + <_> + + 0 -1 1039 1.6788389766588807e-03 + + 5.3016489744186401e-01 3.9320349693298340e-01 + <_> + + 0 -1 1040 -2.2163488902151585e-03 + + 5.6306940317153931e-01 4.7570338845252991e-01 + <_> + + 0 -1 1041 1.1568699846975505e-04 + + 4.3075358867645264e-01 5.5357027053833008e-01 + <_> + + 0 -1 1042 -7.2017288766801357e-03 + + 1.4448820054531097e-01 5.1930642127990723e-01 + <_> + + 0 -1 1043 8.9081272017210722e-04 + + 4.3844321370124817e-01 5.5936211347579956e-01 + <_> + + 0 -1 1044 1.9605009583756328e-04 + + 5.3404158353805542e-01 4.7059568762779236e-01 + <_> + + 0 -1 1045 5.2022142335772514e-04 + + 5.2138561010360718e-01 3.8100790977478027e-01 + <_> + + 0 -1 1046 9.4588572392240167e-04 + + 4.7694149613380432e-01 6.1307388544082642e-01 + <_> + + 0 -1 1047 9.1698471806012094e-05 + + 4.2450091242790222e-01 5.4293632507324219e-01 + <_> + + 0 -1 1048 2.1833200007677078e-03 + + 5.4577308893203735e-01 4.1910758614540100e-01 + <_> + + 0 -1 1049 -8.6039671441540122e-04 + + 5.7645887136459351e-01 4.4716599583625793e-01 + <_> + + 0 -1 1050 -1.3236239552497864e-02 + + 6.3728231191635132e-01 4.6950098872184753e-01 + <_> + + 0 -1 1051 4.3376701069064438e-04 + + 5.3178739547729492e-01 3.9458298683166504e-01 + <_> + 140 + 6.9229873657226562e+01 + + <_> + + 0 -1 1052 -2.4847149848937988e-02 + + 6.5555167198181152e-01 3.8733118772506714e-01 + <_> + + 0 -1 1053 6.1348611488938332e-03 + + 3.7480720877647400e-01 5.9739977121353149e-01 + <_> + + 0 -1 1054 6.4498498104512691e-03 + + 5.4254919290542603e-01 2.5488111376762390e-01 + <_> + + 0 -1 1055 6.3491211039945483e-04 + + 2.4624420702457428e-01 5.3872537612915039e-01 + <_> + + 0 -1 1056 1.4023890253156424e-03 + + 5.5943220853805542e-01 3.5286578536033630e-01 + <_> + + 0 -1 1057 3.0044000595808029e-04 + + 3.9585039019584656e-01 5.7659381628036499e-01 + <_> + + 0 -1 1058 1.0042409849120304e-04 + + 3.6989969015121460e-01 5.5349981784820557e-01 + <_> + + 0 -1 1059 -5.0841490738093853e-03 + + 3.7110909819602966e-01 5.5478000640869141e-01 + <_> + + 0 -1 1060 -1.9537260755896568e-02 + + 7.4927550554275513e-01 4.5792970061302185e-01 + <_> + + 0 -1 1061 -7.4532740654831287e-06 + + 5.6497871875762939e-01 3.9040699601173401e-01 + <_> + + 0 -1 1062 -3.6079459823668003e-03 + + 3.3810880780220032e-01 5.2678012847900391e-01 + <_> + + 0 -1 1063 2.0697501022368670e-03 + + 5.5192911624908447e-01 3.7143889069557190e-01 + <_> + + 0 -1 1064 -4.6463840408250690e-04 + + 5.6082147359848022e-01 4.1135668754577637e-01 + <_> + + 0 -1 1065 7.5490452582016587e-04 + + 3.5592061281204224e-01 5.3293561935424805e-01 + <_> + + 0 -1 1066 -9.8322238773107529e-04 + + 5.4147958755493164e-01 3.7632051110267639e-01 + <_> + + 0 -1 1067 -1.9940640777349472e-02 + + 6.3479030132293701e-01 4.7052991390228271e-01 + <_> + + 0 -1 1068 3.7680300883948803e-03 + + 3.9134898781776428e-01 5.5637162923812866e-01 + <_> + + 0 -1 1069 -9.4528505578637123e-03 + + 2.5548928976058960e-01 5.2151167392730713e-01 + <_> + + 0 -1 1070 2.9560849070549011e-03 + + 5.1746791601181030e-01 3.0639201402664185e-01 + <_> + + 0 -1 1071 9.1078737750649452e-03 + + 5.3884482383728027e-01 2.8859630227088928e-01 + <_> + + 0 -1 1072 1.8219229532405734e-03 + + 4.3360430002212524e-01 5.8521968126296997e-01 + <_> + + 0 -1 1073 1.4688739553093910e-02 + + 5.2873617410659790e-01 2.8700059652328491e-01 + <_> + + 0 -1 1074 -1.4387990348041058e-02 + + 7.0194488763809204e-01 4.6473708748817444e-01 + <_> + + 0 -1 1075 -1.8986649811267853e-02 + + 2.9865521192550659e-01 5.2470117807388306e-01 + <_> + + 0 -1 1076 1.1527639580890536e-03 + + 4.3234738707542419e-01 5.9316617250442505e-01 + <_> + + 0 -1 1077 1.0933670215308666e-02 + + 5.2868640422821045e-01 3.1303191184997559e-01 + <_> + + 0 -1 1078 -1.4932730235159397e-02 + + 2.6584190130233765e-01 5.0840771198272705e-01 + <_> + + 0 -1 1079 -2.9970539617352188e-04 + + 5.4635268449783325e-01 3.7407240271568298e-01 + <_> + + 0 -1 1080 4.1677621193230152e-03 + + 4.7034969925880432e-01 7.4357217550277710e-01 + <_> + + 0 -1 1081 -6.3905320130288601e-03 + + 2.0692589879035950e-01 5.2805382013320923e-01 + <_> + + 0 -1 1082 4.5029609464108944e-03 + + 5.1826488971710205e-01 3.4835430979728699e-01 + <_> + + 0 -1 1083 -9.2040365561842918e-03 + + 6.8037772178649902e-01 4.9323600530624390e-01 + <_> + + 0 -1 1084 8.1327259540557861e-02 + + 5.0583988428115845e-01 2.2530519962310791e-01 + <_> + + 0 -1 1085 -1.5079280734062195e-01 + + 2.9634249210357666e-01 5.2646797895431519e-01 + <_> + + 0 -1 1086 3.3179009333252907e-03 + + 4.6554958820343018e-01 7.0729321241378784e-01 + <_> + + 0 -1 1087 7.7402801252901554e-04 + + 4.7803479433059692e-01 5.6682378053665161e-01 + <_> + + 0 -1 1088 6.8199541419744492e-04 + + 4.2869961261749268e-01 5.7221567630767822e-01 + <_> + + 0 -1 1089 5.3671570494771004e-03 + + 5.2993071079254150e-01 3.1146219372749329e-01 + <_> + + 0 -1 1090 9.7018666565418243e-05 + + 3.6746388673782349e-01 5.2694618701934814e-01 + <_> + + 0 -1 1091 -1.2534089386463165e-01 + + 2.3514920473098755e-01 5.2457910776138306e-01 + <_> + + 0 -1 1092 -5.2516269497573376e-03 + + 7.1159368753433228e-01 4.6937671303749084e-01 + <_> + + 0 -1 1093 -7.8342109918594360e-03 + + 4.4626510143280029e-01 5.4090857505798340e-01 + <_> + + 0 -1 1094 -1.1310069821774960e-03 + + 5.9456187486648560e-01 4.4176620244979858e-01 + <_> + + 0 -1 1095 1.7601120052859187e-03 + + 5.3532499074935913e-01 3.9734530448913574e-01 + <_> + + 0 -1 1096 -8.1581249833106995e-04 + + 3.7602680921554565e-01 5.2647268772125244e-01 + <_> + + 0 -1 1097 -3.8687589112669230e-03 + + 6.3099128007888794e-01 4.7498199343681335e-01 + <_> + + 0 -1 1098 1.5207129763439298e-03 + + 5.2301818132400513e-01 3.3612239360809326e-01 + <_> + + 0 -1 1099 5.4586738348007202e-01 + + 5.1671397686004639e-01 1.1726350337266922e-01 + <_> + + 0 -1 1100 1.5650190412998199e-02 + + 4.9794390797615051e-01 1.3932949304580688e-01 + <_> + + 0 -1 1101 -1.1731860227882862e-02 + + 7.1296507120132446e-01 4.9211961030960083e-01 + <_> + + 0 -1 1102 -6.1765122227370739e-03 + + 2.2881029546260834e-01 5.0497019290924072e-01 + <_> + + 0 -1 1103 2.2457661107182503e-03 + + 4.6324339509010315e-01 6.0487258434295654e-01 + <_> + + 0 -1 1104 -5.1915869116783142e-03 + + 6.4674210548400879e-01 4.6021929383277893e-01 + <_> + + 0 -1 1105 -2.3827880620956421e-02 + + 1.4820009469985962e-01 5.2260792255401611e-01 + <_> + + 0 -1 1106 1.0284580057486892e-03 + + 5.1354891061782837e-01 3.3759570121765137e-01 + <_> + + 0 -1 1107 -1.0078850202262402e-02 + + 2.7405610680580139e-01 5.3035670518875122e-01 + <_> + + 0 -1 1108 2.6168930344283581e-03 + + 5.3326708078384399e-01 3.9724540710449219e-01 + <_> + + 0 -1 1109 5.4385367548093200e-04 + + 5.3656041622161865e-01 4.0634119510650635e-01 + <_> + + 0 -1 1110 5.3510512225329876e-03 + + 4.6537590026855469e-01 6.8890458345413208e-01 + <_> + + 0 -1 1111 -1.5274790348485112e-03 + + 5.4495012760162354e-01 3.6247238516807556e-01 + <_> + + 0 -1 1112 -8.0624416470527649e-02 + + 1.6560870409011841e-01 5.0002872943878174e-01 + <_> + + 0 -1 1113 2.2192029282450676e-02 + + 5.1327311992645264e-01 2.0028080046176910e-01 + <_> + + 0 -1 1114 7.3100631125271320e-03 + + 4.6179479360580444e-01 6.3665360212326050e-01 + <_> + + 0 -1 1115 -6.4063072204589844e-03 + + 5.9162509441375732e-01 4.8678609728813171e-01 + <_> + + 0 -1 1116 -7.6415040530264378e-04 + + 3.8884091377258301e-01 5.3157979249954224e-01 + <_> + + 0 -1 1117 7.6734489994123578e-04 + + 4.1590648889541626e-01 5.6052798032760620e-01 + <_> + + 0 -1 1118 6.1474501853808761e-04 + + 3.0890220403671265e-01 5.1201480627059937e-01 + <_> + + 0 -1 1119 -5.0105270929634571e-03 + + 3.9721998572349548e-01 5.2073061466217041e-01 + <_> + + 0 -1 1120 -8.6909132078289986e-03 + + 6.2574082612991333e-01 4.6085759997367859e-01 + <_> + + 0 -1 1121 -1.6391459852457047e-02 + + 2.0852099359035492e-01 5.2422660589218140e-01 + <_> + + 0 -1 1122 4.0973909199237823e-04 + + 5.2224272489547729e-01 3.7803208827972412e-01 + <_> + + 0 -1 1123 -2.5242289993911982e-03 + + 5.8039271831512451e-01 4.6118900179862976e-01 + <_> + + 0 -1 1124 5.0945312250405550e-04 + + 4.4012719392776489e-01 5.8460158109664917e-01 + <_> + + 0 -1 1125 1.9656419754028320e-03 + + 5.3223252296447754e-01 4.1845908761024475e-01 + <_> + + 0 -1 1126 5.6298897834494710e-04 + + 3.7418448925018311e-01 5.2345657348632812e-01 + <_> + + 0 -1 1127 -6.7946797935292125e-04 + + 4.6310418844223022e-01 5.3564780950546265e-01 + <_> + + 0 -1 1128 7.2856349870562553e-03 + + 5.0446701049804688e-01 2.3775640130043030e-01 + <_> + + 0 -1 1129 -1.7459489405155182e-02 + + 7.2891211509704590e-01 5.0504350662231445e-01 + <_> + + 0 -1 1130 -2.5421749800443649e-02 + + 6.6671347618103027e-01 4.6781000494956970e-01 + <_> + + 0 -1 1131 -1.5647639520466328e-03 + + 4.3917590379714966e-01 5.3236269950866699e-01 + <_> + + 0 -1 1132 1.1444360017776489e-02 + + 4.3464401364326477e-01 5.6800121068954468e-01 + <_> + + 0 -1 1133 -6.7352550104260445e-04 + + 4.4771409034729004e-01 5.2968120574951172e-01 + <_> + + 0 -1 1134 9.3194209039211273e-03 + + 4.7402000427246094e-01 7.4626070261001587e-01 + <_> + + 0 -1 1135 1.3328490604180843e-04 + + 5.3650617599487305e-01 4.7521349787712097e-01 + <_> + + 0 -1 1136 -7.8815799206495285e-03 + + 1.7522190511226654e-01 5.0152552127838135e-01 + <_> + + 0 -1 1137 -5.7985680177807808e-03 + + 7.2712367773056030e-01 4.8962008953094482e-01 + <_> + + 0 -1 1138 -3.8922499516047537e-04 + + 4.0039089322090149e-01 5.3449410200119019e-01 + <_> + + 0 -1 1139 -1.9288610201328993e-03 + + 5.6056129932403564e-01 4.8039558529853821e-01 + <_> + + 0 -1 1140 8.4214154630899429e-03 + + 4.7532469034194946e-01 7.6236087083816528e-01 + <_> + + 0 -1 1141 8.1655876711010933e-03 + + 5.3932619094848633e-01 4.1916438937187195e-01 + <_> + + 0 -1 1142 4.8280550981871784e-04 + + 4.2408001422882080e-01 5.3998219966888428e-01 + <_> + + 0 -1 1143 -2.7186630759388208e-03 + + 4.2445999383926392e-01 5.4249238967895508e-01 + <_> + + 0 -1 1144 -1.2507230043411255e-02 + + 5.8958417177200317e-01 4.5504111051559448e-01 + <_> + + 0 -1 1145 -2.4286519736051559e-02 + + 2.6471349596977234e-01 5.1891797780990601e-01 + <_> + + 0 -1 1146 -2.9676330741494894e-03 + + 7.3476827144622803e-01 4.7497498989105225e-01 + <_> + + 0 -1 1147 -1.2528999708592892e-02 + + 2.7560499310493469e-01 5.1775997877120972e-01 + <_> + + 0 -1 1148 -1.0104000102728605e-03 + + 3.5105609893798828e-01 5.1447242498397827e-01 + <_> + + 0 -1 1149 -2.1348530426621437e-03 + + 5.6379258632659912e-01 4.6673199534416199e-01 + <_> + + 0 -1 1150 1.9564259797334671e-02 + + 4.6145731210708618e-01 6.1376398801803589e-01 + <_> + + 0 -1 1151 -9.7146347165107727e-02 + + 2.9983788728713989e-01 5.1935559511184692e-01 + <_> + + 0 -1 1152 4.5014568604528904e-03 + + 5.0778847932815552e-01 3.0457559227943420e-01 + <_> + + 0 -1 1153 6.3706971704959869e-03 + + 4.8610189557075500e-01 6.8875008821487427e-01 + <_> + + 0 -1 1154 -9.0721528977155685e-03 + + 1.6733959317207336e-01 5.0175631046295166e-01 + <_> + + 0 -1 1155 -5.3537208586931229e-03 + + 2.6927569508552551e-01 5.2426332235336304e-01 + <_> + + 0 -1 1156 -1.0932840406894684e-02 + + 7.1838641166687012e-01 4.7360289096832275e-01 + <_> + + 0 -1 1157 8.2356072962284088e-03 + + 5.2239668369293213e-01 2.3898629844188690e-01 + <_> + + 0 -1 1158 -1.0038160253316164e-03 + + 5.7193559408187866e-01 4.4339430332183838e-01 + <_> + + 0 -1 1159 4.0859128348529339e-03 + + 5.4728418588638306e-01 4.1488361358642578e-01 + <_> + + 0 -1 1160 1.5485419332981110e-01 + + 4.9738121032714844e-01 6.1061598360538483e-02 + <_> + + 0 -1 1161 2.0897459762636572e-04 + + 4.7091740369796753e-01 5.4238891601562500e-01 + <_> + + 0 -1 1162 3.3316991175524890e-04 + + 4.0896269679069519e-01 5.3009921312332153e-01 + <_> + + 0 -1 1163 -1.0813400149345398e-02 + + 6.1043697595596313e-01 4.9573341012001038e-01 + <_> + + 0 -1 1164 4.5656010508537292e-02 + + 5.0696891546249390e-01 2.8666600584983826e-01 + <_> + + 0 -1 1165 1.2569549726322293e-03 + + 4.8469170928001404e-01 6.3181710243225098e-01 + <_> + + 0 -1 1166 -1.2015070021152496e-01 + + 6.0526140034198761e-02 4.9809598922729492e-01 + <_> + + 0 -1 1167 -1.0533799650147557e-04 + + 5.3631097078323364e-01 4.7080421447753906e-01 + <_> + + 0 -1 1168 -2.0703190565109253e-01 + + 5.9660330414772034e-02 4.9790981411933899e-01 + <_> + + 0 -1 1169 1.2909180077258497e-04 + + 4.7129771113395691e-01 5.3779977560043335e-01 + <_> + + 0 -1 1170 3.8818528992123902e-04 + + 4.3635380268096924e-01 5.5341911315917969e-01 + <_> + + 0 -1 1171 -2.9243610333651304e-03 + + 5.8111858367919922e-01 4.8252159357070923e-01 + <_> + + 0 -1 1172 8.3882332546636462e-04 + + 5.3117001056671143e-01 4.0381389856338501e-01 + <_> + + 0 -1 1173 -1.9061550265178084e-03 + + 3.7707018852233887e-01 5.2600151300430298e-01 + <_> + + 0 -1 1174 8.9514348655939102e-03 + + 4.7661679983139038e-01 7.6821839809417725e-01 + <_> + + 0 -1 1175 1.3083459809422493e-02 + + 5.2644628286361694e-01 3.0622220039367676e-01 + <_> + + 0 -1 1176 -2.1159330010414124e-01 + + 6.7371982336044312e-01 4.6958100795745850e-01 + <_> + + 0 -1 1177 3.1493250280618668e-03 + + 5.6448352336883545e-01 4.3869531154632568e-01 + <_> + + 0 -1 1178 3.9754100725986063e-04 + + 4.5260611176490784e-01 5.8956301212310791e-01 + <_> + + 0 -1 1179 -1.3814480043947697e-03 + + 6.0705822706222534e-01 4.9424138665199280e-01 + <_> + + 0 -1 1180 -5.8122188784182072e-04 + + 5.9982132911682129e-01 4.5082521438598633e-01 + <_> + + 0 -1 1181 -2.3905329871922731e-03 + + 4.2055889964103699e-01 5.2238482236862183e-01 + <_> + + 0 -1 1182 2.7268929407000542e-02 + + 5.2064472436904907e-01 3.5633018612861633e-01 + <_> + + 0 -1 1183 -3.7658358924090862e-03 + + 3.1447041034698486e-01 5.2188140153884888e-01 + <_> + + 0 -1 1184 -1.4903489500284195e-03 + + 3.3801960945129395e-01 5.1244372129440308e-01 + <_> + + 0 -1 1185 -1.7428230494260788e-02 + + 5.8299607038497925e-01 4.9197259545326233e-01 + <_> + + 0 -1 1186 -1.5278030186891556e-02 + + 6.1631447076797485e-01 4.6178871393203735e-01 + <_> + + 0 -1 1187 3.1995609402656555e-02 + + 5.1663571596145630e-01 1.7127640545368195e-01 + <_> + + 0 -1 1188 -3.8256710395216942e-03 + + 3.4080120921134949e-01 5.1313877105712891e-01 + <_> + + 0 -1 1189 -8.5186436772346497e-03 + + 6.1055189371109009e-01 4.9979418516159058e-01 + <_> + + 0 -1 1190 9.0641621500253677e-04 + + 4.3272709846496582e-01 5.5823111534118652e-01 + <_> + + 0 -1 1191 1.0344849899411201e-02 + + 4.8556530475616455e-01 5.4524201154708862e-01 + <_> + 160 + 7.9249076843261719e+01 + + <_> + + 0 -1 1192 7.8981826081871986e-03 + + 3.3325248956680298e-01 5.9464621543884277e-01 + <_> + + 0 -1 1193 1.6170160379260778e-03 + + 3.4906411170959473e-01 5.5778688192367554e-01 + <_> + + 0 -1 1194 -5.5449741194024682e-04 + + 5.5425661802291870e-01 3.2915300130844116e-01 + <_> + + 0 -1 1195 1.5428980113938451e-03 + + 3.6125791072845459e-01 5.5459791421890259e-01 + <_> + + 0 -1 1196 -1.0329450014978647e-03 + + 3.5301390290260315e-01 5.5761402845382690e-01 + <_> + + 0 -1 1197 7.7698158565908670e-04 + + 3.9167788624763489e-01 5.6453210115432739e-01 + <_> + + 0 -1 1198 1.4320300519466400e-01 + + 4.6674820780754089e-01 7.0236331224441528e-01 + <_> + + 0 -1 1199 -7.3866490274667740e-03 + + 3.0736848711967468e-01 5.2892577648162842e-01 + <_> + + 0 -1 1200 -6.2936742324382067e-04 + + 5.6221181154251099e-01 4.0370491147041321e-01 + <_> + + 0 -1 1201 7.8893528552725911e-04 + + 5.2676612138748169e-01 3.5578748583793640e-01 + <_> + + 0 -1 1202 -1.2228050269186497e-02 + + 6.6683208942413330e-01 4.6255499124526978e-01 + <_> + + 0 -1 1203 3.5420239437371492e-03 + + 5.5214381217956543e-01 3.8696730136871338e-01 + <_> + + 0 -1 1204 -1.0585320414975286e-03 + + 3.6286780238151550e-01 5.3209269046783447e-01 + <_> + + 0 -1 1205 1.4935660146875307e-05 + + 4.6324449777603149e-01 5.3633230924606323e-01 + <_> + + 0 -1 1206 5.2537708543241024e-03 + + 5.1322317123413086e-01 3.2657089829444885e-01 + <_> + + 0 -1 1207 -8.2338023930788040e-03 + + 6.6936898231506348e-01 4.7741401195526123e-01 + <_> + + 0 -1 1208 2.1866810129722580e-05 + + 4.0538620948791504e-01 5.4579311609268188e-01 + <_> + + 0 -1 1209 -3.8150229956954718e-03 + + 6.4549958705902100e-01 4.7931781411170959e-01 + <_> + + 0 -1 1210 1.1105879675596952e-03 + + 5.2704071998596191e-01 3.5296788811683655e-01 + <_> + + 0 -1 1211 -5.7707689702510834e-03 + + 3.8035470247268677e-01 5.3529578447341919e-01 + <_> + + 0 -1 1212 -3.0158339068293571e-03 + + 5.3394031524658203e-01 3.8871330022811890e-01 + <_> + + 0 -1 1213 -8.5453689098358154e-04 + + 3.5646161437034607e-01 5.2736037969589233e-01 + <_> + + 0 -1 1214 1.1050510220229626e-02 + + 4.6719071269035339e-01 6.8497377634048462e-01 + <_> + + 0 -1 1215 4.2605839669704437e-02 + + 5.1514732837677002e-01 7.0220090448856354e-02 + <_> + + 0 -1 1216 -3.0781750101596117e-03 + + 3.0416610836982727e-01 5.1526021957397461e-01 + <_> + + 0 -1 1217 -5.4815728217363358e-03 + + 6.4302957057952881e-01 4.8972299695014954e-01 + <_> + + 0 -1 1218 3.1881860923022032e-03 + + 5.3074932098388672e-01 3.8262099027633667e-01 + <_> + + 0 -1 1219 3.5947180003859103e-04 + + 4.6500471234321594e-01 5.4219049215316772e-01 + <_> + + 0 -1 1220 -4.0705031715333462e-03 + + 2.8496798872947693e-01 5.0791162252426147e-01 + <_> + + 0 -1 1221 -1.4594170264899731e-02 + + 2.9716458916664124e-01 5.1284617185592651e-01 + <_> + + 0 -1 1222 -1.1947689927183092e-04 + + 5.6310981512069702e-01 4.3430820107460022e-01 + <_> + + 0 -1 1223 -6.9344649091362953e-04 + + 4.4035780429840088e-01 5.3599590063095093e-01 + <_> + + 0 -1 1224 1.4834799912932795e-05 + + 3.4210088849067688e-01 5.1646977663040161e-01 + <_> + + 0 -1 1225 9.0296985581517220e-03 + + 4.6393430233001709e-01 6.1140751838684082e-01 + <_> + + 0 -1 1226 -8.0640818923711777e-03 + + 2.8201588988304138e-01 5.0754940509796143e-01 + <_> + + 0 -1 1227 2.6062119752168655e-02 + + 5.2089059352874756e-01 2.6887780427932739e-01 + <_> + + 0 -1 1228 1.7314659431576729e-02 + + 4.6637138724327087e-01 6.7385399341583252e-01 + <_> + + 0 -1 1229 2.2666640579700470e-02 + + 5.2093499898910522e-01 2.2127239406108856e-01 + <_> + + 0 -1 1230 -2.1965929772704840e-03 + + 6.0631012916564941e-01 4.5381900668144226e-01 + <_> + + 0 -1 1231 -9.5282476395368576e-03 + + 4.6352049708366394e-01 5.2474308013916016e-01 + <_> + + 0 -1 1232 8.0943619832396507e-03 + + 5.2894401550292969e-01 3.9138820767402649e-01 + <_> + + 0 -1 1233 -7.2877332568168640e-02 + + 7.7520018815994263e-01 4.9902349710464478e-01 + <_> + + 0 -1 1234 -6.9009521976113319e-03 + + 2.4280390143394470e-01 5.0480902194976807e-01 + <_> + + 0 -1 1235 -1.1308239772915840e-02 + + 5.7343649864196777e-01 4.8423761129379272e-01 + <_> + + 0 -1 1236 5.9613201767206192e-02 + + 5.0298362970352173e-01 2.5249770283699036e-01 + <_> + + 0 -1 1237 -2.8624620754271746e-03 + + 6.0730451345443726e-01 4.8984599113464355e-01 + <_> + + 0 -1 1238 4.4781449250876904e-03 + + 5.0152891874313354e-01 2.2203169763088226e-01 + <_> + + 0 -1 1239 -1.7513240454718471e-03 + + 6.6144287586212158e-01 4.9338689446449280e-01 + <_> + + 0 -1 1240 4.0163420140743256e-02 + + 5.1808780431747437e-01 3.7410449981689453e-01 + <_> + + 0 -1 1241 3.4768949262797832e-04 + + 4.7204169631004333e-01 5.8180320262908936e-01 + <_> + + 0 -1 1242 2.6551650371402502e-03 + + 3.8050109148025513e-01 5.2213358879089355e-01 + <_> + + 0 -1 1243 -8.7706279009580612e-03 + + 2.9441660642623901e-01 5.2312952280044556e-01 + <_> + + 0 -1 1244 -5.5122091434895992e-03 + + 7.3461771011352539e-01 4.7228169441223145e-01 + <_> + + 0 -1 1245 6.8672042107209563e-04 + + 5.4528760910034180e-01 4.2424130439758301e-01 + <_> + + 0 -1 1246 5.6019669864326715e-04 + + 4.3988621234893799e-01 5.6012850999832153e-01 + <_> + + 0 -1 1247 2.4143769405782223e-03 + + 4.7416868805885315e-01 6.1366218328475952e-01 + <_> + + 0 -1 1248 -1.5680900542065501e-03 + + 6.0445529222488403e-01 4.5164099335670471e-01 + <_> + + 0 -1 1249 -3.6827491130679846e-03 + + 2.4524590373039246e-01 5.2949821949005127e-01 + <_> + + 0 -1 1250 -2.9409190756268799e-04 + + 3.7328380346298218e-01 5.2514511346817017e-01 + <_> + + 0 -1 1251 4.2847759323194623e-04 + + 5.4988098144531250e-01 4.0655350685119629e-01 + <_> + + 0 -1 1252 -4.8817070201039314e-03 + + 2.1399089694023132e-01 4.9999570846557617e-01 + <_> + + 0 -1 1253 2.7272020815871656e-04 + + 4.6502870321273804e-01 5.8134287595748901e-01 + <_> + + 0 -1 1254 2.0947199664078653e-04 + + 4.3874868750572205e-01 5.5727928876876831e-01 + <_> + + 0 -1 1255 4.8501189798116684e-02 + + 5.2449727058410645e-01 3.2128891348838806e-01 + <_> + + 0 -1 1256 -4.5166411437094212e-03 + + 6.0568130016326904e-01 4.5458820462226868e-01 + <_> + + 0 -1 1257 -1.2291680090129375e-02 + + 2.0409290492534637e-01 5.1522141695022583e-01 + <_> + + 0 -1 1258 4.8549679922871292e-04 + + 5.2376049757003784e-01 3.7395030260086060e-01 + <_> + + 0 -1 1259 3.0556049197912216e-02 + + 4.9605339765548706e-01 5.9382462501525879e-01 + <_> + + 0 -1 1260 -1.5105320198927075e-04 + + 5.3513038158416748e-01 4.1452041268348694e-01 + <_> + + 0 -1 1261 2.4937440175563097e-03 + + 4.6933668851852417e-01 5.5149412155151367e-01 + <_> + + 0 -1 1262 -1.2382130138576031e-02 + + 6.7913967370986938e-01 4.6816679835319519e-01 + <_> + + 0 -1 1263 -5.1333461888134480e-03 + + 3.6087390780448914e-01 5.2291601896286011e-01 + <_> + + 0 -1 1264 5.1919277757406235e-04 + + 5.3000730276107788e-01 3.6336138844490051e-01 + <_> + + 0 -1 1265 1.5060420334339142e-01 + + 5.1573169231414795e-01 2.2117820382118225e-01 + <_> + + 0 -1 1266 7.7144149690866470e-03 + + 4.4104969501495361e-01 5.7766091823577881e-01 + <_> + + 0 -1 1267 9.4443522393703461e-03 + + 5.4018551111221313e-01 3.7566500902175903e-01 + <_> + + 0 -1 1268 2.5006249779835343e-04 + + 4.3682709336280823e-01 5.6073749065399170e-01 + <_> + + 0 -1 1269 -3.3077150583267212e-03 + + 4.2447990179061890e-01 5.5182307958602905e-01 + <_> + + 0 -1 1270 7.4048910755664110e-04 + + 4.4969621300697327e-01 5.9005767107009888e-01 + <_> + + 0 -1 1271 4.4092051684856415e-02 + + 5.2934932708740234e-01 3.1563550233840942e-01 + <_> + + 0 -1 1272 3.3639909233897924e-03 + + 4.4832968711853027e-01 5.8486622571945190e-01 + <_> + + 0 -1 1273 -3.9760079234838486e-03 + + 4.5595070719718933e-01 5.4836392402648926e-01 + <_> + + 0 -1 1274 2.7716930489987135e-03 + + 5.3417861461639404e-01 3.7924841046333313e-01 + <_> + + 0 -1 1275 -2.4123019829858094e-04 + + 5.6671887636184692e-01 4.5769730210304260e-01 + <_> + + 0 -1 1276 4.9425667384639382e-04 + + 4.4212448596954346e-01 5.6287872791290283e-01 + <_> + + 0 -1 1277 -3.8876468897797167e-04 + + 4.2883709073066711e-01 5.3910630941390991e-01 + <_> + + 0 -1 1278 -5.0048898905515671e-02 + + 6.8995130062103271e-01 4.7037428617477417e-01 + <_> + + 0 -1 1279 -3.6635480821132660e-02 + + 2.2177790105342865e-01 5.1918262243270874e-01 + <_> + + 0 -1 1280 2.4273579474538565e-03 + + 5.1362240314483643e-01 3.4973978996276855e-01 + <_> + + 0 -1 1281 1.9558030180633068e-03 + + 4.8261928558349609e-01 6.4083808660507202e-01 + <_> + + 0 -1 1282 -1.7494610510766506e-03 + + 3.9228358864784241e-01 5.2726852893829346e-01 + <_> + + 0 -1 1283 1.3955079950392246e-02 + + 5.0782018899917603e-01 8.4165048599243164e-01 + <_> + + 0 -1 1284 -2.1896739781368524e-04 + + 5.5204898118972778e-01 4.3142348527908325e-01 + <_> + + 0 -1 1285 -1.5131309628486633e-03 + + 3.9346051216125488e-01 5.3825712203979492e-01 + <_> + + 0 -1 1286 -4.3622800149023533e-03 + + 7.3706287145614624e-01 4.7364759445190430e-01 + <_> + + 0 -1 1287 6.5160587430000305e-02 + + 5.1592797040939331e-01 3.2815951108932495e-01 + <_> + + 0 -1 1288 -2.3567399475723505e-03 + + 3.6728268861770630e-01 5.1728862524032593e-01 + <_> + + 0 -1 1289 1.5146659687161446e-02 + + 5.0314939022064209e-01 6.6876041889190674e-01 + <_> + + 0 -1 1290 -2.2850960493087769e-02 + + 6.7675197124481201e-01 4.7095969319343567e-01 + <_> + + 0 -1 1291 4.8867650330066681e-03 + + 5.2579981088638306e-01 4.0598788857460022e-01 + <_> + + 0 -1 1292 1.7619599821045995e-03 + + 4.6962729096412659e-01 6.6882789134979248e-01 + <_> + + 0 -1 1293 -1.2942519970238209e-03 + + 4.3207129836082458e-01 5.3442817926406860e-01 + <_> + + 0 -1 1294 1.0929949581623077e-02 + + 4.9977061152458191e-01 1.6374860703945160e-01 + <_> + + 0 -1 1295 2.9958489903947338e-05 + + 4.2824178934097290e-01 5.6332242488861084e-01 + <_> + + 0 -1 1296 -6.5884361974895000e-03 + + 6.7721211910247803e-01 4.7005268931388855e-01 + <_> + + 0 -1 1297 3.2527779694646597e-03 + + 5.3133970499038696e-01 4.5361489057540894e-01 + <_> + + 0 -1 1298 -4.0435739792883396e-03 + + 5.6600618362426758e-01 4.4133889675140381e-01 + <_> + + 0 -1 1299 -1.2523540062829852e-03 + + 3.7319138646125793e-01 5.3564518690109253e-01 + <_> + + 0 -1 1300 1.9246719602961093e-04 + + 5.1899862289428711e-01 3.7388110160827637e-01 + <_> + + 0 -1 1301 -3.8589671254158020e-02 + + 2.9563739895820618e-01 5.1888108253479004e-01 + <_> + + 0 -1 1302 1.5489870565943420e-04 + + 4.3471351265907288e-01 5.5095332860946655e-01 + <_> + + 0 -1 1303 -3.3763848245143890e-02 + + 3.2303300499916077e-01 5.1954758167266846e-01 + <_> + + 0 -1 1304 -8.2657067105174065e-03 + + 5.9754890203475952e-01 4.5521140098571777e-01 + <_> + + 0 -1 1305 1.4481440302915871e-05 + + 4.7456780076026917e-01 5.4974269866943359e-01 + <_> + + 0 -1 1306 1.4951299817766994e-05 + + 4.3244731426239014e-01 5.4806441068649292e-01 + <_> + + 0 -1 1307 -1.8741799518465996e-02 + + 1.5800529718399048e-01 5.1785331964492798e-01 + <_> + + 0 -1 1308 1.7572239739820361e-03 + + 4.5176368951797485e-01 5.7737642526626587e-01 + <_> + + 0 -1 1309 -3.1391119118779898e-03 + + 4.1496479511260986e-01 5.4608422517776489e-01 + <_> + + 0 -1 1310 6.6656779381446540e-05 + + 4.0390908718109131e-01 5.2930849790573120e-01 + <_> + + 0 -1 1311 6.7743421532213688e-03 + + 4.7676518559455872e-01 6.1219561100006104e-01 + <_> + + 0 -1 1312 -7.3868161998689175e-03 + + 3.5862588882446289e-01 5.1872807741165161e-01 + <_> + + 0 -1 1313 1.4040930196642876e-02 + + 4.7121399641036987e-01 5.5761557817459106e-01 + <_> + + 0 -1 1314 -5.5258329957723618e-03 + + 2.6610270142555237e-01 5.0392812490463257e-01 + <_> + + 0 -1 1315 3.8684239983558655e-01 + + 5.1443397998809814e-01 2.5258991122245789e-01 + <_> + + 0 -1 1316 1.1459240340627730e-04 + + 4.2849949002265930e-01 5.4233711957931519e-01 + <_> + + 0 -1 1317 -1.8467569723725319e-02 + + 3.8858351111412048e-01 5.2130621671676636e-01 + <_> + + 0 -1 1318 -4.5907011372037232e-04 + + 5.4125630855560303e-01 4.2359098792076111e-01 + <_> + + 0 -1 1319 1.2527540093287826e-03 + + 4.8993051052093506e-01 6.6240912675857544e-01 + <_> + + 0 -1 1320 1.4910609461367130e-03 + + 5.2867782115936279e-01 4.0400519967079163e-01 + <_> + + 0 -1 1321 -7.5435562757775187e-04 + + 6.0329902172088623e-01 4.7951200604438782e-01 + <_> + + 0 -1 1322 -6.9478838704526424e-03 + + 4.0844011306762695e-01 5.3735041618347168e-01 + <_> + + 0 -1 1323 2.8092920547351241e-04 + + 4.8460629582405090e-01 5.7593822479248047e-01 + <_> + + 0 -1 1324 9.6073717577382922e-04 + + 5.1647412776947021e-01 3.5549798607826233e-01 + <_> + + 0 -1 1325 -2.6883929967880249e-04 + + 5.6775820255279541e-01 4.7317659854888916e-01 + <_> + + 0 -1 1326 2.1599370520561934e-03 + + 4.7314870357513428e-01 7.0705670118331909e-01 + <_> + + 0 -1 1327 5.6235301308333874e-03 + + 5.2402430772781372e-01 2.7817919850349426e-01 + <_> + + 0 -1 1328 -5.0243991427123547e-03 + + 2.8370139002799988e-01 5.0623041391372681e-01 + <_> + + 0 -1 1329 -9.7611639648675919e-03 + + 7.4007177352905273e-01 4.9345690011978149e-01 + <_> + + 0 -1 1330 4.1515100747346878e-03 + + 5.1191312074661255e-01 3.4070080518722534e-01 + <_> + + 0 -1 1331 6.2465080991387367e-03 + + 4.9237880110740662e-01 6.5790587663650513e-01 + <_> + + 0 -1 1332 -7.0597478188574314e-03 + + 2.4347110092639923e-01 5.0328421592712402e-01 + <_> + + 0 -1 1333 -2.0587709732353687e-03 + + 5.9003108739852905e-01 4.6950870752334595e-01 + <_> + + 0 -1 1334 -2.4146060459315777e-03 + + 3.6473178863525391e-01 5.1892018318176270e-01 + <_> + + 0 -1 1335 -1.4817609917372465e-03 + + 6.0349482297897339e-01 4.9401280283927917e-01 + <_> + + 0 -1 1336 -6.3016400672495365e-03 + + 5.8189898729324341e-01 4.5604279637336731e-01 + <_> + + 0 -1 1337 3.4763428848236799e-03 + + 5.2174758911132812e-01 3.4839931130409241e-01 + <_> + + 0 -1 1338 -2.2250870242714882e-02 + + 2.3607000708580017e-01 5.0320827960968018e-01 + <_> + + 0 -1 1339 -3.0612550675868988e-02 + + 6.4991867542266846e-01 4.9149191379547119e-01 + <_> + + 0 -1 1340 1.3057479634881020e-02 + + 4.4133231043815613e-01 5.6837642192840576e-01 + <_> + + 0 -1 1341 -6.0095742810517550e-04 + + 4.3597310781478882e-01 5.3334832191467285e-01 + <_> + + 0 -1 1342 -4.1514250915497541e-04 + + 5.5040627717971802e-01 4.3260601162910461e-01 + <_> + + 0 -1 1343 -1.3776290230453014e-02 + + 4.0641129016876221e-01 5.2015489339828491e-01 + <_> + + 0 -1 1344 -3.2296508550643921e-02 + + 4.7351971268653870e-02 4.9771949648857117e-01 + <_> + + 0 -1 1345 5.3556978702545166e-02 + + 4.8817330598831177e-01 6.6669392585754395e-01 + <_> + + 0 -1 1346 8.1889545544981956e-03 + + 5.4000371694564819e-01 4.2408201098442078e-01 + <_> + + 0 -1 1347 2.1055320394225419e-04 + + 4.8020479083061218e-01 5.5638527870178223e-01 + <_> + + 0 -1 1348 -2.4382730480283499e-03 + + 7.3877930641174316e-01 4.7736850380897522e-01 + <_> + + 0 -1 1349 3.2835570164024830e-03 + + 5.2885460853576660e-01 3.1712919473648071e-01 + <_> + + 0 -1 1350 2.3729570675641298e-03 + + 4.7508129477500916e-01 7.0601707696914673e-01 + <_> + + 0 -1 1351 -1.4541699783876538e-03 + + 3.8117301464080811e-01 5.3307390213012695e-01 + <_> + 177 + 8.7696029663085938e+01 + + <_> + + 0 -1 1352 5.5755238980054855e-02 + + 4.0191569924354553e-01 6.8060368299484253e-01 + <_> + + 0 -1 1353 2.4730248842388391e-03 + + 3.3511489629745483e-01 5.9657198190689087e-01 + <_> + + 0 -1 1354 -3.5031698644161224e-04 + + 5.5577081441879272e-01 3.4822869300842285e-01 + <_> + + 0 -1 1355 5.4167630150914192e-04 + + 4.2608588933944702e-01 5.6933808326721191e-01 + <_> + + 0 -1 1356 7.7193678589537740e-04 + + 3.4942400455474854e-01 5.4336887598037720e-01 + <_> + + 0 -1 1357 -1.5999219613149762e-03 + + 4.0284991264343262e-01 5.4843592643737793e-01 + <_> + + 0 -1 1358 -1.1832080053864047e-04 + + 3.8069018721580505e-01 5.4254651069641113e-01 + <_> + + 0 -1 1359 3.2909031142480671e-04 + + 2.6201000809669495e-01 5.4295217990875244e-01 + <_> + + 0 -1 1360 2.9518108931370080e-04 + + 3.7997689843177795e-01 5.3992640972137451e-01 + <_> + + 0 -1 1361 9.0466710389591753e-05 + + 4.4336450099945068e-01 5.4402261972427368e-01 + <_> + + 0 -1 1362 1.5007190086180344e-05 + + 3.7196549773216248e-01 5.4091197252273560e-01 + <_> + + 0 -1 1363 1.3935610651969910e-01 + + 5.5253958702087402e-01 4.4790428876876831e-01 + <_> + + 0 -1 1364 1.6461990308016539e-03 + + 4.2645010352134705e-01 5.7721698284149170e-01 + <_> + + 0 -1 1365 4.9984431825578213e-04 + + 4.3595260381698608e-01 5.6858712434768677e-01 + <_> + + 0 -1 1366 -1.0971280280500650e-03 + + 3.3901369571685791e-01 5.2054089307785034e-01 + <_> + + 0 -1 1367 6.6919892560690641e-04 + + 4.5574560761451721e-01 5.9806597232818604e-01 + <_> + + 0 -1 1368 8.6471042595803738e-04 + + 5.1348412036895752e-01 2.9440331459045410e-01 + <_> + + 0 -1 1369 -2.7182599296793342e-04 + + 3.9065781235694885e-01 5.3771811723709106e-01 + <_> + + 0 -1 1370 3.0249499104684219e-05 + + 3.6796098947525024e-01 5.2256888151168823e-01 + <_> + + 0 -1 1371 -8.5225896909832954e-03 + + 7.2931021451950073e-01 4.8923650383949280e-01 + <_> + + 0 -1 1372 1.6705560265108943e-03 + + 4.3453249335289001e-01 5.6961381435394287e-01 + <_> + + 0 -1 1373 -7.1433838456869125e-03 + + 2.5912800431251526e-01 5.2256238460540771e-01 + <_> + + 0 -1 1374 -1.6319369897246361e-02 + + 6.9222790002822876e-01 4.6515759825706482e-01 + <_> + + 0 -1 1375 4.8034260980784893e-03 + + 5.3522628545761108e-01 3.2863029837608337e-01 + <_> + + 0 -1 1376 -7.5421929359436035e-03 + + 2.0405440032482147e-01 5.0345462560653687e-01 + <_> + + 0 -1 1377 -1.4363110065460205e-02 + + 6.8048888444900513e-01 4.8890590667724609e-01 + <_> + + 0 -1 1378 8.9063588529825211e-04 + + 5.3106957674026489e-01 3.8954809308052063e-01 + <_> + + 0 -1 1379 -4.4060191139578819e-03 + + 5.7415628433227539e-01 4.3724268674850464e-01 + <_> + + 0 -1 1380 -1.8862540309783071e-04 + + 2.8317859768867493e-01 5.0982052087783813e-01 + <_> + + 0 -1 1381 -3.7979281041771173e-03 + + 3.3725079894065857e-01 5.2465802431106567e-01 + <_> + + 0 -1 1382 1.4627049677073956e-04 + + 5.3066742420196533e-01 3.9117100834846497e-01 + <_> + + 0 -1 1383 -4.9164638767251745e-05 + + 5.4624962806701660e-01 3.9427208900451660e-01 + <_> + + 0 -1 1384 -3.3582501113414764e-02 + + 2.1578240394592285e-01 5.0482118129730225e-01 + <_> + + 0 -1 1385 -3.5339309833943844e-03 + + 6.4653122425079346e-01 4.8726969957351685e-01 + <_> + + 0 -1 1386 5.0144111737608910e-03 + + 4.6176680922508240e-01 6.2480747699737549e-01 + <_> + + 0 -1 1387 1.8817370757460594e-02 + + 5.2206891775131226e-01 2.0000520348548889e-01 + <_> + + 0 -1 1388 -1.3434339780360460e-03 + + 4.0145379304885864e-01 5.3016197681427002e-01 + <_> + + 0 -1 1389 1.7557960236445069e-03 + + 4.7940391302108765e-01 5.6531697511672974e-01 + <_> + + 0 -1 1390 -9.5637463033199310e-02 + + 2.0341950654983521e-01 5.0067067146301270e-01 + <_> + + 0 -1 1391 -2.2241229191422462e-02 + + 7.6724731922149658e-01 5.0463402271270752e-01 + <_> + + 0 -1 1392 -1.5575819648802280e-02 + + 7.4903422594070435e-01 4.7558510303497314e-01 + <_> + + 0 -1 1393 5.3599118255078793e-03 + + 5.3653037548065186e-01 4.0046709775924683e-01 + <_> + + 0 -1 1394 -2.1763499826192856e-02 + + 7.4015498161315918e-02 4.9641749262809753e-01 + <_> + + 0 -1 1395 -1.6561590135097504e-01 + + 2.8591030836105347e-01 5.2180862426757812e-01 + <_> + + 0 -1 1396 1.6461320046801120e-04 + + 4.1916158795356750e-01 5.3807932138442993e-01 + <_> + + 0 -1 1397 -8.9077502489089966e-03 + + 6.2731927633285522e-01 4.8774048686027527e-01 + <_> + + 0 -1 1398 8.6346449097618461e-04 + + 5.1599407196044922e-01 3.6710259318351746e-01 + <_> + + 0 -1 1399 -1.3751760125160217e-03 + + 5.8843767642974854e-01 4.5790839195251465e-01 + <_> + + 0 -1 1400 -1.4081239933148026e-03 + + 3.5605099797248840e-01 5.1399451494216919e-01 + <_> + + 0 -1 1401 -3.9342888630926609e-03 + + 5.9942889213562012e-01 4.6642720699310303e-01 + <_> + + 0 -1 1402 -3.1966928392648697e-02 + + 3.3454620838165283e-01 5.1441830396652222e-01 + <_> + + 0 -1 1403 -1.5089280168467667e-05 + + 5.5826562643051147e-01 4.4140571355819702e-01 + <_> + + 0 -1 1404 5.1994470413774252e-04 + + 4.6236801147460938e-01 6.1689937114715576e-01 + <_> + + 0 -1 1405 -3.4220460802316666e-03 + + 6.5570747852325439e-01 4.9748051166534424e-01 + <_> + + 0 -1 1406 1.7723299970384687e-04 + + 5.2695018053054810e-01 3.9019080996513367e-01 + <_> + + 0 -1 1407 1.5716759953647852e-03 + + 4.6333730220794678e-01 5.7904577255249023e-01 + <_> + + 0 -1 1408 -8.9041329920291901e-03 + + 2.6896080374717712e-01 5.0535911321640015e-01 + <_> + + 0 -1 1409 4.0677518700249493e-04 + + 5.4566031694412231e-01 4.3298989534378052e-01 + <_> + + 0 -1 1410 6.7604780197143555e-03 + + 4.6489939093589783e-01 6.6897618770599365e-01 + <_> + + 0 -1 1411 2.9100088868290186e-03 + + 5.3097039461135864e-01 3.3778399229049683e-01 + <_> + + 0 -1 1412 1.3885459629818797e-03 + + 4.0747389197349548e-01 5.3491330146789551e-01 + <_> + + 0 -1 1413 -7.6764263212680817e-02 + + 1.9921760261058807e-01 5.2282422780990601e-01 + <_> + + 0 -1 1414 -2.2688310127705336e-04 + + 5.4385018348693848e-01 4.2530721426010132e-01 + <_> + + 0 -1 1415 -6.3094152137637138e-03 + + 4.2591789364814758e-01 5.3789097070693970e-01 + <_> + + 0 -1 1416 -1.1007279902696609e-01 + + 6.9041568040847778e-01 4.7217491269111633e-01 + <_> + + 0 -1 1417 2.8619659133255482e-04 + + 4.5249149203300476e-01 5.5483061075210571e-01 + <_> + + 0 -1 1418 2.9425329557852820e-05 + + 5.3703737258911133e-01 4.2364639043807983e-01 + <_> + + 0 -1 1419 -2.4886570870876312e-02 + + 6.4235579967498779e-01 4.9693039059638977e-01 + <_> + + 0 -1 1420 3.3148851245641708e-02 + + 4.9884751439094543e-01 1.6138119995594025e-01 + <_> + + 0 -1 1421 7.8491691965609789e-04 + + 5.4160261154174805e-01 4.2230090498924255e-01 + <_> + + 0 -1 1422 4.7087189741432667e-03 + + 4.5763289928436279e-01 6.0275578498840332e-01 + <_> + + 0 -1 1423 2.4144479539245367e-03 + + 5.3089731931686401e-01 4.4224989414215088e-01 + <_> + + 0 -1 1424 1.9523180089890957e-03 + + 4.7056341171264648e-01 6.6633248329162598e-01 + <_> + + 0 -1 1425 1.3031980488449335e-03 + + 4.4061261415481567e-01 5.5269622802734375e-01 + <_> + + 0 -1 1426 4.4735497795045376e-03 + + 5.1290237903594971e-01 3.3014988899230957e-01 + <_> + + 0 -1 1427 -2.6652868837118149e-03 + + 3.1354710459709167e-01 5.1750361919403076e-01 + <_> + + 0 -1 1428 1.3666770246345550e-04 + + 4.1193708777427673e-01 5.3068768978118896e-01 + <_> + + 0 -1 1429 -1.7126450315117836e-02 + + 6.1778062582015991e-01 4.8365789651870728e-01 + <_> + + 0 -1 1430 -2.6601430727168918e-04 + + 3.6543309688568115e-01 5.1697367429733276e-01 + <_> + + 0 -1 1431 -2.2932380437850952e-02 + + 3.4909150004386902e-01 5.1639920473098755e-01 + <_> + + 0 -1 1432 2.3316550068557262e-03 + + 5.1662999391555786e-01 3.7093898653984070e-01 + <_> + + 0 -1 1433 1.6925660893321037e-02 + + 5.0147360563278198e-01 8.0539882183074951e-01 + <_> + + 0 -1 1434 -8.9858826249837875e-03 + + 6.4707887172698975e-01 4.6570208668708801e-01 + <_> + + 0 -1 1435 -1.1874699965119362e-02 + + 3.2463788986206055e-01 5.2587550878524780e-01 + <_> + + 0 -1 1436 1.9350569345988333e-04 + + 5.1919418573379517e-01 3.8396438956260681e-01 + <_> + + 0 -1 1437 5.8713490143418312e-03 + + 4.9181339144706726e-01 6.1870431900024414e-01 + <_> + + 0 -1 1438 -2.4838790297508240e-01 + + 1.8368029594421387e-01 4.9881500005722046e-01 + <_> + + 0 -1 1439 1.2256000190973282e-02 + + 5.2270537614822388e-01 3.6320298910140991e-01 + <_> + + 0 -1 1440 8.3990179700776935e-04 + + 4.4902500510215759e-01 5.7741481065750122e-01 + <_> + + 0 -1 1441 2.5407369248569012e-03 + + 4.8047870397567749e-01 5.8582991361618042e-01 + <_> + + 0 -1 1442 -1.4822429977357388e-02 + + 2.5210499763488770e-01 5.0235372781753540e-01 + <_> + + 0 -1 1443 -5.7973959483206272e-03 + + 5.9966957569122314e-01 4.8537150025367737e-01 + <_> + + 0 -1 1444 7.2662148158997297e-04 + + 5.1537168025970459e-01 3.6717799305915833e-01 + <_> + + 0 -1 1445 -1.7232580110430717e-02 + + 6.6217190027236938e-01 4.9946561455726624e-01 + <_> + + 0 -1 1446 7.8624086454510689e-03 + + 4.6333950757980347e-01 6.2561017274856567e-01 + <_> + + 0 -1 1447 -4.7343620099127293e-03 + + 3.6155730485916138e-01 5.2818852663040161e-01 + <_> + + 0 -1 1448 8.3048478700220585e-04 + + 4.4428890943527222e-01 5.5509579181671143e-01 + <_> + + 0 -1 1449 7.6602199114859104e-03 + + 5.1629352569580078e-01 2.6133549213409424e-01 + <_> + + 0 -1 1450 -4.1048377752304077e-03 + + 2.7896320819854736e-01 5.0190317630767822e-01 + <_> + + 0 -1 1451 4.8512578941881657e-03 + + 4.9689841270446777e-01 5.6616681814193726e-01 + <_> + + 0 -1 1452 9.9896453320980072e-04 + + 4.4456079602241516e-01 5.5518132448196411e-01 + <_> + + 0 -1 1453 -2.7023631334304810e-01 + + 2.9388209804892540e-02 5.1513141393661499e-01 + <_> + + 0 -1 1454 -1.3090680353343487e-02 + + 5.6993997097015381e-01 4.4474598765373230e-01 + <_> + + 0 -1 1455 -9.4342790544033051e-03 + + 4.3054661154747009e-01 5.4878950119018555e-01 + <_> + + 0 -1 1456 -1.5482039889320731e-03 + + 3.6803171038627625e-01 5.1280808448791504e-01 + <_> + + 0 -1 1457 5.3746132180094719e-03 + + 4.8389169573783875e-01 6.1015558242797852e-01 + <_> + + 0 -1 1458 1.5786769799888134e-03 + + 5.3252232074737549e-01 4.1185480356216431e-01 + <_> + + 0 -1 1459 3.6856050137430429e-03 + + 4.8109480738639832e-01 6.2523031234741211e-01 + <_> + + 0 -1 1460 9.3887019902467728e-03 + + 5.2002298831939697e-01 3.6294108629226685e-01 + <_> + + 0 -1 1461 1.2792630121111870e-02 + + 4.9617099761962891e-01 6.7380160093307495e-01 + <_> + + 0 -1 1462 -3.3661040943115950e-03 + + 4.0602791309356689e-01 5.2835988998413086e-01 + <_> + + 0 -1 1463 3.9771420415490866e-04 + + 4.6741139888763428e-01 5.9007751941680908e-01 + <_> + + 0 -1 1464 1.4868030557408929e-03 + + 4.5191168785095215e-01 6.0820537805557251e-01 + <_> + + 0 -1 1465 -8.8686749339103699e-02 + + 2.8078991174697876e-01 5.1809918880462646e-01 + <_> + + 0 -1 1466 -7.4296112870797515e-05 + + 5.2955842018127441e-01 4.0876251459121704e-01 + <_> + + 0 -1 1467 -1.4932939848222304e-05 + + 5.4614001512527466e-01 4.5385429263114929e-01 + <_> + + 0 -1 1468 5.9162238612771034e-03 + + 5.3291612863540649e-01 4.1921341419219971e-01 + <_> + + 0 -1 1469 1.1141640134155750e-03 + + 4.5120179653167725e-01 5.7062172889709473e-01 + <_> + + 0 -1 1470 8.9249362645205110e-05 + + 4.5778059959411621e-01 5.8976382017135620e-01 + <_> + + 0 -1 1471 2.5319510605186224e-03 + + 5.2996039390563965e-01 3.3576390147209167e-01 + <_> + + 0 -1 1472 1.2426200322806835e-02 + + 4.9590590596199036e-01 1.3466019928455353e-01 + <_> + + 0 -1 1473 2.8335750102996826e-02 + + 5.1170790195465088e-01 6.1043637106195092e-04 + <_> + + 0 -1 1474 6.6165882162749767e-03 + + 4.7363498806953430e-01 7.0116281509399414e-01 + <_> + + 0 -1 1475 8.0468766391277313e-03 + + 5.2164179086685181e-01 3.2828199863433838e-01 + <_> + + 0 -1 1476 -1.1193980462849140e-03 + + 5.8098608255386353e-01 4.5637390017509460e-01 + <_> + + 0 -1 1477 1.3277590274810791e-02 + + 5.3983622789382935e-01 4.1039010882377625e-01 + <_> + + 0 -1 1478 4.8794739996083081e-04 + + 4.2492860555648804e-01 5.4105907678604126e-01 + <_> + + 0 -1 1479 1.1243170127272606e-02 + + 5.2699637413024902e-01 3.4382158517837524e-01 + <_> + + 0 -1 1480 -8.9896668214350939e-04 + + 5.6330758333206177e-01 4.4566130638122559e-01 + <_> + + 0 -1 1481 6.6677159629762173e-03 + + 5.3128892183303833e-01 4.3626791238784790e-01 + <_> + + 0 -1 1482 2.8947299346327782e-02 + + 4.7017949819564819e-01 6.5757977962493896e-01 + <_> + + 0 -1 1483 -2.3400049656629562e-02 + + 0. 5.1373988389968872e-01 + <_> + + 0 -1 1484 -8.9117050170898438e-02 + + 2.3745279759168625e-02 4.9424308538436890e-01 + <_> + + 0 -1 1485 -1.4054600149393082e-02 + + 3.1273230910301208e-01 5.1175111532211304e-01 + <_> + + 0 -1 1486 8.1239398568868637e-03 + + 5.0090491771697998e-01 2.5200259685516357e-01 + <_> + + 0 -1 1487 -4.9964650534093380e-03 + + 6.3871437311172485e-01 4.9278119206428528e-01 + <_> + + 0 -1 1488 3.1253970228135586e-03 + + 5.1368498802185059e-01 3.6804521083831787e-01 + <_> + + 0 -1 1489 6.7669642157852650e-03 + + 5.5098438262939453e-01 4.3636319041252136e-01 + <_> + + 0 -1 1490 -2.3711440153419971e-03 + + 6.1623352766036987e-01 4.5869469642639160e-01 + <_> + + 0 -1 1491 -5.3522791713476181e-03 + + 6.1854577064514160e-01 4.9204909801483154e-01 + <_> + + 0 -1 1492 -1.5968859195709229e-02 + + 1.3826179504394531e-01 4.9832528829574585e-01 + <_> + + 0 -1 1493 4.7676060348749161e-03 + + 4.6880578994750977e-01 5.4900461435317993e-01 + <_> + + 0 -1 1494 -2.4714691098779440e-03 + + 2.3685149848461151e-01 5.0039529800415039e-01 + <_> + + 0 -1 1495 -7.1033788844943047e-04 + + 5.8563941717147827e-01 4.7215330600738525e-01 + <_> + + 0 -1 1496 -1.4117559790611267e-01 + + 8.6900062859058380e-02 4.9615910649299622e-01 + <_> + + 0 -1 1497 1.0651809722185135e-01 + + 5.1388370990753174e-01 1.7410050332546234e-01 + <_> + + 0 -1 1498 -5.2744749933481216e-02 + + 7.3536360263824463e-01 4.7728818655014038e-01 + <_> + + 0 -1 1499 -4.7431760467588902e-03 + + 3.8844060897827148e-01 5.2927017211914062e-01 + <_> + + 0 -1 1500 9.9676765967160463e-04 + + 5.2234929800033569e-01 4.0034240484237671e-01 + <_> + + 0 -1 1501 8.0284131690859795e-03 + + 4.9591061472892761e-01 7.2129642963409424e-01 + <_> + + 0 -1 1502 8.6025858763605356e-04 + + 4.4448840618133545e-01 5.5384761095046997e-01 + <_> + + 0 -1 1503 9.3191501218825579e-04 + + 5.3983712196350098e-01 4.1632440686225891e-01 + <_> + + 0 -1 1504 -2.5082060601562262e-03 + + 5.8542650938034058e-01 4.5625001192092896e-01 + <_> + + 0 -1 1505 -2.1378761157393456e-03 + + 4.6080690622329712e-01 5.2802592515945435e-01 + <_> + + 0 -1 1506 -2.1546049974858761e-03 + + 3.7911269068717957e-01 5.2559971809387207e-01 + <_> + + 0 -1 1507 -7.6214009895920753e-03 + + 5.9986090660095215e-01 4.9520739912986755e-01 + <_> + + 0 -1 1508 2.2055360022932291e-03 + + 4.4842061400413513e-01 5.5885308980941772e-01 + <_> + + 0 -1 1509 1.2586950324475765e-03 + + 5.4507470130920410e-01 4.4238409399986267e-01 + <_> + + 0 -1 1510 -5.0926720723509789e-03 + + 4.1182750463485718e-01 5.2630358934402466e-01 + <_> + + 0 -1 1511 -2.5095739401876926e-03 + + 5.7879078388214111e-01 4.9984949827194214e-01 + <_> + + 0 -1 1512 -7.7327556908130646e-02 + + 8.3978658914566040e-01 4.8111200332641602e-01 + <_> + + 0 -1 1513 -4.1485819965600967e-02 + + 2.4086110293865204e-01 5.1769930124282837e-01 + <_> + + 0 -1 1514 1.0355669655837119e-04 + + 4.3553608655929565e-01 5.4170542955398560e-01 + <_> + + 0 -1 1515 1.3255809899419546e-03 + + 5.4539710283279419e-01 4.8940950632095337e-01 + <_> + + 0 -1 1516 -8.0598732456564903e-03 + + 5.7710242271423340e-01 4.5779189467430115e-01 + <_> + + 0 -1 1517 1.9058620557188988e-02 + + 5.1698678731918335e-01 3.4004750847816467e-01 + <_> + + 0 -1 1518 -3.5057891160249710e-02 + + 2.2032439708709717e-01 5.0005030632019043e-01 + <_> + + 0 -1 1519 5.7296059094369411e-03 + + 5.0434082746505737e-01 6.5975707769393921e-01 + <_> + + 0 -1 1520 -1.1648329906165600e-02 + + 2.1862849593162537e-01 4.9966529011726379e-01 + <_> + + 0 -1 1521 1.4544479781761765e-03 + + 5.0076818466186523e-01 5.5037277936935425e-01 + <_> + + 0 -1 1522 -2.5030909455381334e-04 + + 4.1298410296440125e-01 5.2416700124740601e-01 + <_> + + 0 -1 1523 -8.2907272735610604e-04 + + 5.4128682613372803e-01 4.9744960665702820e-01 + <_> + + 0 -1 1524 1.0862209601327777e-03 + + 4.6055299043655396e-01 5.8792287111282349e-01 + <_> + + 0 -1 1525 2.0000500080641359e-04 + + 5.2788549661636353e-01 4.7052091360092163e-01 + <_> + + 0 -1 1526 2.9212920926511288e-03 + + 5.1296097040176392e-01 3.7555369734764099e-01 + <_> + + 0 -1 1527 2.5387400761246681e-02 + + 4.8226919770240784e-01 5.7907682657241821e-01 + <_> + + 0 -1 1528 -3.1968469265848398e-03 + + 5.2483952045440674e-01 3.9628401398658752e-01 + <_> + 182 + 9.0253349304199219e+01 + + <_> + + 0 -1 1529 5.8031738735735416e-03 + + 3.4989839792251587e-01 5.9619832038879395e-01 + <_> + + 0 -1 1530 -9.0003069490194321e-03 + + 6.8166369199752808e-01 4.4785520434379578e-01 + <_> + + 0 -1 1531 -1.1549659539014101e-03 + + 5.5857062339782715e-01 3.5782510042190552e-01 + <_> + + 0 -1 1532 -1.1069850297644734e-03 + + 5.3650361299514771e-01 3.0504280328750610e-01 + <_> + + 0 -1 1533 1.0308309720130637e-04 + + 3.6390951275825500e-01 5.3446358442306519e-01 + <_> + + 0 -1 1534 -5.0984839908778667e-03 + + 2.8591570258140564e-01 5.5042648315429688e-01 + <_> + + 0 -1 1535 8.2572200335562229e-04 + + 5.2365237474441528e-01 3.4760418534278870e-01 + <_> + + 0 -1 1536 9.9783325567841530e-03 + + 4.7503221035003662e-01 6.2196469306945801e-01 + <_> + + 0 -1 1537 -3.7402529269456863e-02 + + 3.3433759212493896e-01 5.2780628204345703e-01 + <_> + + 0 -1 1538 4.8548257909715176e-03 + + 5.1921808719635010e-01 3.7004441022872925e-01 + <_> + + 0 -1 1539 -1.8664470408111811e-03 + + 2.9298439621925354e-01 5.0919449329376221e-01 + <_> + + 0 -1 1540 1.6888890415430069e-02 + + 3.6868458986282349e-01 5.4312258958816528e-01 + <_> + + 0 -1 1541 -5.8372621424496174e-03 + + 3.6321839690208435e-01 5.2213358879089355e-01 + <_> + + 0 -1 1542 -1.4713739510625601e-03 + + 5.8706837892532349e-01 4.7006508708000183e-01 + <_> + + 0 -1 1543 -1.1522950371727347e-03 + + 3.1958949565887451e-01 5.1409542560577393e-01 + <_> + + 0 -1 1544 -4.2560300789773464e-03 + + 6.3018590211868286e-01 4.8149210214614868e-01 + <_> + + 0 -1 1545 -6.7378291860222816e-03 + + 1.9770480692386627e-01 5.0258082151412964e-01 + <_> + + 0 -1 1546 1.1382670141756535e-02 + + 4.9541321396827698e-01 6.8670457601547241e-01 + <_> + + 0 -1 1547 5.1794708706438541e-03 + + 5.1644277572631836e-01 3.3506479859352112e-01 + <_> + + 0 -1 1548 -1.1743789911270142e-01 + + 2.3152460157871246e-01 5.2344137430191040e-01 + <_> + + 0 -1 1549 2.8703449293971062e-02 + + 4.6642971038818359e-01 6.7225211858749390e-01 + <_> + + 0 -1 1550 4.8231030814349651e-03 + + 5.2208751440048218e-01 2.7235329151153564e-01 + <_> + + 0 -1 1551 2.6798530016094446e-03 + + 5.0792771577835083e-01 2.9069489240646362e-01 + <_> + + 0 -1 1552 8.0504082143306732e-03 + + 4.8859509825706482e-01 6.3950210809707642e-01 + <_> + + 0 -1 1553 4.8054959625005722e-03 + + 5.1972568035125732e-01 3.6566638946533203e-01 + <_> + + 0 -1 1554 -2.2420159075409174e-03 + + 6.1534678936004639e-01 4.7637018561363220e-01 + <_> + + 0 -1 1555 -1.3757710345089436e-02 + + 2.6373448967933655e-01 5.0309032201766968e-01 + <_> + + 0 -1 1556 -1.0338299721479416e-01 + + 2.2875219583511353e-01 5.1824611425399780e-01 + <_> + + 0 -1 1557 -9.4432085752487183e-03 + + 6.9533038139343262e-01 4.6949490904808044e-01 + <_> + + 0 -1 1558 8.0271181650459766e-04 + + 5.4506552219390869e-01 4.2687839269638062e-01 + <_> + + 0 -1 1559 -4.1945669800043106e-03 + + 6.0913878679275513e-01 4.5716428756713867e-01 + <_> + + 0 -1 1560 1.0942210443317890e-02 + + 5.2410632371902466e-01 3.2845470309257507e-01 + <_> + + 0 -1 1561 -5.7841069065034389e-04 + + 5.3879290819168091e-01 4.1793689131736755e-01 + <_> + + 0 -1 1562 -2.0888620056211948e-03 + + 4.2926910519599915e-01 5.3017157316207886e-01 + <_> + + 0 -1 1563 3.2383969519287348e-03 + + 3.7923479080200195e-01 5.2207440137863159e-01 + <_> + + 0 -1 1564 4.9075027927756310e-03 + + 5.2372831106185913e-01 4.1267579793930054e-01 + <_> + + 0 -1 1565 -3.2277941703796387e-02 + + 1.9476559758186340e-01 4.9945020675659180e-01 + <_> + + 0 -1 1566 -8.9711230248212814e-03 + + 6.0112851858139038e-01 4.9290320277214050e-01 + <_> + + 0 -1 1567 1.5321089886128902e-02 + + 5.0097537040710449e-01 2.0398220419883728e-01 + <_> + + 0 -1 1568 2.0855569746345282e-03 + + 4.8621898889541626e-01 5.7216948270797729e-01 + <_> + + 0 -1 1569 5.0615021027624607e-03 + + 5.0002187490463257e-01 1.8018059432506561e-01 + <_> + + 0 -1 1570 -3.7174751050770283e-03 + + 5.5301171541213989e-01 4.8975929617881775e-01 + <_> + + 0 -1 1571 -1.2170500122010708e-02 + + 4.1786059737205505e-01 5.3837239742279053e-01 + <_> + + 0 -1 1572 4.6248398721218109e-03 + + 4.9971699714660645e-01 5.7613271474838257e-01 + <_> + + 0 -1 1573 -2.1040429419372231e-04 + + 5.3318071365356445e-01 4.0976810455322266e-01 + <_> + + 0 -1 1574 -1.4641780406236649e-02 + + 5.7559251785278320e-01 5.0517761707305908e-01 + <_> + + 0 -1 1575 3.3199489116668701e-03 + + 4.5769768953323364e-01 6.0318058729171753e-01 + <_> + + 0 -1 1576 3.7236879579722881e-03 + + 4.3803969025611877e-01 5.4158830642700195e-01 + <_> + + 0 -1 1577 8.2951161311939359e-04 + + 5.1630318164825439e-01 3.7022191286087036e-01 + <_> + + 0 -1 1578 -1.1408490128815174e-02 + + 6.0729467868804932e-01 4.8625651001930237e-01 + <_> + + 0 -1 1579 -4.5320121571421623e-03 + + 3.2924759387969971e-01 5.0889629125595093e-01 + <_> + + 0 -1 1580 5.1276017911732197e-03 + + 4.8297679424285889e-01 6.1227089166641235e-01 + <_> + + 0 -1 1581 9.8583158105611801e-03 + + 4.6606799960136414e-01 6.5561771392822266e-01 + <_> + + 0 -1 1582 3.6985918879508972e-02 + + 5.2048492431640625e-01 1.6904720664024353e-01 + <_> + + 0 -1 1583 4.6491161920130253e-03 + + 5.1673221588134766e-01 3.7252250313758850e-01 + <_> + + 0 -1 1584 -4.2664702050387859e-03 + + 6.4064931869506836e-01 4.9873429536819458e-01 + <_> + + 0 -1 1585 -4.7956590424291790e-04 + + 5.8972930908203125e-01 4.4648739695549011e-01 + <_> + + 0 -1 1586 3.6827160511165857e-03 + + 5.4415607452392578e-01 3.4726628661155701e-01 + <_> + + 0 -1 1587 -1.0059880092740059e-02 + + 2.1431629359722137e-01 5.0048297643661499e-01 + <_> + + 0 -1 1588 -3.0361840617842972e-04 + + 5.3864240646362305e-01 4.5903238654136658e-01 + <_> + + 0 -1 1589 -1.4545479789376259e-03 + + 5.7511842250823975e-01 4.4970950484275818e-01 + <_> + + 0 -1 1590 1.6515209572389722e-03 + + 5.4219377040863037e-01 4.2385208606719971e-01 + <_> + + 0 -1 1591 -7.8468639403581619e-03 + + 4.0779209136962891e-01 5.2581572532653809e-01 + <_> + + 0 -1 1592 -5.1259850151836872e-03 + + 4.2292758822441101e-01 5.4794532060623169e-01 + <_> + + 0 -1 1593 -3.6890961229801178e-02 + + 6.5963757038116455e-01 4.6746781468391418e-01 + <_> + + 0 -1 1594 2.4035639944486320e-04 + + 4.2511358857154846e-01 5.5732029676437378e-01 + <_> + + 0 -1 1595 -1.5150169929256663e-05 + + 5.2592468261718750e-01 4.0741148591041565e-01 + <_> + + 0 -1 1596 2.2108471021056175e-03 + + 4.6717229485511780e-01 5.8863520622253418e-01 + <_> + + 0 -1 1597 -1.1568620102480054e-03 + + 5.7110661268234253e-01 4.4871619343757629e-01 + <_> + + 0 -1 1598 4.9996292218565941e-03 + + 5.2641981840133667e-01 2.8983271121978760e-01 + <_> + + 0 -1 1599 -1.4656189596280456e-03 + + 3.8917380571365356e-01 5.1978719234466553e-01 + <_> + + 0 -1 1600 -1.1975039960816503e-03 + + 5.7958728075027466e-01 4.9279558658599854e-01 + <_> + + 0 -1 1601 -4.4954330660402775e-03 + + 2.3776030540466309e-01 5.0125551223754883e-01 + <_> + + 0 -1 1602 1.4997160178609192e-04 + + 4.8766261339187622e-01 5.6176078319549561e-01 + <_> + + 0 -1 1603 2.6391509454697371e-03 + + 5.1680880784988403e-01 3.7655091285705566e-01 + <_> + + 0 -1 1604 -2.9368131072260439e-04 + + 5.4466491937637329e-01 4.8746308684349060e-01 + <_> + + 0 -1 1605 1.4211760135367513e-03 + + 4.6878978610038757e-01 6.6913318634033203e-01 + <_> + + 0 -1 1606 7.9427637159824371e-02 + + 5.1934438943862915e-01 2.7329459786415100e-01 + <_> + + 0 -1 1607 7.9937502741813660e-02 + + 4.9717310070991516e-01 1.7820839583873749e-01 + <_> + + 0 -1 1608 1.1089259758591652e-02 + + 5.1659947633743286e-01 3.2094758749008179e-01 + <_> + + 0 -1 1609 1.6560709627810866e-04 + + 4.0584719181060791e-01 5.3072762489318848e-01 + <_> + + 0 -1 1610 -5.3354292176663876e-03 + + 3.4450569748878479e-01 5.1581299304962158e-01 + <_> + + 0 -1 1611 1.1287260567769408e-03 + + 4.5948630571365356e-01 6.0755330324172974e-01 + <_> + + 0 -1 1612 -2.1969219669699669e-02 + + 1.6804009675979614e-01 5.2285957336425781e-01 + <_> + + 0 -1 1613 -2.1775320055894554e-04 + + 3.8615968823432922e-01 5.2156728506088257e-01 + <_> + + 0 -1 1614 2.0200149447191507e-04 + + 5.5179792642593384e-01 4.3630391359329224e-01 + <_> + + 0 -1 1615 -2.1733149886131287e-02 + + 7.9994601011276245e-01 4.7898510098457336e-01 + <_> + + 0 -1 1616 -8.4399932529777288e-04 + + 4.0859758853912354e-01 5.3747731447219849e-01 + <_> + + 0 -1 1617 -4.3895249837078154e-04 + + 5.4704052209854126e-01 4.3661430478096008e-01 + <_> + + 0 -1 1618 1.5092400135472417e-03 + + 4.9889969825744629e-01 5.8421492576599121e-01 + <_> + + 0 -1 1619 -3.5547839943319559e-03 + + 6.7536902427673340e-01 4.7210058569908142e-01 + <_> + + 0 -1 1620 4.8191400128416717e-04 + + 5.4158538579940796e-01 4.3571090698242188e-01 + <_> + + 0 -1 1621 -6.0264398343861103e-03 + + 2.2585099935531616e-01 4.9918809533119202e-01 + <_> + + 0 -1 1622 -1.1668140068650246e-02 + + 6.2565547227859497e-01 4.9274989962577820e-01 + <_> + + 0 -1 1623 -2.8718370012938976e-03 + + 3.9477849006652832e-01 5.2458018064498901e-01 + <_> + + 0 -1 1624 1.7051169648766518e-02 + + 4.7525110840797424e-01 5.7942241430282593e-01 + <_> + + 0 -1 1625 -1.3352080248296261e-02 + + 6.0411047935485840e-01 4.5445358753204346e-01 + <_> + + 0 -1 1626 -3.9301801007241011e-04 + + 4.2582759261131287e-01 5.5449050664901733e-01 + <_> + + 0 -1 1627 3.0483349692076445e-03 + + 5.2334201335906982e-01 3.7802729010581970e-01 + <_> + + 0 -1 1628 -4.3579288758337498e-03 + + 6.3718891143798828e-01 4.8386740684509277e-01 + <_> + + 0 -1 1629 5.6661018170416355e-03 + + 5.3747057914733887e-01 4.1636660695075989e-01 + <_> + + 0 -1 1630 6.0677339206449687e-05 + + 4.6387958526611328e-01 5.3116250038146973e-01 + <_> + + 0 -1 1631 3.6738160997629166e-02 + + 4.6886560320854187e-01 6.4665240049362183e-01 + <_> + + 0 -1 1632 8.6528137326240540e-03 + + 5.2043187618255615e-01 2.1886579692363739e-01 + <_> + + 0 -1 1633 -1.5371359884738922e-01 + + 1.6303719580173492e-01 4.9588400125503540e-01 + <_> + + 0 -1 1634 -4.1560421232134104e-04 + + 5.7744592428207397e-01 4.6964588761329651e-01 + <_> + + 0 -1 1635 -1.2640169588848948e-03 + + 3.9771759510040283e-01 5.2171981334686279e-01 + <_> + + 0 -1 1636 -3.5473341122269630e-03 + + 6.0465282201766968e-01 4.8083150386810303e-01 + <_> + + 0 -1 1637 3.0019069527043030e-05 + + 3.9967238903045654e-01 5.2282011508941650e-01 + <_> + + 0 -1 1638 1.3113019522279501e-03 + + 4.7121581435203552e-01 5.7659977674484253e-01 + <_> + + 0 -1 1639 -1.3374709524214268e-03 + + 4.1095849871635437e-01 5.2531701326370239e-01 + <_> + + 0 -1 1640 2.0876709371805191e-02 + + 5.2029937505722046e-01 1.7579819262027740e-01 + <_> + + 0 -1 1641 -7.5497948564589024e-03 + + 6.5666097402572632e-01 4.6949750185012817e-01 + <_> + + 0 -1 1642 2.4188550189137459e-02 + + 5.1286739110946655e-01 3.3702209591865540e-01 + <_> + + 0 -1 1643 -2.9358828905969858e-03 + + 6.5807867050170898e-01 4.6945410966873169e-01 + <_> + + 0 -1 1644 5.7557929307222366e-02 + + 5.1464450359344482e-01 2.7752599120140076e-01 + <_> + + 0 -1 1645 -1.1343370424583554e-03 + + 3.8366019725799561e-01 5.1926672458648682e-01 + <_> + + 0 -1 1646 1.6816999763250351e-02 + + 5.0855928659439087e-01 6.1772608757019043e-01 + <_> + + 0 -1 1647 5.0535178743302822e-03 + + 5.1387631893157959e-01 3.6847919225692749e-01 + <_> + + 0 -1 1648 -4.5874710194766521e-03 + + 5.9896552562713623e-01 4.8352020978927612e-01 + <_> + + 0 -1 1649 1.6882460331544280e-03 + + 4.5094868540763855e-01 5.7230567932128906e-01 + <_> + + 0 -1 1650 -1.6554000321775675e-03 + + 3.4967708587646484e-01 5.2433192729949951e-01 + <_> + + 0 -1 1651 -1.9373800605535507e-02 + + 1.1205369979143143e-01 4.9687129259109497e-01 + <_> + + 0 -1 1652 1.0374450124800205e-02 + + 5.1481968164443970e-01 4.3952131271362305e-01 + <_> + + 0 -1 1653 1.4973050565458834e-04 + + 4.0849998593330383e-01 5.2698868513107300e-01 + <_> + + 0 -1 1654 -4.2981930077075958e-02 + + 6.3941049575805664e-01 5.0185042619705200e-01 + <_> + + 0 -1 1655 8.3065936341881752e-03 + + 4.7075539827346802e-01 6.6983532905578613e-01 + <_> + + 0 -1 1656 -4.1285790503025055e-03 + + 4.5413690805435181e-01 5.3236472606658936e-01 + <_> + + 0 -1 1657 1.7399420030415058e-03 + + 4.3339619040489197e-01 5.4398661851882935e-01 + <_> + + 0 -1 1658 1.1739750334527344e-04 + + 4.5796871185302734e-01 5.5434262752532959e-01 + <_> + + 0 -1 1659 1.8585780344437808e-04 + + 4.3246439099311829e-01 5.4267549514770508e-01 + <_> + + 0 -1 1660 5.5587692186236382e-03 + + 5.2572208642959595e-01 3.5506111383438110e-01 + <_> + + 0 -1 1661 -7.9851560294628143e-03 + + 6.0430181026458740e-01 4.6306359767913818e-01 + <_> + + 0 -1 1662 6.0594122624024749e-04 + + 4.5982548594474792e-01 5.5331951379776001e-01 + <_> + + 0 -1 1663 -2.2983040253166109e-04 + + 4.1307520866394043e-01 5.3224611282348633e-01 + <_> + + 0 -1 1664 4.3740210821852088e-04 + + 4.0430399775505066e-01 5.4092890024185181e-01 + <_> + + 0 -1 1665 2.9482020181603730e-04 + + 4.4949638843536377e-01 5.6288522481918335e-01 + <_> + + 0 -1 1666 1.0312659665942192e-02 + + 5.1775109767913818e-01 2.7043169736862183e-01 + <_> + + 0 -1 1667 -7.7241109684109688e-03 + + 1.9880190491676331e-01 4.9805539846420288e-01 + <_> + + 0 -1 1668 -4.6797208487987518e-03 + + 6.6447502374649048e-01 5.0182962417602539e-01 + <_> + + 0 -1 1669 -5.0755459815263748e-03 + + 3.8983049988746643e-01 5.1852691173553467e-01 + <_> + + 0 -1 1670 2.2479740437120199e-03 + + 4.8018088936805725e-01 5.6603360176086426e-01 + <_> + + 0 -1 1671 8.3327008178457618e-04 + + 5.2109199762344360e-01 3.9571881294250488e-01 + <_> + + 0 -1 1672 -4.1279330849647522e-02 + + 6.1545419692993164e-01 5.0070542097091675e-01 + <_> + + 0 -1 1673 -5.0930189900100231e-04 + + 3.9759421348571777e-01 5.2284038066864014e-01 + <_> + + 0 -1 1674 1.2568780221045017e-03 + + 4.9791380763053894e-01 5.9391832351684570e-01 + <_> + + 0 -1 1675 8.0048497766256332e-03 + + 4.9844971299171448e-01 1.6333660483360291e-01 + <_> + + 0 -1 1676 -1.1879300000146031e-03 + + 5.9049648046493530e-01 4.9426248669624329e-01 + <_> + + 0 -1 1677 6.1948952497914433e-04 + + 4.1995579004287720e-01 5.3287261724472046e-01 + <_> + + 0 -1 1678 6.6829859279096127e-03 + + 5.4186028242111206e-01 4.9058890342712402e-01 + <_> + + 0 -1 1679 -3.7062340416014194e-03 + + 3.7259390950202942e-01 5.1380002498626709e-01 + <_> + + 0 -1 1680 -3.9739411324262619e-02 + + 6.4789611101150513e-01 5.0503468513488770e-01 + <_> + + 0 -1 1681 1.4085009461268783e-03 + + 4.6823391318321228e-01 6.3778841495513916e-01 + <_> + + 0 -1 1682 3.9322688826359808e-04 + + 5.4585301876068115e-01 4.1504821181297302e-01 + <_> + + 0 -1 1683 -1.8979819724336267e-03 + + 3.6901599168777466e-01 5.1497042179107666e-01 + <_> + + 0 -1 1684 -1.3970440253615379e-02 + + 6.0505628585815430e-01 4.8113578557968140e-01 + <_> + + 0 -1 1685 -1.0100819915533066e-01 + + 2.0170800387859344e-01 4.9923619627952576e-01 + <_> + + 0 -1 1686 -1.7346920445561409e-02 + + 5.7131487131118774e-01 4.8994860053062439e-01 + <_> + + 0 -1 1687 1.5619759506080300e-04 + + 4.2153888940811157e-01 5.3926420211791992e-01 + <_> + + 0 -1 1688 1.3438929617404938e-01 + + 5.1361519098281860e-01 3.7676128745079041e-01 + <_> + + 0 -1 1689 -2.4582240730524063e-02 + + 7.0273578166961670e-01 4.7479069232940674e-01 + <_> + + 0 -1 1690 -3.8553720805794001e-03 + + 4.3174090981483459e-01 5.4277169704437256e-01 + <_> + + 0 -1 1691 -2.3165249731391668e-03 + + 5.9426987171173096e-01 4.6186479926109314e-01 + <_> + + 0 -1 1692 -4.8518120311200619e-03 + + 6.1915689706802368e-01 4.8848950862884521e-01 + <_> + + 0 -1 1693 2.4699938949197531e-03 + + 5.2566647529602051e-01 4.0171998739242554e-01 + <_> + + 0 -1 1694 4.5496959239244461e-02 + + 5.2378678321838379e-01 2.6857739686965942e-01 + <_> + + 0 -1 1695 -2.0319599658250809e-02 + + 2.1304459869861603e-01 4.9797388911247253e-01 + <_> + + 0 -1 1696 2.6994998916052282e-04 + + 4.8140418529510498e-01 5.5431222915649414e-01 + <_> + + 0 -1 1697 -1.8232699949294329e-03 + + 6.4825797080993652e-01 4.7099891304969788e-01 + <_> + + 0 -1 1698 -6.3015790656208992e-03 + + 4.5819279551506042e-01 5.3062361478805542e-01 + <_> + + 0 -1 1699 -2.4139499873854220e-04 + + 5.2320867776870728e-01 4.0517631173133850e-01 + <_> + + 0 -1 1700 -1.0330369696021080e-03 + + 5.5562019348144531e-01 4.7891938686370850e-01 + <_> + + 0 -1 1701 1.8041160365100950e-04 + + 5.2294427156448364e-01 4.0118101239204407e-01 + <_> + + 0 -1 1702 -6.1407860368490219e-02 + + 6.2986820936203003e-01 5.0107032060623169e-01 + <_> + + 0 -1 1703 -6.9543913006782532e-02 + + 7.2282809019088745e-01 4.7731840610504150e-01 + <_> + + 0 -1 1704 -7.0542663335800171e-02 + + 2.2695130109786987e-01 5.1825290918350220e-01 + <_> + + 0 -1 1705 2.4423799477517605e-03 + + 5.2370971441268921e-01 4.0981510281562805e-01 + <_> + + 0 -1 1706 1.5494349645450711e-03 + + 4.7737509012222290e-01 5.4680430889129639e-01 + <_> + + 0 -1 1707 -2.3914219811558723e-02 + + 7.1469759941101074e-01 4.7838249802589417e-01 + <_> + + 0 -1 1708 -1.2453690171241760e-02 + + 2.6352968811988831e-01 5.2411228418350220e-01 + <_> + + 0 -1 1709 -2.0760179904755205e-04 + + 3.6237570643424988e-01 5.1136088371276855e-01 + <_> + + 0 -1 1710 2.9781080229440704e-05 + + 4.7059321403503418e-01 5.4328018426895142e-01 + <_> + 211 + 1.0474919891357422e+02 + + <_> + + 0 -1 1711 1.1772749945521355e-02 + + 3.8605189323425293e-01 6.4211672544479370e-01 + <_> + + 0 -1 1712 2.7037570253014565e-02 + + 4.3856549263000488e-01 6.7540389299392700e-01 + <_> + + 0 -1 1713 -3.6419500247575343e-05 + + 5.4871010780334473e-01 3.4233158826828003e-01 + <_> + + 0 -1 1714 1.9995409529656172e-03 + + 3.2305321097373962e-01 5.4003179073333740e-01 + <_> + + 0 -1 1715 4.5278300531208515e-03 + + 5.0916397571563721e-01 2.9350438714027405e-01 + <_> + + 0 -1 1716 4.7890920541249216e-04 + + 4.1781538724899292e-01 5.3440642356872559e-01 + <_> + + 0 -1 1717 1.1720920447260141e-03 + + 2.8991821408271790e-01 5.1320707798004150e-01 + <_> + + 0 -1 1718 9.5305702416226268e-04 + + 4.2801249027252197e-01 5.5608451366424561e-01 + <_> + + 0 -1 1719 1.5099150004971307e-05 + + 4.0448719263076782e-01 5.4047602415084839e-01 + <_> + + 0 -1 1720 -6.0817901976406574e-04 + + 4.2717689275741577e-01 5.5034661293029785e-01 + <_> + + 0 -1 1721 3.3224520739167929e-03 + + 3.9627239108085632e-01 5.3697347640991211e-01 + <_> + + 0 -1 1722 -1.1037490330636501e-03 + + 4.7271779179573059e-01 5.2377498149871826e-01 + <_> + + 0 -1 1723 -1.4350269921123981e-03 + + 5.6030082702636719e-01 4.2235091328620911e-01 + <_> + + 0 -1 1724 2.0767399109899998e-03 + + 5.2259171009063721e-01 4.7327259182929993e-01 + <_> + + 0 -1 1725 -1.6412809782195836e-04 + + 3.9990758895874023e-01 5.4327398538589478e-01 + <_> + + 0 -1 1726 8.8302437216043472e-03 + + 4.6783858537673950e-01 6.0273271799087524e-01 + <_> + + 0 -1 1727 -1.0552070103585720e-02 + + 3.4939670562744141e-01 5.2139747142791748e-01 + <_> + + 0 -1 1728 -2.2731600329279900e-03 + + 6.1858189105987549e-01 4.7490629553794861e-01 + <_> + + 0 -1 1729 -8.4786332445219159e-04 + + 5.2853411436080933e-01 3.8434821367263794e-01 + <_> + + 0 -1 1730 1.2081359745934606e-03 + + 5.3606408834457397e-01 3.4473359584808350e-01 + <_> + + 0 -1 1731 2.6512730401009321e-03 + + 4.5582920312881470e-01 6.1939620971679688e-01 + <_> + + 0 -1 1732 -1.1012479662895203e-03 + + 3.6802300810813904e-01 5.3276282548904419e-01 + <_> + + 0 -1 1733 4.9561518244445324e-04 + + 3.9605951309204102e-01 5.2749407291412354e-01 + <_> + + 0 -1 1734 -4.3901771306991577e-02 + + 7.0204448699951172e-01 4.9928390979766846e-01 + <_> + + 0 -1 1735 3.4690350294113159e-02 + + 5.0491642951965332e-01 2.7666029334068298e-01 + <_> + + 0 -1 1736 -2.7442190330475569e-03 + + 2.6726329326629639e-01 5.2749711275100708e-01 + <_> + + 0 -1 1737 3.3316588960587978e-03 + + 4.5794829726219177e-01 6.0011017322540283e-01 + <_> + + 0 -1 1738 -2.0044570788741112e-02 + + 3.1715941429138184e-01 5.2357178926467896e-01 + <_> + + 0 -1 1739 1.3492030557245016e-03 + + 5.2653628587722778e-01 4.0343248844146729e-01 + <_> + + 0 -1 1740 2.9702018946409225e-03 + + 5.3324568271636963e-01 4.5719841122627258e-01 + <_> + + 0 -1 1741 6.3039981760084629e-03 + + 4.5933109521865845e-01 6.0346359014511108e-01 + <_> + + 0 -1 1742 -1.2936590239405632e-02 + + 4.4379639625549316e-01 5.3729712963104248e-01 + <_> + + 0 -1 1743 4.0148729458451271e-03 + + 4.6803238987922668e-01 6.4378339052200317e-01 + <_> + + 0 -1 1744 -2.6401679497212172e-03 + + 3.7096318602561951e-01 5.3143328428268433e-01 + <_> + + 0 -1 1745 1.3918439857661724e-02 + + 4.7235551476478577e-01 7.1308088302612305e-01 + <_> + + 0 -1 1746 -4.5087869511917233e-04 + + 4.4923940300941467e-01 5.3704041242599487e-01 + <_> + + 0 -1 1747 2.5384349282830954e-04 + + 4.4068640470504761e-01 5.5144029855728149e-01 + <_> + + 0 -1 1748 2.2710000630468130e-03 + + 4.6824169158935547e-01 5.9679841995239258e-01 + <_> + + 0 -1 1749 2.4120779708027840e-03 + + 5.0793921947479248e-01 3.0185988545417786e-01 + <_> + + 0 -1 1750 -3.6025670851813629e-05 + + 5.6010371446609497e-01 4.4710969924926758e-01 + <_> + + 0 -1 1751 -7.4905529618263245e-03 + + 2.2075350582599640e-01 4.9899441003799438e-01 + <_> + + 0 -1 1752 -1.7513120546936989e-02 + + 6.5312159061431885e-01 5.0176489353179932e-01 + <_> + + 0 -1 1753 1.4281630516052246e-01 + + 4.9679630994796753e-01 1.4820620417594910e-01 + <_> + + 0 -1 1754 5.5345268920063972e-03 + + 4.8989468812942505e-01 5.9542238712310791e-01 + <_> + + 0 -1 1755 -9.6323591424152255e-04 + + 3.9271169900894165e-01 5.1960742473602295e-01 + <_> + + 0 -1 1756 -2.0370010752230883e-03 + + 5.6133252382278442e-01 4.8848581314086914e-01 + <_> + + 0 -1 1757 1.6614829655736685e-03 + + 4.4728800654411316e-01 5.5788809061050415e-01 + <_> + + 0 -1 1758 -3.1188090797513723e-03 + + 3.8405328989028931e-01 5.3974777460098267e-01 + <_> + + 0 -1 1759 -6.4000617712736130e-03 + + 5.8439838886260986e-01 4.5332181453704834e-01 + <_> + + 0 -1 1760 3.1319601112045348e-04 + + 5.4392218589782715e-01 4.2347279191017151e-01 + <_> + + 0 -1 1761 -1.8222099170088768e-02 + + 1.2884649634361267e-01 4.9584048986434937e-01 + <_> + + 0 -1 1762 8.7969247251749039e-03 + + 4.9512979388237000e-01 7.1534800529479980e-01 + <_> + + 0 -1 1763 -4.2395070195198059e-03 + + 3.9465999603271484e-01 5.1949369907379150e-01 + <_> + + 0 -1 1764 9.7086271271109581e-03 + + 4.8975038528442383e-01 6.0649001598358154e-01 + <_> + + 0 -1 1765 -3.9934171363711357e-03 + + 3.2454401254653931e-01 5.0608289241790771e-01 + <_> + + 0 -1 1766 -1.6785059124231339e-02 + + 1.5819530189037323e-01 5.2037787437438965e-01 + <_> + + 0 -1 1767 1.8272090703248978e-02 + + 4.6809351444244385e-01 6.6269791126251221e-01 + <_> + + 0 -1 1768 5.6872838176786900e-03 + + 5.2116978168487549e-01 3.5121849179267883e-01 + <_> + + 0 -1 1769 -1.0739039862528443e-03 + + 5.7683861255645752e-01 4.5298451185226440e-01 + <_> + + 0 -1 1770 -3.7093870341777802e-03 + + 4.5077630877494812e-01 5.3135812282562256e-01 + <_> + + 0 -1 1771 -2.1110709349159151e-04 + + 5.4608201980590820e-01 4.3333768844604492e-01 + <_> + + 0 -1 1772 1.0670139454305172e-03 + + 5.3718560934066772e-01 4.0783908963203430e-01 + <_> + + 0 -1 1773 3.5943021066486835e-03 + + 4.4712871313095093e-01 5.6438362598419189e-01 + <_> + + 0 -1 1774 -5.1776031032204628e-03 + + 4.4993931055068970e-01 5.2803301811218262e-01 + <_> + + 0 -1 1775 -2.5414369883947074e-04 + + 5.5161732435226440e-01 4.4077080488204956e-01 + <_> + + 0 -1 1776 6.3522560521960258e-03 + + 5.1941901445388794e-01 2.4652279913425446e-01 + <_> + + 0 -1 1777 -4.4205080484971404e-04 + + 3.8307058811187744e-01 5.1396822929382324e-01 + <_> + + 0 -1 1778 7.4488727841526270e-04 + + 4.8910909891128540e-01 5.9747868776321411e-01 + <_> + + 0 -1 1779 -3.5116379149258137e-03 + + 7.4136817455291748e-01 4.7687649726867676e-01 + <_> + + 0 -1 1780 -1.2540910392999649e-02 + + 3.6488190293312073e-01 5.2528268098831177e-01 + <_> + + 0 -1 1781 9.4931852072477341e-03 + + 5.1004928350448608e-01 3.6295869946479797e-01 + <_> + + 0 -1 1782 1.2961150147020817e-02 + + 5.2324420213699341e-01 4.3335610628128052e-01 + <_> + + 0 -1 1783 4.7209449112415314e-03 + + 4.6481490135192871e-01 6.3310527801513672e-01 + <_> + + 0 -1 1784 -2.3119079414755106e-03 + + 5.9303098917007446e-01 4.5310580730438232e-01 + <_> + + 0 -1 1785 -2.8262299019843340e-03 + + 3.8704779744148254e-01 5.2571010589599609e-01 + <_> + + 0 -1 1786 -1.4311339473351836e-03 + + 5.5225032567977905e-01 4.5618548989295959e-01 + <_> + + 0 -1 1787 1.9378310535103083e-03 + + 4.5462208986282349e-01 5.7369667291641235e-01 + <_> + + 0 -1 1788 2.6343559147790074e-04 + + 5.3457391262054443e-01 4.5718750357627869e-01 + <_> + + 0 -1 1789 7.8257522545754910e-04 + + 3.9678159356117249e-01 5.2201879024505615e-01 + <_> + + 0 -1 1790 -1.9550440832972527e-02 + + 2.8296428918838501e-01 5.2435082197189331e-01 + <_> + + 0 -1 1791 4.3914958951063454e-04 + + 4.5900669693946838e-01 5.8990901708602905e-01 + <_> + + 0 -1 1792 2.1452000364661217e-02 + + 5.2314108610153198e-01 2.8553789854049683e-01 + <_> + + 0 -1 1793 5.8973580598831177e-04 + + 4.3972569704055786e-01 5.5064219236373901e-01 + <_> + + 0 -1 1794 -2.6157610118389130e-02 + + 3.1350791454315186e-01 5.1891750097274780e-01 + <_> + + 0 -1 1795 -1.3959860429167747e-02 + + 3.2132729887962341e-01 5.0407177209854126e-01 + <_> + + 0 -1 1796 -6.3699018210172653e-03 + + 6.3875448703765869e-01 4.8495069146156311e-01 + <_> + + 0 -1 1797 -8.5613820701837540e-03 + + 2.7591320872306824e-01 5.0320190191268921e-01 + <_> + + 0 -1 1798 9.6622901037335396e-04 + + 4.6856409311294556e-01 5.8348792791366577e-01 + <_> + + 0 -1 1799 7.6550268568098545e-04 + + 5.1752072572708130e-01 3.8964220881462097e-01 + <_> + + 0 -1 1800 -8.1833340227603912e-03 + + 2.0691369473934174e-01 5.2081221342086792e-01 + <_> + + 0 -1 1801 -9.3976939097046852e-03 + + 6.1340910196304321e-01 4.6412229537963867e-01 + <_> + + 0 -1 1802 4.8028980381786823e-03 + + 5.4541081190109253e-01 4.3952199816703796e-01 + <_> + + 0 -1 1803 -3.5680569708347321e-03 + + 6.3444852828979492e-01 4.6810939908027649e-01 + <_> + + 0 -1 1804 4.0733120404183865e-03 + + 5.2926832437515259e-01 4.0156200528144836e-01 + <_> + + 0 -1 1805 1.2568129459396005e-03 + + 4.3929880857467651e-01 5.4528248310089111e-01 + <_> + + 0 -1 1806 -2.9065010603517294e-03 + + 5.8988320827484131e-01 4.8633798956871033e-01 + <_> + + 0 -1 1807 -2.4409340694546700e-03 + + 4.0693649649620056e-01 5.2474218606948853e-01 + <_> + + 0 -1 1808 2.4830700829625130e-02 + + 5.1827257871627808e-01 3.6825248599052429e-01 + <_> + + 0 -1 1809 -4.8854008316993713e-02 + + 1.3075779378414154e-01 4.9612811207771301e-01 + <_> + + 0 -1 1810 -1.6110379947349429e-03 + + 6.4210057258605957e-01 4.8726621270179749e-01 + <_> + + 0 -1 1811 -9.7009479999542236e-02 + + 4.7769349068403244e-02 4.9509888887405396e-01 + <_> + + 0 -1 1812 1.1209240183234215e-03 + + 4.6162670850753784e-01 5.3547459840774536e-01 + <_> + + 0 -1 1813 -1.3064090162515640e-03 + + 6.2618541717529297e-01 4.6388059854507446e-01 + <_> + + 0 -1 1814 4.5771620352752507e-04 + + 5.3844177722930908e-01 4.6466401219367981e-01 + <_> + + 0 -1 1815 -6.3149951165542006e-04 + + 3.8040471076965332e-01 5.1302570104598999e-01 + <_> + + 0 -1 1816 1.4505970466416329e-04 + + 4.5543101429939270e-01 5.6644618511199951e-01 + <_> + + 0 -1 1817 -1.6474550589919090e-02 + + 6.5969580411911011e-01 4.7158598899841309e-01 + <_> + + 0 -1 1818 1.3369579799473286e-02 + + 5.1954662799835205e-01 3.0359649658203125e-01 + <_> + + 0 -1 1819 1.0271780047332868e-04 + + 5.2291762828826904e-01 4.1070660948753357e-01 + <_> + + 0 -1 1820 -5.5311559699475765e-03 + + 6.3528877496719360e-01 4.9609071016311646e-01 + <_> + + 0 -1 1821 -2.6187049224972725e-03 + + 3.8245460391044617e-01 5.1409840583801270e-01 + <_> + + 0 -1 1822 5.0834268331527710e-03 + + 4.9504399299621582e-01 6.2208187580108643e-01 + <_> + + 0 -1 1823 7.9818159341812134e-02 + + 4.9523359537124634e-01 1.3224759697914124e-01 + <_> + + 0 -1 1824 -9.9226586520671844e-02 + + 7.5427287817001343e-01 5.0084167718887329e-01 + <_> + + 0 -1 1825 -6.5174017800018191e-04 + + 3.6993029713630676e-01 5.1301211118698120e-01 + <_> + + 0 -1 1826 -1.8996849656105042e-02 + + 6.6891789436340332e-01 4.9212029576301575e-01 + <_> + + 0 -1 1827 1.7346899956464767e-02 + + 4.9833008646965027e-01 1.8591980636119843e-01 + <_> + + 0 -1 1828 5.5082101607695222e-04 + + 4.5744240283966064e-01 5.5221217870712280e-01 + <_> + + 0 -1 1829 2.0056050270795822e-03 + + 5.1317447423934937e-01 3.8564699888229370e-01 + <_> + + 0 -1 1830 -7.7688191086053848e-03 + + 4.3617001175880432e-01 5.4343092441558838e-01 + <_> + + 0 -1 1831 5.0878278911113739e-02 + + 4.6827208995819092e-01 6.8406397104263306e-01 + <_> + + 0 -1 1832 -2.2901780903339386e-03 + + 4.3292450904846191e-01 5.3060990571975708e-01 + <_> + + 0 -1 1833 -1.5715380141045898e-04 + + 5.3700572252273560e-01 4.3781641125679016e-01 + <_> + + 0 -1 1834 1.0519240051507950e-01 + + 5.1372742652893066e-01 6.7361466586589813e-02 + <_> + + 0 -1 1835 2.7198919560760260e-03 + + 4.1120609641075134e-01 5.2556651830673218e-01 + <_> + + 0 -1 1836 4.8337779939174652e-02 + + 5.4046237468719482e-01 4.4389671087265015e-01 + <_> + + 0 -1 1837 9.5703761326149106e-04 + + 4.3559691309928894e-01 5.3995108604431152e-01 + <_> + + 0 -1 1838 -2.5371259078383446e-02 + + 5.9951752424240112e-01 5.0310248136520386e-01 + <_> + + 0 -1 1839 5.2457951009273529e-02 + + 4.9502879381179810e-01 1.3983510434627533e-01 + <_> + + 0 -1 1840 -1.2365629896521568e-02 + + 6.3972991704940796e-01 4.9641060829162598e-01 + <_> + + 0 -1 1841 -1.4589719474315643e-01 + + 1.0016699880361557e-01 4.9463221430778503e-01 + <_> + + 0 -1 1842 -1.5908600762486458e-02 + + 3.3123299479484558e-01 5.2083408832550049e-01 + <_> + + 0 -1 1843 3.9486068999394774e-04 + + 4.4063639640808105e-01 5.4261028766632080e-01 + <_> + + 0 -1 1844 -5.2454001270234585e-03 + + 2.7995899319648743e-01 5.1899671554565430e-01 + <_> + + 0 -1 1845 -5.0421799533069134e-03 + + 6.9875800609588623e-01 4.7521421313285828e-01 + <_> + + 0 -1 1846 2.9812189750373363e-03 + + 4.9832889437675476e-01 6.3074797391891479e-01 + <_> + + 0 -1 1847 -7.2884308174252510e-03 + + 2.9823330044746399e-01 5.0268697738647461e-01 + <_> + + 0 -1 1848 1.5094350092113018e-03 + + 5.3084421157836914e-01 3.8329708576202393e-01 + <_> + + 0 -1 1849 -9.3340799212455750e-03 + + 2.0379640161991119e-01 4.9698171019554138e-01 + <_> + + 0 -1 1850 2.8667140752077103e-02 + + 5.0256967544555664e-01 6.9280272722244263e-01 + <_> + + 0 -1 1851 1.7019680142402649e-01 + + 4.9600529670715332e-01 1.4764429628849030e-01 + <_> + + 0 -1 1852 -3.2614478841423988e-03 + + 5.6030637025833130e-01 4.8260560631752014e-01 + <_> + + 0 -1 1853 5.5769277969375253e-04 + + 5.2055621147155762e-01 4.1296330094337463e-01 + <_> + + 0 -1 1854 3.6258339881896973e-01 + + 5.2216529846191406e-01 3.7686121463775635e-01 + <_> + + 0 -1 1855 -1.1615130119025707e-02 + + 6.0226827859878540e-01 4.6374899148941040e-01 + <_> + + 0 -1 1856 -4.0795197710394859e-03 + + 4.0704470872879028e-01 5.3374791145324707e-01 + <_> + + 0 -1 1857 5.7204300537705421e-04 + + 4.6018350124359131e-01 5.9003931283950806e-01 + <_> + + 0 -1 1858 6.7543348995968699e-04 + + 5.3982520103454590e-01 4.3454289436340332e-01 + <_> + + 0 -1 1859 6.3295697327703238e-04 + + 5.2015632390975952e-01 4.0513589978218079e-01 + <_> + + 0 -1 1860 1.2435320531949401e-03 + + 4.6423879265785217e-01 5.5474412441253662e-01 + <_> + + 0 -1 1861 -4.7363857738673687e-03 + + 6.1985671520233154e-01 4.6725520491600037e-01 + <_> + + 0 -1 1862 -6.4658462069928646e-03 + + 6.8373328447341919e-01 5.0190007686614990e-01 + <_> + + 0 -1 1863 3.5017321351915598e-04 + + 4.3448030948638916e-01 5.3636229038238525e-01 + <_> + + 0 -1 1864 1.5754920605104417e-04 + + 4.7600790858268738e-01 5.7320207357406616e-01 + <_> + + 0 -1 1865 9.9774366244673729e-03 + + 5.0909858942031860e-01 3.6350399255752563e-01 + <_> + + 0 -1 1866 -4.1464529931545258e-04 + + 5.5700647830963135e-01 4.5938020944595337e-01 + <_> + + 0 -1 1867 -3.5888899583369493e-04 + + 5.3568458557128906e-01 4.3391349911689758e-01 + <_> + + 0 -1 1868 4.0463250479660928e-04 + + 4.4398030638694763e-01 5.4367768764495850e-01 + <_> + + 0 -1 1869 -8.2184787606820464e-04 + + 4.0422949194908142e-01 5.1762992143630981e-01 + <_> + + 0 -1 1870 5.9467419050633907e-03 + + 4.9276518821716309e-01 5.6337797641754150e-01 + <_> + + 0 -1 1871 -2.1753389388322830e-02 + + 8.0062937736511230e-01 4.8008409142494202e-01 + <_> + + 0 -1 1872 -1.4540379866957664e-02 + + 3.9460548758506775e-01 5.1822227239608765e-01 + <_> + + 0 -1 1873 -4.0510769933462143e-02 + + 2.1324990317225456e-02 4.9357929825782776e-01 + <_> + + 0 -1 1874 -5.8458268176764250e-04 + + 4.0127959847450256e-01 5.3140252828598022e-01 + <_> + + 0 -1 1875 5.5151800625026226e-03 + + 4.6424189209938049e-01 5.8962607383728027e-01 + <_> + + 0 -1 1876 -6.0626221820712090e-03 + + 6.5021592378616333e-01 5.0164777040481567e-01 + <_> + + 0 -1 1877 9.4535842537879944e-02 + + 5.2647089958190918e-01 4.1268271207809448e-01 + <_> + + 0 -1 1878 4.7315051779150963e-03 + + 4.8791998624801636e-01 5.8924478292465210e-01 + <_> + + 0 -1 1879 -5.2571471314877272e-04 + + 3.9172801375389099e-01 5.1894128322601318e-01 + <_> + + 0 -1 1880 -2.5464049540460110e-03 + + 5.8375990390777588e-01 4.9857059121131897e-01 + <_> + + 0 -1 1881 -2.6075689122080803e-02 + + 1.2619839608669281e-01 4.9558219313621521e-01 + <_> + + 0 -1 1882 -5.4779709316790104e-03 + + 5.7225137948989868e-01 5.0102657079696655e-01 + <_> + + 0 -1 1883 5.1337741315364838e-03 + + 5.2732622623443604e-01 4.2263761162757874e-01 + <_> + + 0 -1 1884 4.7944980906322598e-04 + + 4.4500669836997986e-01 5.8195871114730835e-01 + <_> + + 0 -1 1885 -2.1114079281687737e-03 + + 5.7576531171798706e-01 4.5117148756980896e-01 + <_> + + 0 -1 1886 -1.3179990462958813e-02 + + 1.8843810260295868e-01 5.1607340574264526e-01 + <_> + + 0 -1 1887 -4.7968099825084209e-03 + + 6.5897899866104126e-01 4.7361189126968384e-01 + <_> + + 0 -1 1888 6.7483168095350266e-03 + + 5.2594298124313354e-01 3.3563950657844543e-01 + <_> + + 0 -1 1889 1.4623369788751006e-03 + + 5.3552711009979248e-01 4.2640921473503113e-01 + <_> + + 0 -1 1890 4.7645159065723419e-03 + + 5.0344067811965942e-01 5.7868278026580811e-01 + <_> + + 0 -1 1891 6.8066660314798355e-03 + + 4.7566050291061401e-01 6.6778290271759033e-01 + <_> + + 0 -1 1892 3.6608621012419462e-03 + + 5.3696119785308838e-01 4.3115469813346863e-01 + <_> + + 0 -1 1893 2.1449640393257141e-02 + + 4.9686419963836670e-01 1.8888160586357117e-01 + <_> + + 0 -1 1894 4.1678901761770248e-03 + + 4.9307331442832947e-01 5.8153688907623291e-01 + <_> + + 0 -1 1895 8.6467564105987549e-03 + + 5.2052050828933716e-01 4.1325950622558594e-01 + <_> + + 0 -1 1896 -3.6114078829996288e-04 + + 5.4835551977157593e-01 4.8009279370307922e-01 + <_> + + 0 -1 1897 1.0808729566633701e-03 + + 4.6899020671844482e-01 6.0414212942123413e-01 + <_> + + 0 -1 1898 5.7719959877431393e-03 + + 5.1711422204971313e-01 3.0532771348953247e-01 + <_> + + 0 -1 1899 1.5720770461484790e-03 + + 5.2199780941009521e-01 4.1788038611412048e-01 + <_> + + 0 -1 1900 -1.9307859474793077e-03 + + 5.8603698015213013e-01 4.8129200935363770e-01 + <_> + + 0 -1 1901 -7.8926272690296173e-03 + + 1.7492769658565521e-01 4.9717339873313904e-01 + <_> + + 0 -1 1902 -2.2224679123610258e-03 + + 4.3425890803337097e-01 5.2128481864929199e-01 + <_> + + 0 -1 1903 1.9011989934369922e-03 + + 4.7651869058609009e-01 6.8920552730560303e-01 + <_> + + 0 -1 1904 2.7576119173318148e-03 + + 5.2621912956237793e-01 4.3374860286712646e-01 + <_> + + 0 -1 1905 5.1787449046969414e-03 + + 4.8040691018104553e-01 7.8437292575836182e-01 + <_> + + 0 -1 1906 -9.0273341629654169e-04 + + 4.1208469867706299e-01 5.3534239530563354e-01 + <_> + + 0 -1 1907 5.1797959022223949e-03 + + 4.7403728961944580e-01 6.4259600639343262e-01 + <_> + + 0 -1 1908 -1.0114000178873539e-02 + + 2.4687920510768890e-01 5.1750177145004272e-01 + <_> + + 0 -1 1909 -1.8617060035467148e-02 + + 5.7562941312789917e-01 4.6289789676666260e-01 + <_> + + 0 -1 1910 5.9225959703326225e-03 + + 5.1696258783340454e-01 3.2142710685729980e-01 + <_> + + 0 -1 1911 -6.2945079989731312e-03 + + 3.8720148801803589e-01 5.1416367292404175e-01 + <_> + + 0 -1 1912 6.5353019163012505e-03 + + 4.8530489206314087e-01 6.3104897737503052e-01 + <_> + + 0 -1 1913 1.0878399480134249e-03 + + 5.1173150539398193e-01 3.7232589721679688e-01 + <_> + + 0 -1 1914 -2.2542240098118782e-02 + + 5.6927400827407837e-01 4.8871129751205444e-01 + <_> + + 0 -1 1915 -3.0065660830587149e-03 + + 2.5560128688812256e-01 5.0039929151535034e-01 + <_> + + 0 -1 1916 7.4741272255778313e-03 + + 4.8108729720115662e-01 5.6759268045425415e-01 + <_> + + 0 -1 1917 2.6162320747971535e-02 + + 4.9711948633193970e-01 1.7772370576858521e-01 + <_> + + 0 -1 1918 9.4352738233283162e-04 + + 4.9400109052658081e-01 5.4912507534027100e-01 + <_> + + 0 -1 1919 3.3363241702318192e-02 + + 5.0076121091842651e-01 2.7907240390777588e-01 + <_> + + 0 -1 1920 -1.5118650160729885e-02 + + 7.0595788955688477e-01 4.9730318784713745e-01 + <_> + + 0 -1 1921 9.8648946732282639e-04 + + 5.1286202669143677e-01 3.7767618894577026e-01 + <_> + 213 + 1.0576110076904297e+02 + + <_> + + 0 -1 1922 -9.5150798559188843e-02 + + 6.4707571268081665e-01 4.0172868967056274e-01 + <_> + + 0 -1 1923 6.2702340073883533e-03 + + 3.9998221397399902e-01 5.7464492321014404e-01 + <_> + + 0 -1 1924 3.0018089455552399e-04 + + 3.5587701201438904e-01 5.5388098955154419e-01 + <_> + + 0 -1 1925 1.1757409665733576e-03 + + 4.2565348744392395e-01 5.3826177120208740e-01 + <_> + + 0 -1 1926 4.4235268433112651e-05 + + 3.6829081177711487e-01 5.5899268388748169e-01 + <_> + + 0 -1 1927 -2.9936920327600092e-05 + + 5.4524701833724976e-01 4.0203678607940674e-01 + <_> + + 0 -1 1928 3.0073199886828661e-03 + + 5.2390581369400024e-01 3.3178439736366272e-01 + <_> + + 0 -1 1929 -1.0513889603316784e-02 + + 4.3206891417503357e-01 5.3079837560653687e-01 + <_> + + 0 -1 1930 8.3476826548576355e-03 + + 4.5046371221542358e-01 6.4532989263534546e-01 + <_> + + 0 -1 1931 -3.1492270063608885e-03 + + 4.3134251236915588e-01 5.3705251216888428e-01 + <_> + + 0 -1 1932 -1.4435649973165710e-05 + + 5.3266030550003052e-01 3.8179719448089600e-01 + <_> + + 0 -1 1933 -4.2855090578086674e-04 + + 4.3051639199256897e-01 5.3820097446441650e-01 + <_> + + 0 -1 1934 1.5062429883982986e-04 + + 4.2359709739685059e-01 5.5449652671813965e-01 + <_> + + 0 -1 1935 7.1559831500053406e-02 + + 5.3030598163604736e-01 2.6788029074668884e-01 + <_> + + 0 -1 1936 8.4095180500298738e-04 + + 3.5571089386940002e-01 5.2054339647293091e-01 + <_> + + 0 -1 1937 6.2986500561237335e-02 + + 5.2253627777099609e-01 2.8613761067390442e-01 + <_> + + 0 -1 1938 -3.3798629883676767e-03 + + 3.6241859197616577e-01 5.2016979455947876e-01 + <_> + + 0 -1 1939 -1.1810739670181647e-04 + + 5.4744768142700195e-01 3.9598938822746277e-01 + <_> + + 0 -1 1940 -5.4505601292476058e-04 + + 3.7404221296310425e-01 5.2157157659530640e-01 + <_> + + 0 -1 1941 -1.8454910023137927e-03 + + 5.8930522203445435e-01 4.5844489336013794e-01 + <_> + + 0 -1 1942 -4.3832371011376381e-04 + + 4.0845820307731628e-01 5.3853511810302734e-01 + <_> + + 0 -1 1943 -2.4000830017030239e-03 + + 3.7774550914764404e-01 5.2935802936553955e-01 + <_> + + 0 -1 1944 -9.8795741796493530e-02 + + 2.9636120796203613e-01 5.0700891017913818e-01 + <_> + + 0 -1 1945 3.1798239797353745e-03 + + 4.8776328563690186e-01 6.7264437675476074e-01 + <_> + + 0 -1 1946 3.2406419632025063e-04 + + 4.3669110536575317e-01 5.5611097812652588e-01 + <_> + + 0 -1 1947 -3.2547250390052795e-02 + + 3.1281578540802002e-01 5.3086161613464355e-01 + <_> + + 0 -1 1948 -7.7561130747199059e-03 + + 6.5602248907089233e-01 4.6398720145225525e-01 + <_> + + 0 -1 1949 1.6027249395847321e-02 + + 5.1726800203323364e-01 3.1418979167938232e-01 + <_> + + 0 -1 1950 7.1002350523485802e-06 + + 4.0844461321830750e-01 5.3362947702407837e-01 + <_> + + 0 -1 1951 7.3422808200120926e-03 + + 4.9669221043586731e-01 6.6034650802612305e-01 + <_> + + 0 -1 1952 -1.6970280557870865e-03 + + 5.9082370996475220e-01 4.5001828670501709e-01 + <_> + + 0 -1 1953 2.4118260480463505e-03 + + 5.3151607513427734e-01 3.5997208952903748e-01 + <_> + + 0 -1 1954 -5.5300937965512276e-03 + + 2.3340409994125366e-01 4.9968141317367554e-01 + <_> + + 0 -1 1955 -2.6478730142116547e-03 + + 5.8809357881546021e-01 4.6847340464591980e-01 + <_> + + 0 -1 1956 1.1295629665255547e-02 + + 4.9837771058082581e-01 1.8845909833908081e-01 + <_> + + 0 -1 1957 -6.6952878842130303e-04 + + 5.8721381425857544e-01 4.7990199923515320e-01 + <_> + + 0 -1 1958 1.4410680159926414e-03 + + 5.1311892271041870e-01 3.5010111331939697e-01 + <_> + + 0 -1 1959 2.4637870956212282e-03 + + 5.3393721580505371e-01 4.1176390647888184e-01 + <_> + + 0 -1 1960 3.3114518737420440e-04 + + 4.3133831024169922e-01 5.3982460498809814e-01 + <_> + + 0 -1 1961 -3.3557269722223282e-02 + + 2.6753368973731995e-01 5.1791548728942871e-01 + <_> + + 0 -1 1962 1.8539419397711754e-02 + + 4.9738699197769165e-01 2.3171770572662354e-01 + <_> + + 0 -1 1963 -2.9698139405809343e-04 + + 5.5297082662582397e-01 4.6436640620231628e-01 + <_> + + 0 -1 1964 -4.5577259152196348e-04 + + 5.6295841932296753e-01 4.4691911339759827e-01 + <_> + + 0 -1 1965 -1.0158980265259743e-02 + + 6.7062127590179443e-01 4.9259188771247864e-01 + <_> + + 0 -1 1966 -2.2413829356082715e-05 + + 5.2394217252731323e-01 3.9129018783569336e-01 + <_> + + 0 -1 1967 7.2034963523037732e-05 + + 4.7994381189346313e-01 5.5017888545989990e-01 + <_> + + 0 -1 1968 -6.9267209619283676e-03 + + 6.9300097227096558e-01 4.6980848908424377e-01 + <_> + + 0 -1 1969 -7.6997838914394379e-03 + + 4.0996238589286804e-01 5.4808831214904785e-01 + <_> + + 0 -1 1970 -7.3130549862980843e-03 + + 3.2834759354591370e-01 5.0578862428665161e-01 + <_> + + 0 -1 1971 1.9650589674711227e-03 + + 4.9780470132827759e-01 6.3982498645782471e-01 + <_> + + 0 -1 1972 7.1647600270807743e-03 + + 4.6611601114273071e-01 6.2221372127532959e-01 + <_> + + 0 -1 1973 -2.4078639224171638e-02 + + 2.3346449434757233e-01 5.2221620082855225e-01 + <_> + + 0 -1 1974 -2.1027969196438789e-02 + + 1.1836539953947067e-01 4.9382260441780090e-01 + <_> + + 0 -1 1975 3.6017020465806127e-04 + + 5.3250199556350708e-01 4.1167110204696655e-01 + <_> + + 0 -1 1976 -1.7219729721546173e-02 + + 6.2787622213363647e-01 4.6642690896987915e-01 + <_> + + 0 -1 1977 -7.8672142699360847e-03 + + 3.4034150838851929e-01 5.2497369050979614e-01 + <_> + + 0 -1 1978 -4.4777389848604798e-04 + + 3.6104118824005127e-01 5.0862592458724976e-01 + <_> + + 0 -1 1979 5.5486010387539864e-03 + + 4.8842659592628479e-01 6.2034982442855835e-01 + <_> + + 0 -1 1980 -6.9461148232221603e-03 + + 2.6259300112724304e-01 5.0110971927642822e-01 + <_> + + 0 -1 1981 1.3569870498031378e-04 + + 4.3407949805259705e-01 5.6283122301101685e-01 + <_> + + 0 -1 1982 -4.5880250632762909e-02 + + 6.5079987049102783e-01 4.6962749958038330e-01 + <_> + + 0 -1 1983 -2.1582560613751411e-02 + + 3.8265028595924377e-01 5.2876168489456177e-01 + <_> + + 0 -1 1984 -2.0209539681673050e-02 + + 3.2333680987358093e-01 5.0744771957397461e-01 + <_> + + 0 -1 1985 5.8496710844337940e-03 + + 5.1776039600372314e-01 4.4896709918975830e-01 + <_> + + 0 -1 1986 -5.7476379879517481e-05 + + 4.0208509564399719e-01 5.2463638782501221e-01 + <_> + + 0 -1 1987 -1.1513100471347570e-03 + + 6.3150721788406372e-01 4.9051541090011597e-01 + <_> + + 0 -1 1988 1.9862831104546785e-03 + + 4.7024598717689514e-01 6.4971512556076050e-01 + <_> + + 0 -1 1989 -5.2719512023031712e-03 + + 3.6503839492797852e-01 5.2276527881622314e-01 + <_> + + 0 -1 1990 1.2662699446082115e-03 + + 5.1661008596420288e-01 3.8776180148124695e-01 + <_> + + 0 -1 1991 -6.2919440679252148e-03 + + 7.3758941888809204e-01 5.0238478183746338e-01 + <_> + + 0 -1 1992 6.7360111279413104e-04 + + 4.4232261180877686e-01 5.4955857992172241e-01 + <_> + + 0 -1 1993 -1.0523450328037143e-03 + + 5.9763962030410767e-01 4.8595830798149109e-01 + <_> + + 0 -1 1994 -4.4216238893568516e-04 + + 5.9559392929077148e-01 4.3989309668540955e-01 + <_> + + 0 -1 1995 1.1747940443456173e-03 + + 5.3498882055282593e-01 4.6050581336021423e-01 + <_> + + 0 -1 1996 5.2457437850534916e-03 + + 5.0491911172866821e-01 2.9415771365165710e-01 + <_> + + 0 -1 1997 -2.4539720267057419e-02 + + 2.5501778721809387e-01 5.2185869216918945e-01 + <_> + + 0 -1 1998 7.3793041519820690e-04 + + 4.4248610734939575e-01 5.4908162355422974e-01 + <_> + + 0 -1 1999 1.4233799884095788e-03 + + 5.3195142745971680e-01 4.0813559293746948e-01 + <_> + + 0 -1 2000 -2.4149110540747643e-03 + + 4.0876591205596924e-01 5.2389502525329590e-01 + <_> + + 0 -1 2001 -1.2165299849584699e-03 + + 5.6745791435241699e-01 4.9080529808998108e-01 + <_> + + 0 -1 2002 -1.2438809499144554e-03 + + 4.1294258832931519e-01 5.2561181783676147e-01 + <_> + + 0 -1 2003 6.1942739412188530e-03 + + 5.0601941347122192e-01 7.3136532306671143e-01 + <_> + + 0 -1 2004 -1.6607169527560472e-03 + + 5.9796321392059326e-01 4.5963698625564575e-01 + <_> + + 0 -1 2005 -2.7316259220242500e-02 + + 4.1743651032447815e-01 5.3088420629501343e-01 + <_> + + 0 -1 2006 -1.5845570014789701e-03 + + 5.6158047914505005e-01 4.5194861292839050e-01 + <_> + + 0 -1 2007 -1.5514739789068699e-03 + + 4.0761870145797729e-01 5.3607851266860962e-01 + <_> + + 0 -1 2008 3.8446558755822480e-04 + + 4.3472939729690552e-01 5.4304420948028564e-01 + <_> + + 0 -1 2009 -1.4672259800136089e-02 + + 1.6593049466609955e-01 5.1460939645767212e-01 + <_> + + 0 -1 2010 8.1608882173895836e-03 + + 4.9618190526962280e-01 1.8847459554672241e-01 + <_> + + 0 -1 2011 1.1121659772470593e-03 + + 4.8682639002799988e-01 6.0938161611557007e-01 + <_> + + 0 -1 2012 -7.2603770531713963e-03 + + 6.2843251228332520e-01 4.6903759241104126e-01 + <_> + + 0 -1 2013 -2.4046430189628154e-04 + + 5.5750000476837158e-01 4.0460440516471863e-01 + <_> + + 0 -1 2014 -2.3348190006799996e-04 + + 4.1157621145248413e-01 5.2528482675552368e-01 + <_> + + 0 -1 2015 5.5736480280756950e-03 + + 4.7300729155540466e-01 5.6901007890701294e-01 + <_> + + 0 -1 2016 3.0623769387602806e-02 + + 4.9718868732452393e-01 1.7400950193405151e-01 + <_> + + 0 -1 2017 9.2074798885732889e-04 + + 5.3721177577972412e-01 4.3548721075057983e-01 + <_> + + 0 -1 2018 -4.3550739064812660e-05 + + 5.3668838739395142e-01 4.3473169207572937e-01 + <_> + + 0 -1 2019 -6.6452710889279842e-03 + + 3.4355181455612183e-01 5.1605331897735596e-01 + <_> + + 0 -1 2020 4.3221998959779739e-02 + + 4.7667920589447021e-01 7.2936528921127319e-01 + <_> + + 0 -1 2021 2.2331769578158855e-03 + + 5.0293159484863281e-01 5.6331712007522583e-01 + <_> + + 0 -1 2022 3.1829739455133677e-03 + + 4.0160921216011047e-01 5.1921367645263672e-01 + <_> + + 0 -1 2023 -1.8027749320026487e-04 + + 4.0883159637451172e-01 5.4179197549819946e-01 + <_> + + 0 -1 2024 -5.2934689447283745e-03 + + 4.0756770968437195e-01 5.2435618638992310e-01 + <_> + + 0 -1 2025 1.2750959722325206e-03 + + 4.9132829904556274e-01 6.3870108127593994e-01 + <_> + + 0 -1 2026 4.3385322205722332e-03 + + 5.0316721200942993e-01 2.9473468661308289e-01 + <_> + + 0 -1 2027 8.5250744596123695e-03 + + 4.9497890472412109e-01 6.3088691234588623e-01 + <_> + + 0 -1 2028 -9.4266352243721485e-04 + + 5.3283667564392090e-01 4.2856499552726746e-01 + <_> + + 0 -1 2029 1.3609660090878606e-03 + + 4.9915251135826111e-01 5.9415012598037720e-01 + <_> + + 0 -1 2030 4.4782509212382138e-04 + + 4.5735040307044983e-01 5.8544808626174927e-01 + <_> + + 0 -1 2031 1.3360050506889820e-03 + + 4.6043589711189270e-01 5.8490520715713501e-01 + <_> + + 0 -1 2032 -6.0967548051849008e-04 + + 3.9693889021873474e-01 5.2294230461120605e-01 + <_> + + 0 -1 2033 -2.3656780831515789e-03 + + 5.8083200454711914e-01 4.8983570933341980e-01 + <_> + + 0 -1 2034 1.0734340175986290e-03 + + 4.3512108922004700e-01 5.4700392484664917e-01 + <_> + + 0 -1 2035 2.1923359017819166e-03 + + 5.3550601005554199e-01 3.8429039716720581e-01 + <_> + + 0 -1 2036 5.4968618787825108e-03 + + 5.0181388854980469e-01 2.8271919488906860e-01 + <_> + + 0 -1 2037 -7.5368821620941162e-02 + + 1.2250760197639465e-01 5.1488268375396729e-01 + <_> + + 0 -1 2038 2.5134470313787460e-02 + + 4.7317668795585632e-01 7.0254462957382202e-01 + <_> + + 0 -1 2039 -2.9358599931583740e-05 + + 5.4305320978164673e-01 4.6560868620872498e-01 + <_> + + 0 -1 2040 -5.8355910005047917e-04 + + 4.0310400724411011e-01 5.1901197433471680e-01 + <_> + + 0 -1 2041 -2.6639450807124376e-03 + + 4.3081268668174744e-01 5.1617711782455444e-01 + <_> + + 0 -1 2042 -1.3804089976474643e-03 + + 6.2198299169540405e-01 4.6955159306526184e-01 + <_> + + 0 -1 2043 1.2313219485804439e-03 + + 5.3793638944625854e-01 4.4258311390876770e-01 + <_> + + 0 -1 2044 -1.4644179827882908e-05 + + 5.2816402912139893e-01 4.2225030064582825e-01 + <_> + + 0 -1 2045 -1.2818809598684311e-02 + + 2.5820928812026978e-01 5.1799327135086060e-01 + <_> + + 0 -1 2046 2.2852189838886261e-02 + + 4.7786930203437805e-01 7.6092642545700073e-01 + <_> + + 0 -1 2047 8.2305970136076212e-04 + + 5.3409922122955322e-01 4.6717241406440735e-01 + <_> + + 0 -1 2048 1.2770120054483414e-02 + + 4.9657610058784485e-01 1.4723660051822662e-01 + <_> + + 0 -1 2049 -5.0051510334014893e-02 + + 6.4149940013885498e-01 5.0165921449661255e-01 + <_> + + 0 -1 2050 1.5775270760059357e-02 + + 4.5223200321197510e-01 5.6853622198104858e-01 + <_> + + 0 -1 2051 -1.8501620739698410e-02 + + 2.7647489309310913e-01 5.1379591226577759e-01 + <_> + + 0 -1 2052 2.4626250378787518e-03 + + 5.1419419050216675e-01 3.7954080104827881e-01 + <_> + + 0 -1 2053 6.2916167080402374e-02 + + 5.0606489181518555e-01 6.5804338455200195e-01 + <_> + + 0 -1 2054 -2.1648500478477217e-05 + + 5.1953881978988647e-01 4.0198868513107300e-01 + <_> + + 0 -1 2055 2.1180990152060986e-03 + + 4.9623650312423706e-01 5.9544587135314941e-01 + <_> + + 0 -1 2056 -1.6634890809655190e-02 + + 3.7579330801963806e-01 5.1754468679428101e-01 + <_> + + 0 -1 2057 -2.8899470344185829e-03 + + 6.6240137815475464e-01 5.0571787357330322e-01 + <_> + + 0 -1 2058 7.6783262193202972e-02 + + 4.7957968711853027e-01 8.0477148294448853e-01 + <_> + + 0 -1 2059 3.9170677773654461e-03 + + 4.9378821253776550e-01 5.7199418544769287e-01 + <_> + + 0 -1 2060 -7.2670601308345795e-02 + + 5.3894560784101486e-02 4.9439039826393127e-01 + <_> + + 0 -1 2061 5.4039502143859863e-01 + + 5.1297742128372192e-01 1.1433389782905579e-01 + <_> + + 0 -1 2062 2.9510019812732935e-03 + + 4.5283439755439758e-01 5.6985741853713989e-01 + <_> + + 0 -1 2063 3.4508369863033295e-03 + + 5.3577268123626709e-01 4.2187309265136719e-01 + <_> + + 0 -1 2064 -4.2077939724549651e-04 + + 5.9161728620529175e-01 4.6379259228706360e-01 + <_> + + 0 -1 2065 3.3051050268113613e-03 + + 5.2733850479125977e-01 4.3820428848266602e-01 + <_> + + 0 -1 2066 4.7735060798004270e-04 + + 4.0465280413627625e-01 5.1818847656250000e-01 + <_> + + 0 -1 2067 -2.5928510352969170e-02 + + 7.4522358179092407e-01 5.0893861055374146e-01 + <_> + + 0 -1 2068 -2.9729790985584259e-03 + + 3.2954359054565430e-01 5.0587952136993408e-01 + <_> + + 0 -1 2069 5.8508329093456268e-03 + + 4.8571440577507019e-01 5.7930248975753784e-01 + <_> + + 0 -1 2070 -4.5967519283294678e-02 + + 4.3127310276031494e-01 5.3806531429290771e-01 + <_> + + 0 -1 2071 1.5585960447788239e-01 + + 5.1961702108383179e-01 1.6847139596939087e-01 + <_> + + 0 -1 2072 1.5164829790592194e-02 + + 4.7357571125030518e-01 6.7350268363952637e-01 + <_> + + 0 -1 2073 -1.0604249546304345e-03 + + 5.8229267597198486e-01 4.7757029533386230e-01 + <_> + + 0 -1 2074 6.6476291976869106e-03 + + 4.9991989135742188e-01 2.3195350170135498e-01 + <_> + + 0 -1 2075 -1.2231130152940750e-02 + + 4.7508931159973145e-01 5.2629822492599487e-01 + <_> + + 0 -1 2076 5.6528882123529911e-03 + + 5.0697678327560425e-01 3.5618188977241516e-01 + <_> + + 0 -1 2077 1.2977829901501536e-03 + + 4.8756939172744751e-01 5.6190627813339233e-01 + <_> + + 0 -1 2078 1.0781589895486832e-02 + + 4.7507700324058533e-01 6.7823082208633423e-01 + <_> + + 0 -1 2079 2.8654779307544231e-03 + + 5.3054618835449219e-01 4.2907360196113586e-01 + <_> + + 0 -1 2080 2.8663428965955973e-03 + + 4.5184791088104248e-01 5.5393511056900024e-01 + <_> + + 0 -1 2081 -5.1983320154249668e-03 + + 4.1491198539733887e-01 5.4341888427734375e-01 + <_> + + 0 -1 2082 5.3739990107715130e-03 + + 4.7178968787193298e-01 6.5076571702957153e-01 + <_> + + 0 -1 2083 -1.4641529880464077e-02 + + 2.1721640229225159e-01 5.1617771387100220e-01 + <_> + + 0 -1 2084 -1.5042580344015732e-05 + + 5.3373837471008301e-01 4.2988368868827820e-01 + <_> + + 0 -1 2085 -1.1875660129589960e-04 + + 4.6045941114425659e-01 5.5824470520019531e-01 + <_> + + 0 -1 2086 1.6995530575513840e-02 + + 4.9458950757980347e-01 7.3880076408386230e-02 + <_> + + 0 -1 2087 -3.5095941275358200e-02 + + 7.0055091381072998e-01 4.9775910377502441e-01 + <_> + + 0 -1 2088 2.4217350874096155e-03 + + 4.4662651419639587e-01 5.4776942729949951e-01 + <_> + + 0 -1 2089 -9.6340337768197060e-04 + + 4.7140988707542419e-01 5.3133380413055420e-01 + <_> + + 0 -1 2090 1.6391130338888615e-04 + + 4.3315461277961731e-01 5.3422421216964722e-01 + <_> + + 0 -1 2091 -2.1141460165381432e-02 + + 2.6447001099586487e-01 5.2044987678527832e-01 + <_> + + 0 -1 2092 8.7775202700868249e-04 + + 5.2083498239517212e-01 4.1527429223060608e-01 + <_> + + 0 -1 2093 -2.7943920344114304e-02 + + 6.3441252708435059e-01 5.0188118219375610e-01 + <_> + + 0 -1 2094 6.7297378554940224e-03 + + 5.0504380464553833e-01 3.5008639097213745e-01 + <_> + + 0 -1 2095 2.3281039670109749e-02 + + 4.9663180112838745e-01 6.9686770439147949e-01 + <_> + + 0 -1 2096 -1.1644979938864708e-02 + + 3.3002600073814392e-01 5.0496298074722290e-01 + <_> + + 0 -1 2097 1.5764309093356133e-02 + + 4.9915981292724609e-01 7.3211538791656494e-01 + <_> + + 0 -1 2098 -1.3611479662358761e-03 + + 3.9117351174354553e-01 5.1606708765029907e-01 + <_> + + 0 -1 2099 -8.1522337859496474e-04 + + 5.6289112567901611e-01 4.9497190117835999e-01 + <_> + + 0 -1 2100 -6.0066272271797061e-04 + + 5.8535951375961304e-01 4.5505958795547485e-01 + <_> + + 0 -1 2101 4.9715518252924085e-04 + + 4.2714700102806091e-01 5.4435992240905762e-01 + <_> + + 0 -1 2102 2.3475370835512877e-03 + + 5.1431107521057129e-01 3.8876569271087646e-01 + <_> + + 0 -1 2103 -8.9261569082736969e-03 + + 6.0445022583007812e-01 4.9717208743095398e-01 + <_> + + 0 -1 2104 -1.3919910416007042e-02 + + 2.5831609964370728e-01 5.0003677606582642e-01 + <_> + + 0 -1 2105 1.0209949687123299e-03 + + 4.8573741316795349e-01 5.5603581666946411e-01 + <_> + + 0 -1 2106 -2.7441629208624363e-03 + + 5.9368848800659180e-01 4.6457770466804504e-01 + <_> + + 0 -1 2107 -1.6200130805373192e-02 + + 3.1630149483680725e-01 5.1934951543807983e-01 + <_> + + 0 -1 2108 4.3331980705261230e-03 + + 5.0612241029739380e-01 3.4588789939880371e-01 + <_> + + 0 -1 2109 5.8497930876910686e-04 + + 4.7790178656578064e-01 5.8701777458190918e-01 + <_> + + 0 -1 2110 -2.2466450463980436e-03 + + 4.2978510260581970e-01 5.3747731447219849e-01 + <_> + + 0 -1 2111 2.3146099410951138e-03 + + 5.4386717081069946e-01 4.6409699320793152e-01 + <_> + + 0 -1 2112 8.7679121643304825e-03 + + 4.7268930077552795e-01 6.7717897891998291e-01 + <_> + + 0 -1 2113 -2.2448020172305405e-04 + + 4.2291730642318726e-01 5.4280489683151245e-01 + <_> + + 0 -1 2114 -7.4336021207273006e-03 + + 6.0988807678222656e-01 4.6836739778518677e-01 + <_> + + 0 -1 2115 -2.3189240600913763e-03 + + 5.6894367933273315e-01 4.4242420792579651e-01 + <_> + + 0 -1 2116 -2.1042178850620985e-03 + + 3.7622210383415222e-01 5.1870870590209961e-01 + <_> + + 0 -1 2117 4.6034841216169298e-04 + + 4.6994051337242126e-01 5.7712072134017944e-01 + <_> + + 0 -1 2118 1.0547629790380597e-03 + + 4.4652169942855835e-01 5.6017017364501953e-01 + <_> + + 0 -1 2119 8.7148818420246243e-04 + + 5.4498052597045898e-01 3.9147090911865234e-01 + <_> + + 0 -1 2120 3.3364820410497487e-04 + + 4.5640090107917786e-01 5.6457388401031494e-01 + <_> + + 0 -1 2121 -1.4853250468149781e-03 + + 5.7473778724670410e-01 4.6927788853645325e-01 + <_> + + 0 -1 2122 3.0251620337367058e-03 + + 5.1661968231201172e-01 3.7628141045570374e-01 + <_> + + 0 -1 2123 5.0280741415917873e-03 + + 5.0021117925643921e-01 6.1515271663665771e-01 + <_> + + 0 -1 2124 -5.8164511574432254e-04 + + 5.3945982456207275e-01 4.3907511234283447e-01 + <_> + + 0 -1 2125 4.5141529291868210e-02 + + 5.1883268356323242e-01 2.0630359649658203e-01 + <_> + + 0 -1 2126 -1.0795620037242770e-03 + + 3.9046850800514221e-01 5.1379072666168213e-01 + <_> + + 0 -1 2127 1.5995999274309725e-04 + + 4.8953229188919067e-01 5.4275041818618774e-01 + <_> + + 0 -1 2128 -1.9359270110726357e-02 + + 6.9752287864685059e-01 4.7735071182250977e-01 + <_> + + 0 -1 2129 2.0725509524345398e-01 + + 5.2336359024047852e-01 3.0349919199943542e-01 + <_> + + 0 -1 2130 -4.1953290929086506e-04 + + 5.4193967580795288e-01 4.4601860642433167e-01 + <_> + + 0 -1 2131 2.2582069505006075e-03 + + 4.8157641291618347e-01 6.0274088382720947e-01 + <_> + + 0 -1 2132 -6.7811207845807076e-03 + + 3.9802789688110352e-01 5.1833057403564453e-01 + <_> + + 0 -1 2133 1.1154309846460819e-02 + + 5.4312318563461304e-01 4.1887599229812622e-01 + <_> + + 0 -1 2134 4.3162431567907333e-02 + + 4.7382280230522156e-01 6.5229612588882446e-01 + + <_> + + <_> + 3 7 14 4 -1. + <_> + 3 9 14 2 2. + <_> + + <_> + 1 2 18 4 -1. + <_> + 7 2 6 4 3. + <_> + + <_> + 1 7 15 9 -1. + <_> + 1 10 15 3 3. + <_> + + <_> + 5 6 2 6 -1. + <_> + 5 9 2 3 2. + <_> + + <_> + 7 5 6 3 -1. + <_> + 9 5 2 3 3. + <_> + + <_> + 4 0 12 9 -1. + <_> + 4 3 12 3 3. + <_> + + <_> + 6 9 10 8 -1. + <_> + 6 13 10 4 2. + <_> + + <_> + 3 6 14 8 -1. + <_> + 3 10 14 4 2. + <_> + + <_> + 14 1 6 10 -1. + <_> + 14 1 3 10 2. + <_> + + <_> + 7 8 5 12 -1. + <_> + 7 12 5 4 3. + <_> + + <_> + 1 1 18 3 -1. + <_> + 7 1 6 3 3. + <_> + + <_> + 1 8 17 2 -1. + <_> + 1 9 17 1 2. + <_> + + <_> + 16 6 4 2 -1. + <_> + 16 7 4 1 2. + <_> + + <_> + 5 17 2 2 -1. + <_> + 5 18 2 1 2. + <_> + + <_> + 14 2 6 12 -1. + <_> + 14 2 3 12 2. + <_> + + <_> + 4 0 4 12 -1. + <_> + 4 0 2 6 2. + <_> + 6 6 2 6 2. + <_> + + <_> + 2 11 18 8 -1. + <_> + 8 11 6 8 3. + <_> + + <_> + 5 7 10 2 -1. + <_> + 5 8 10 1 2. + <_> + + <_> + 15 11 5 3 -1. + <_> + 15 12 5 1 3. + <_> + + <_> + 5 3 10 9 -1. + <_> + 5 6 10 3 3. + <_> + + <_> + 9 4 2 14 -1. + <_> + 9 11 2 7 2. + <_> + + <_> + 3 5 4 12 -1. + <_> + 3 9 4 4 3. + <_> + + <_> + 4 5 12 5 -1. + <_> + 8 5 4 5 3. + <_> + + <_> + 5 6 10 8 -1. + <_> + 5 10 10 4 2. + <_> + + <_> + 8 0 6 9 -1. + <_> + 8 3 6 3 3. + <_> + + <_> + 9 12 1 8 -1. + <_> + 9 16 1 4 2. + <_> + + <_> + 0 7 20 6 -1. + <_> + 0 9 20 2 3. + <_> + + <_> + 7 0 6 17 -1. + <_> + 9 0 2 17 3. + <_> + + <_> + 9 0 6 4 -1. + <_> + 11 0 2 4 3. + <_> + + <_> + 5 1 6 4 -1. + <_> + 7 1 2 4 3. + <_> + + <_> + 12 1 6 16 -1. + <_> + 14 1 2 16 3. + <_> + + <_> + 0 5 18 8 -1. + <_> + 0 5 9 4 2. + <_> + 9 9 9 4 2. + <_> + + <_> + 8 15 10 4 -1. + <_> + 13 15 5 2 2. + <_> + 8 17 5 2 2. + <_> + + <_> + 3 1 4 8 -1. + <_> + 3 1 2 4 2. + <_> + 5 5 2 4 2. + <_> + + <_> + 3 6 14 10 -1. + <_> + 10 6 7 5 2. + <_> + 3 11 7 5 2. + <_> + + <_> + 2 1 6 16 -1. + <_> + 4 1 2 16 3. + <_> + + <_> + 0 18 20 2 -1. + <_> + 0 19 20 1 2. + <_> + + <_> + 8 13 4 3 -1. + <_> + 8 14 4 1 3. + <_> + + <_> + 9 14 2 3 -1. + <_> + 9 15 2 1 3. + <_> + + <_> + 0 12 9 6 -1. + <_> + 0 14 9 2 3. + <_> + + <_> + 5 7 3 4 -1. + <_> + 5 9 3 2 2. + <_> + + <_> + 9 3 2 16 -1. + <_> + 9 11 2 8 2. + <_> + + <_> + 3 6 13 8 -1. + <_> + 3 10 13 4 2. + <_> + + <_> + 12 3 8 2 -1. + <_> + 12 3 4 2 2. + <_> + + <_> + 8 8 4 12 -1. + <_> + 8 12 4 4 3. + <_> + + <_> + 11 3 8 6 -1. + <_> + 15 3 4 3 2. + <_> + 11 6 4 3 2. + <_> + + <_> + 7 1 6 19 -1. + <_> + 9 1 2 19 3. + <_> + + <_> + 9 0 6 4 -1. + <_> + 11 0 2 4 3. + <_> + + <_> + 3 1 9 3 -1. + <_> + 6 1 3 3 3. + <_> + + <_> + 8 15 10 4 -1. + <_> + 13 15 5 2 2. + <_> + 8 17 5 2 2. + <_> + + <_> + 0 3 6 10 -1. + <_> + 3 3 3 10 2. + <_> + + <_> + 3 4 15 15 -1. + <_> + 3 9 15 5 3. + <_> + + <_> + 6 5 8 6 -1. + <_> + 6 7 8 2 3. + <_> + + <_> + 4 4 12 10 -1. + <_> + 10 4 6 5 2. + <_> + 4 9 6 5 2. + <_> + + <_> + 6 4 4 4 -1. + <_> + 8 4 2 4 2. + <_> + + <_> + 15 11 1 2 -1. + <_> + 15 12 1 1 2. + <_> + + <_> + 3 11 2 2 -1. + <_> + 3 12 2 1 2. + <_> + + <_> + 16 11 1 3 -1. + <_> + 16 12 1 1 3. + <_> + + <_> + 3 15 6 4 -1. + <_> + 3 15 3 2 2. + <_> + 6 17 3 2 2. + <_> + + <_> + 6 7 8 2 -1. + <_> + 6 8 8 1 2. + <_> + + <_> + 3 11 1 3 -1. + <_> + 3 12 1 1 3. + <_> + + <_> + 6 0 12 2 -1. + <_> + 6 1 12 1 2. + <_> + + <_> + 9 14 2 3 -1. + <_> + 9 15 2 1 3. + <_> + + <_> + 7 15 6 2 -1. + <_> + 7 16 6 1 2. + <_> + + <_> + 0 5 4 6 -1. + <_> + 0 7 4 2 3. + <_> + + <_> + 4 12 12 2 -1. + <_> + 8 12 4 2 3. + <_> + + <_> + 6 3 1 9 -1. + <_> + 6 6 1 3 3. + <_> + + <_> + 10 17 3 2 -1. + <_> + 11 17 1 2 3. + <_> + + <_> + 9 9 2 2 -1. + <_> + 9 10 2 1 2. + <_> + + <_> + 7 6 6 4 -1. + <_> + 9 6 2 4 3. + <_> + + <_> + 7 17 3 2 -1. + <_> + 8 17 1 2 3. + <_> + + <_> + 10 17 3 3 -1. + <_> + 11 17 1 3 3. + <_> + + <_> + 8 12 3 2 -1. + <_> + 8 13 3 1 2. + <_> + + <_> + 9 3 6 2 -1. + <_> + 11 3 2 2 3. + <_> + + <_> + 3 11 14 4 -1. + <_> + 3 13 14 2 2. + <_> + + <_> + 1 10 18 4 -1. + <_> + 10 10 9 2 2. + <_> + 1 12 9 2 2. + <_> + + <_> + 0 10 3 3 -1. + <_> + 0 11 3 1 3. + <_> + + <_> + 9 1 6 6 -1. + <_> + 11 1 2 6 3. + <_> + + <_> + 8 7 3 6 -1. + <_> + 9 7 1 6 3. + <_> + + <_> + 1 0 18 9 -1. + <_> + 1 3 18 3 3. + <_> + + <_> + 12 10 2 6 -1. + <_> + 12 13 2 3 2. + <_> + + <_> + 0 5 19 8 -1. + <_> + 0 9 19 4 2. + <_> + + <_> + 7 0 6 9 -1. + <_> + 9 0 2 9 3. + <_> + + <_> + 5 3 6 1 -1. + <_> + 7 3 2 1 3. + <_> + + <_> + 11 3 6 1 -1. + <_> + 13 3 2 1 3. + <_> + + <_> + 5 10 4 6 -1. + <_> + 5 13 4 3 2. + <_> + + <_> + 11 3 6 1 -1. + <_> + 13 3 2 1 3. + <_> + + <_> + 4 4 12 6 -1. + <_> + 4 6 12 2 3. + <_> + + <_> + 15 12 2 6 -1. + <_> + 15 14 2 2 3. + <_> + + <_> + 9 3 2 2 -1. + <_> + 10 3 1 2 2. + <_> + + <_> + 9 3 3 1 -1. + <_> + 10 3 1 1 3. + <_> + + <_> + 1 1 4 14 -1. + <_> + 3 1 2 14 2. + <_> + + <_> + 9 0 4 4 -1. + <_> + 11 0 2 2 2. + <_> + 9 2 2 2 2. + <_> + + <_> + 7 5 1 14 -1. + <_> + 7 12 1 7 2. + <_> + + <_> + 19 0 1 4 -1. + <_> + 19 2 1 2 2. + <_> + + <_> + 5 5 6 4 -1. + <_> + 8 5 3 4 2. + <_> + + <_> + 9 18 3 2 -1. + <_> + 10 18 1 2 3. + <_> + + <_> + 8 18 3 2 -1. + <_> + 9 18 1 2 3. + <_> + + <_> + 4 5 12 6 -1. + <_> + 4 7 12 2 3. + <_> + + <_> + 3 12 2 6 -1. + <_> + 3 14 2 2 3. + <_> + + <_> + 10 8 2 12 -1. + <_> + 10 12 2 4 3. + <_> + + <_> + 7 18 3 2 -1. + <_> + 8 18 1 2 3. + <_> + + <_> + 9 0 6 2 -1. + <_> + 11 0 2 2 3. + <_> + + <_> + 5 11 9 3 -1. + <_> + 5 12 9 1 3. + <_> + + <_> + 9 0 6 2 -1. + <_> + 11 0 2 2 3. + <_> + + <_> + 1 1 18 5 -1. + <_> + 7 1 6 5 3. + <_> + + <_> + 8 0 4 4 -1. + <_> + 10 0 2 2 2. + <_> + 8 2 2 2 2. + <_> + + <_> + 3 12 1 3 -1. + <_> + 3 13 1 1 3. + <_> + + <_> + 8 14 5 3 -1. + <_> + 8 15 5 1 3. + <_> + + <_> + 5 4 10 12 -1. + <_> + 5 4 5 6 2. + <_> + 10 10 5 6 2. + <_> + + <_> + 9 6 9 12 -1. + <_> + 9 10 9 4 3. + <_> + + <_> + 2 2 12 14 -1. + <_> + 2 2 6 7 2. + <_> + 8 9 6 7 2. + <_> + + <_> + 4 7 12 2 -1. + <_> + 8 7 4 2 3. + <_> + + <_> + 7 4 6 4 -1. + <_> + 7 6 6 2 2. + <_> + + <_> + 4 5 11 8 -1. + <_> + 4 9 11 4 2. + <_> + + <_> + 3 10 16 4 -1. + <_> + 3 12 16 2 2. + <_> + + <_> + 0 0 16 2 -1. + <_> + 0 1 16 1 2. + <_> + + <_> + 7 5 6 2 -1. + <_> + 9 5 2 2 3. + <_> + + <_> + 3 2 6 10 -1. + <_> + 3 2 3 5 2. + <_> + 6 7 3 5 2. + <_> + + <_> + 10 5 8 15 -1. + <_> + 10 10 8 5 3. + <_> + + <_> + 3 14 8 6 -1. + <_> + 3 14 4 3 2. + <_> + 7 17 4 3 2. + <_> + + <_> + 14 2 2 2 -1. + <_> + 14 3 2 1 2. + <_> + + <_> + 1 10 7 6 -1. + <_> + 1 13 7 3 2. + <_> + + <_> + 15 4 4 3 -1. + <_> + 15 4 2 3 2. + <_> + + <_> + 2 9 14 6 -1. + <_> + 2 9 7 3 2. + <_> + 9 12 7 3 2. + <_> + + <_> + 5 7 10 4 -1. + <_> + 5 9 10 2 2. + <_> + + <_> + 6 9 8 8 -1. + <_> + 6 9 4 4 2. + <_> + 10 13 4 4 2. + <_> + + <_> + 14 1 3 2 -1. + <_> + 14 2 3 1 2. + <_> + + <_> + 1 4 4 2 -1. + <_> + 3 4 2 2 2. + <_> + + <_> + 11 10 2 8 -1. + <_> + 11 14 2 4 2. + <_> + + <_> + 0 0 5 3 -1. + <_> + 0 1 5 1 3. + <_> + + <_> + 2 5 18 8 -1. + <_> + 11 5 9 4 2. + <_> + 2 9 9 4 2. + <_> + + <_> + 6 6 1 6 -1. + <_> + 6 9 1 3 2. + <_> + + <_> + 19 1 1 3 -1. + <_> + 19 2 1 1 3. + <_> + + <_> + 7 6 6 6 -1. + <_> + 9 6 2 6 3. + <_> + + <_> + 19 1 1 3 -1. + <_> + 19 2 1 1 3. + <_> + + <_> + 3 13 2 3 -1. + <_> + 3 14 2 1 3. + <_> + + <_> + 8 4 8 12 -1. + <_> + 12 4 4 6 2. + <_> + 8 10 4 6 2. + <_> + + <_> + 5 2 6 3 -1. + <_> + 7 2 2 3 3. + <_> + + <_> + 6 1 9 10 -1. + <_> + 6 6 9 5 2. + <_> + + <_> + 0 4 6 12 -1. + <_> + 2 4 2 12 3. + <_> + + <_> + 15 13 2 3 -1. + <_> + 15 14 2 1 3. + <_> + + <_> + 7 14 5 3 -1. + <_> + 7 15 5 1 3. + <_> + + <_> + 15 13 3 3 -1. + <_> + 15 14 3 1 3. + <_> + + <_> + 6 14 8 3 -1. + <_> + 6 15 8 1 3. + <_> + + <_> + 15 13 3 3 -1. + <_> + 15 14 3 1 3. + <_> + + <_> + 2 13 3 3 -1. + <_> + 2 14 3 1 3. + <_> + + <_> + 4 7 12 12 -1. + <_> + 10 7 6 6 2. + <_> + 4 13 6 6 2. + <_> + + <_> + 9 7 2 6 -1. + <_> + 10 7 1 6 2. + <_> + + <_> + 8 9 5 2 -1. + <_> + 8 10 5 1 2. + <_> + + <_> + 8 6 3 4 -1. + <_> + 9 6 1 4 3. + <_> + + <_> + 9 6 2 8 -1. + <_> + 9 10 2 4 2. + <_> + + <_> + 7 7 3 6 -1. + <_> + 8 7 1 6 3. + <_> + + <_> + 11 3 3 3 -1. + <_> + 12 3 1 3 3. + <_> + + <_> + 5 4 6 1 -1. + <_> + 7 4 2 1 3. + <_> + + <_> + 5 6 10 3 -1. + <_> + 5 7 10 1 3. + <_> + + <_> + 7 3 6 9 -1. + <_> + 7 6 6 3 3. + <_> + + <_> + 6 7 9 1 -1. + <_> + 9 7 3 1 3. + <_> + + <_> + 2 8 16 8 -1. + <_> + 2 12 16 4 2. + <_> + + <_> + 14 6 2 6 -1. + <_> + 14 9 2 3 2. + <_> + + <_> + 1 5 6 15 -1. + <_> + 1 10 6 5 3. + <_> + + <_> + 10 0 6 9 -1. + <_> + 10 3 6 3 3. + <_> + + <_> + 6 6 7 14 -1. + <_> + 6 13 7 7 2. + <_> + + <_> + 13 7 3 6 -1. + <_> + 13 9 3 2 3. + <_> + + <_> + 1 8 15 4 -1. + <_> + 6 8 5 4 3. + <_> + + <_> + 11 2 3 10 -1. + <_> + 11 7 3 5 2. + <_> + + <_> + 3 7 4 6 -1. + <_> + 3 9 4 2 3. + <_> + + <_> + 13 3 6 10 -1. + <_> + 15 3 2 10 3. + <_> + + <_> + 5 7 8 10 -1. + <_> + 5 7 4 5 2. + <_> + 9 12 4 5 2. + <_> + + <_> + 4 4 12 12 -1. + <_> + 10 4 6 6 2. + <_> + 4 10 6 6 2. + <_> + + <_> + 1 4 6 9 -1. + <_> + 3 4 2 9 3. + <_> + + <_> + 11 3 2 5 -1. + <_> + 11 3 1 5 2. + <_> + + <_> + 7 3 2 5 -1. + <_> + 8 3 1 5 2. + <_> + + <_> + 10 14 2 3 -1. + <_> + 10 15 2 1 3. + <_> + + <_> + 5 12 6 2 -1. + <_> + 8 12 3 2 2. + <_> + + <_> + 9 14 2 3 -1. + <_> + 9 15 2 1 3. + <_> + + <_> + 4 11 12 6 -1. + <_> + 4 14 12 3 2. + <_> + + <_> + 11 11 5 9 -1. + <_> + 11 14 5 3 3. + <_> + + <_> + 6 15 3 2 -1. + <_> + 6 16 3 1 2. + <_> + + <_> + 11 0 3 5 -1. + <_> + 12 0 1 5 3. + <_> + + <_> + 5 5 6 7 -1. + <_> + 8 5 3 7 2. + <_> + + <_> + 13 0 1 9 -1. + <_> + 13 3 1 3 3. + <_> + + <_> + 3 2 4 8 -1. + <_> + 3 2 2 4 2. + <_> + 5 6 2 4 2. + <_> + + <_> + 13 12 4 6 -1. + <_> + 13 14 4 2 3. + <_> + + <_> + 3 12 4 6 -1. + <_> + 3 14 4 2 3. + <_> + + <_> + 13 11 3 4 -1. + <_> + 13 13 3 2 2. + <_> + + <_> + 4 4 4 3 -1. + <_> + 4 5 4 1 3. + <_> + + <_> + 7 5 11 8 -1. + <_> + 7 9 11 4 2. + <_> + + <_> + 7 8 3 4 -1. + <_> + 8 8 1 4 3. + <_> + + <_> + 9 1 6 1 -1. + <_> + 11 1 2 1 3. + <_> + + <_> + 5 5 3 3 -1. + <_> + 5 6 3 1 3. + <_> + + <_> + 0 9 20 6 -1. + <_> + 10 9 10 3 2. + <_> + 0 12 10 3 2. + <_> + + <_> + 8 6 3 5 -1. + <_> + 9 6 1 5 3. + <_> + + <_> + 11 0 1 3 -1. + <_> + 11 1 1 1 3. + <_> + + <_> + 4 2 4 2 -1. + <_> + 4 3 4 1 2. + <_> + + <_> + 12 6 4 3 -1. + <_> + 12 7 4 1 3. + <_> + + <_> + 5 0 6 4 -1. + <_> + 7 0 2 4 3. + <_> + + <_> + 9 7 3 8 -1. + <_> + 10 7 1 8 3. + <_> + + <_> + 9 7 2 2 -1. + <_> + 10 7 1 2 2. + <_> + + <_> + 6 7 14 4 -1. + <_> + 13 7 7 2 2. + <_> + 6 9 7 2 2. + <_> + + <_> + 0 5 3 6 -1. + <_> + 0 7 3 2 3. + <_> + + <_> + 13 11 3 4 -1. + <_> + 13 13 3 2 2. + <_> + + <_> + 4 11 3 4 -1. + <_> + 4 13 3 2 2. + <_> + + <_> + 5 9 12 8 -1. + <_> + 11 9 6 4 2. + <_> + 5 13 6 4 2. + <_> + + <_> + 9 12 1 3 -1. + <_> + 9 13 1 1 3. + <_> + + <_> + 10 15 2 4 -1. + <_> + 10 17 2 2 2. + <_> + + <_> + 7 7 6 1 -1. + <_> + 9 7 2 1 3. + <_> + + <_> + 12 3 6 6 -1. + <_> + 15 3 3 3 2. + <_> + 12 6 3 3 2. + <_> + + <_> + 0 4 10 6 -1. + <_> + 0 6 10 2 3. + <_> + + <_> + 8 3 8 14 -1. + <_> + 12 3 4 7 2. + <_> + 8 10 4 7 2. + <_> + + <_> + 4 4 7 15 -1. + <_> + 4 9 7 5 3. + <_> + + <_> + 12 2 6 8 -1. + <_> + 15 2 3 4 2. + <_> + 12 6 3 4 2. + <_> + + <_> + 2 2 6 8 -1. + <_> + 2 2 3 4 2. + <_> + 5 6 3 4 2. + <_> + + <_> + 2 13 18 7 -1. + <_> + 8 13 6 7 3. + <_> + + <_> + 4 3 8 14 -1. + <_> + 4 3 4 7 2. + <_> + 8 10 4 7 2. + <_> + + <_> + 18 1 2 6 -1. + <_> + 18 3 2 2 3. + <_> + + <_> + 9 11 2 3 -1. + <_> + 9 12 2 1 3. + <_> + + <_> + 18 1 2 6 -1. + <_> + 18 3 2 2 3. + <_> + + <_> + 0 1 2 6 -1. + <_> + 0 3 2 2 3. + <_> + + <_> + 1 5 18 6 -1. + <_> + 1 7 18 2 3. + <_> + + <_> + 0 2 6 7 -1. + <_> + 3 2 3 7 2. + <_> + + <_> + 7 3 6 14 -1. + <_> + 7 10 6 7 2. + <_> + + <_> + 3 7 13 10 -1. + <_> + 3 12 13 5 2. + <_> + + <_> + 11 15 2 2 -1. + <_> + 11 16 2 1 2. + <_> + + <_> + 2 11 16 4 -1. + <_> + 2 11 8 2 2. + <_> + 10 13 8 2 2. + <_> + + <_> + 13 7 6 4 -1. + <_> + 16 7 3 2 2. + <_> + 13 9 3 2 2. + <_> + + <_> + 6 10 3 9 -1. + <_> + 6 13 3 3 3. + <_> + + <_> + 14 6 1 6 -1. + <_> + 14 9 1 3 2. + <_> + + <_> + 5 10 4 1 -1. + <_> + 7 10 2 1 2. + <_> + + <_> + 3 8 15 5 -1. + <_> + 8 8 5 5 3. + <_> + + <_> + 1 6 5 4 -1. + <_> + 1 8 5 2 2. + <_> + + <_> + 3 1 17 6 -1. + <_> + 3 3 17 2 3. + <_> + + <_> + 6 7 8 2 -1. + <_> + 10 7 4 2 2. + <_> + + <_> + 9 7 3 2 -1. + <_> + 10 7 1 2 3. + <_> + + <_> + 8 7 3 2 -1. + <_> + 9 7 1 2 3. + <_> + + <_> + 8 9 4 2 -1. + <_> + 8 10 4 1 2. + <_> + + <_> + 8 8 4 3 -1. + <_> + 8 9 4 1 3. + <_> + + <_> + 9 5 6 4 -1. + <_> + 9 5 3 4 2. + <_> + + <_> + 8 13 4 3 -1. + <_> + 8 14 4 1 3. + <_> + + <_> + 4 7 12 6 -1. + <_> + 10 7 6 3 2. + <_> + 4 10 6 3 2. + <_> + + <_> + 8 14 4 3 -1. + <_> + 8 15 4 1 3. + <_> + + <_> + 9 7 3 3 -1. + <_> + 9 8 3 1 3. + <_> + + <_> + 7 4 3 8 -1. + <_> + 8 4 1 8 3. + <_> + + <_> + 10 0 3 6 -1. + <_> + 11 0 1 6 3. + <_> + + <_> + 6 3 4 8 -1. + <_> + 8 3 2 8 2. + <_> + + <_> + 14 3 6 13 -1. + <_> + 14 3 3 13 2. + <_> + + <_> + 8 13 3 6 -1. + <_> + 8 16 3 3 2. + <_> + + <_> + 14 3 6 13 -1. + <_> + 14 3 3 13 2. + <_> + + <_> + 0 7 10 4 -1. + <_> + 0 7 5 2 2. + <_> + 5 9 5 2 2. + <_> + + <_> + 14 3 6 13 -1. + <_> + 14 3 3 13 2. + <_> + + <_> + 0 3 6 13 -1. + <_> + 3 3 3 13 2. + <_> + + <_> + 9 1 4 1 -1. + <_> + 9 1 2 1 2. + <_> + + <_> + 8 0 2 1 -1. + <_> + 9 0 1 1 2. + <_> + + <_> + 10 16 4 4 -1. + <_> + 12 16 2 2 2. + <_> + 10 18 2 2 2. + <_> + + <_> + 9 6 2 3 -1. + <_> + 10 6 1 3 2. + <_> + + <_> + 4 5 12 2 -1. + <_> + 8 5 4 2 3. + <_> + + <_> + 8 7 3 5 -1. + <_> + 9 7 1 5 3. + <_> + + <_> + 6 4 8 6 -1. + <_> + 6 6 8 2 3. + <_> + + <_> + 9 5 2 12 -1. + <_> + 9 11 2 6 2. + <_> + + <_> + 4 6 6 8 -1. + <_> + 4 10 6 4 2. + <_> + + <_> + 12 2 8 5 -1. + <_> + 12 2 4 5 2. + <_> + + <_> + 0 8 18 3 -1. + <_> + 0 9 18 1 3. + <_> + + <_> + 8 12 4 8 -1. + <_> + 8 16 4 4 2. + <_> + + <_> + 0 2 8 5 -1. + <_> + 4 2 4 5 2. + <_> + + <_> + 13 11 3 4 -1. + <_> + 13 13 3 2 2. + <_> + + <_> + 5 11 6 1 -1. + <_> + 7 11 2 1 3. + <_> + + <_> + 11 3 3 1 -1. + <_> + 12 3 1 1 3. + <_> + + <_> + 7 13 5 3 -1. + <_> + 7 14 5 1 3. + <_> + + <_> + 11 11 7 6 -1. + <_> + 11 14 7 3 2. + <_> + + <_> + 2 11 7 6 -1. + <_> + 2 14 7 3 2. + <_> + + <_> + 12 14 2 6 -1. + <_> + 12 16 2 2 3. + <_> + + <_> + 8 14 3 3 -1. + <_> + 8 15 3 1 3. + <_> + + <_> + 11 0 3 5 -1. + <_> + 12 0 1 5 3. + <_> + + <_> + 6 1 4 9 -1. + <_> + 8 1 2 9 2. + <_> + + <_> + 10 3 6 1 -1. + <_> + 12 3 2 1 3. + <_> + + <_> + 8 8 3 4 -1. + <_> + 8 10 3 2 2. + <_> + + <_> + 8 12 4 2 -1. + <_> + 8 13 4 1 2. + <_> + + <_> + 5 18 4 2 -1. + <_> + 5 19 4 1 2. + <_> + + <_> + 2 1 18 6 -1. + <_> + 2 3 18 2 3. + <_> + + <_> + 6 0 3 2 -1. + <_> + 7 0 1 2 3. + <_> + + <_> + 13 8 6 2 -1. + <_> + 16 8 3 1 2. + <_> + 13 9 3 1 2. + <_> + + <_> + 6 10 3 6 -1. + <_> + 6 13 3 3 2. + <_> + + <_> + 0 13 20 4 -1. + <_> + 10 13 10 2 2. + <_> + 0 15 10 2 2. + <_> + + <_> + 7 7 6 5 -1. + <_> + 9 7 2 5 3. + <_> + + <_> + 11 0 2 2 -1. + <_> + 11 1 2 1 2. + <_> + + <_> + 1 8 6 2 -1. + <_> + 1 8 3 1 2. + <_> + 4 9 3 1 2. + <_> + + <_> + 0 2 20 2 -1. + <_> + 10 2 10 1 2. + <_> + 0 3 10 1 2. + <_> + + <_> + 7 14 5 3 -1. + <_> + 7 15 5 1 3. + <_> + + <_> + 7 13 6 6 -1. + <_> + 10 13 3 3 2. + <_> + 7 16 3 3 2. + <_> + + <_> + 9 12 2 3 -1. + <_> + 9 13 2 1 3. + <_> + + <_> + 16 11 1 6 -1. + <_> + 16 13 1 2 3. + <_> + + <_> + 3 11 1 6 -1. + <_> + 3 13 1 2 3. + <_> + + <_> + 4 4 14 12 -1. + <_> + 11 4 7 6 2. + <_> + 4 10 7 6 2. + <_> + + <_> + 5 4 3 3 -1. + <_> + 5 5 3 1 3. + <_> + + <_> + 12 3 3 3 -1. + <_> + 13 3 1 3 3. + <_> + + <_> + 6 6 8 3 -1. + <_> + 6 7 8 1 3. + <_> + + <_> + 12 3 3 3 -1. + <_> + 13 3 1 3 3. + <_> + + <_> + 3 1 4 10 -1. + <_> + 3 1 2 5 2. + <_> + 5 6 2 5 2. + <_> + + <_> + 5 7 10 2 -1. + <_> + 5 7 5 2 2. + <_> + + <_> + 8 7 3 3 -1. + <_> + 9 7 1 3 3. + <_> + + <_> + 15 12 2 3 -1. + <_> + 15 13 2 1 3. + <_> + + <_> + 7 8 3 4 -1. + <_> + 8 8 1 4 3. + <_> + + <_> + 13 4 1 12 -1. + <_> + 13 10 1 6 2. + <_> + + <_> + 4 5 12 12 -1. + <_> + 4 5 6 6 2. + <_> + 10 11 6 6 2. + <_> + + <_> + 7 14 7 3 -1. + <_> + 7 15 7 1 3. + <_> + + <_> + 3 12 2 3 -1. + <_> + 3 13 2 1 3. + <_> + + <_> + 3 2 14 2 -1. + <_> + 10 2 7 1 2. + <_> + 3 3 7 1 2. + <_> + + <_> + 0 1 3 10 -1. + <_> + 1 1 1 10 3. + <_> + + <_> + 9 0 6 5 -1. + <_> + 11 0 2 5 3. + <_> + + <_> + 5 7 6 2 -1. + <_> + 8 7 3 2 2. + <_> + + <_> + 7 1 6 10 -1. + <_> + 7 6 6 5 2. + <_> + + <_> + 1 1 18 3 -1. + <_> + 7 1 6 3 3. + <_> + + <_> + 16 3 3 6 -1. + <_> + 16 5 3 2 3. + <_> + + <_> + 6 3 7 6 -1. + <_> + 6 6 7 3 2. + <_> + + <_> + 4 7 12 2 -1. + <_> + 8 7 4 2 3. + <_> + + <_> + 0 4 17 10 -1. + <_> + 0 9 17 5 2. + <_> + + <_> + 3 4 15 16 -1. + <_> + 3 12 15 8 2. + <_> + + <_> + 7 15 6 4 -1. + <_> + 7 17 6 2 2. + <_> + + <_> + 15 2 4 9 -1. + <_> + 15 2 2 9 2. + <_> + + <_> + 2 3 3 2 -1. + <_> + 2 4 3 1 2. + <_> + + <_> + 13 6 7 9 -1. + <_> + 13 9 7 3 3. + <_> + + <_> + 8 11 4 3 -1. + <_> + 8 12 4 1 3. + <_> + + <_> + 0 2 20 6 -1. + <_> + 10 2 10 3 2. + <_> + 0 5 10 3 2. + <_> + + <_> + 3 2 6 10 -1. + <_> + 3 2 3 5 2. + <_> + 6 7 3 5 2. + <_> + + <_> + 13 10 3 4 -1. + <_> + 13 12 3 2 2. + <_> + + <_> + 4 10 3 4 -1. + <_> + 4 12 3 2 2. + <_> + + <_> + 7 5 6 3 -1. + <_> + 9 5 2 3 3. + <_> + + <_> + 7 6 6 8 -1. + <_> + 7 10 6 4 2. + <_> + + <_> + 0 11 20 6 -1. + <_> + 0 14 20 3 2. + <_> + + <_> + 4 13 4 6 -1. + <_> + 4 13 2 3 2. + <_> + 6 16 2 3 2. + <_> + + <_> + 6 0 8 12 -1. + <_> + 10 0 4 6 2. + <_> + 6 6 4 6 2. + <_> + + <_> + 2 0 15 2 -1. + <_> + 2 1 15 1 2. + <_> + + <_> + 9 12 2 3 -1. + <_> + 9 13 2 1 3. + <_> + + <_> + 3 12 1 2 -1. + <_> + 3 13 1 1 2. + <_> + + <_> + 9 11 2 3 -1. + <_> + 9 12 2 1 3. + <_> + + <_> + 7 3 3 1 -1. + <_> + 8 3 1 1 3. + <_> + + <_> + 17 7 3 6 -1. + <_> + 17 9 3 2 3. + <_> + + <_> + 7 2 3 2 -1. + <_> + 8 2 1 2 3. + <_> + + <_> + 11 4 5 3 -1. + <_> + 11 5 5 1 3. + <_> + + <_> + 4 4 5 3 -1. + <_> + 4 5 5 1 3. + <_> + + <_> + 19 3 1 2 -1. + <_> + 19 4 1 1 2. + <_> + + <_> + 5 5 4 3 -1. + <_> + 5 6 4 1 3. + <_> + + <_> + 17 7 3 6 -1. + <_> + 17 9 3 2 3. + <_> + + <_> + 0 7 3 6 -1. + <_> + 0 9 3 2 3. + <_> + + <_> + 14 2 6 9 -1. + <_> + 14 5 6 3 3. + <_> + + <_> + 0 4 5 6 -1. + <_> + 0 6 5 2 3. + <_> + + <_> + 10 5 6 2 -1. + <_> + 12 5 2 2 3. + <_> + + <_> + 4 5 6 2 -1. + <_> + 6 5 2 2 3. + <_> + + <_> + 8 1 4 6 -1. + <_> + 8 3 4 2 3. + <_> + + <_> + 0 2 3 6 -1. + <_> + 0 4 3 2 3. + <_> + + <_> + 6 6 8 3 -1. + <_> + 6 7 8 1 3. + <_> + + <_> + 0 1 5 9 -1. + <_> + 0 4 5 3 3. + <_> + + <_> + 16 0 4 15 -1. + <_> + 16 0 2 15 2. + <_> + + <_> + 1 10 3 2 -1. + <_> + 1 11 3 1 2. + <_> + + <_> + 14 4 1 10 -1. + <_> + 14 9 1 5 2. + <_> + + <_> + 0 1 4 12 -1. + <_> + 2 1 2 12 2. + <_> + + <_> + 11 11 4 2 -1. + <_> + 11 11 2 2 2. + <_> + + <_> + 5 11 4 2 -1. + <_> + 7 11 2 2 2. + <_> + + <_> + 3 8 15 5 -1. + <_> + 8 8 5 5 3. + <_> + + <_> + 0 0 6 10 -1. + <_> + 3 0 3 10 2. + <_> + + <_> + 11 4 3 2 -1. + <_> + 12 4 1 2 3. + <_> + + <_> + 8 12 3 8 -1. + <_> + 8 16 3 4 2. + <_> + + <_> + 8 14 5 3 -1. + <_> + 8 15 5 1 3. + <_> + + <_> + 7 14 4 3 -1. + <_> + 7 15 4 1 3. + <_> + + <_> + 11 4 3 2 -1. + <_> + 12 4 1 2 3. + <_> + + <_> + 3 15 14 4 -1. + <_> + 3 15 7 2 2. + <_> + 10 17 7 2 2. + <_> + + <_> + 2 2 16 4 -1. + <_> + 10 2 8 2 2. + <_> + 2 4 8 2 2. + <_> + + <_> + 0 8 6 12 -1. + <_> + 3 8 3 12 2. + <_> + + <_> + 5 7 10 2 -1. + <_> + 5 7 5 2 2. + <_> + + <_> + 9 7 2 5 -1. + <_> + 10 7 1 5 2. + <_> + + <_> + 13 7 6 4 -1. + <_> + 16 7 3 2 2. + <_> + 13 9 3 2 2. + <_> + + <_> + 0 13 8 2 -1. + <_> + 0 14 8 1 2. + <_> + + <_> + 13 7 6 4 -1. + <_> + 16 7 3 2 2. + <_> + 13 9 3 2 2. + <_> + + <_> + 1 7 6 4 -1. + <_> + 1 7 3 2 2. + <_> + 4 9 3 2 2. + <_> + + <_> + 12 6 1 12 -1. + <_> + 12 12 1 6 2. + <_> + + <_> + 9 5 2 6 -1. + <_> + 10 5 1 6 2. + <_> + + <_> + 14 12 2 3 -1. + <_> + 14 13 2 1 3. + <_> + + <_> + 4 12 2 3 -1. + <_> + 4 13 2 1 3. + <_> + + <_> + 8 12 4 3 -1. + <_> + 8 13 4 1 3. + <_> + + <_> + 5 2 2 4 -1. + <_> + 5 2 1 2 2. + <_> + 6 4 1 2 2. + <_> + + <_> + 5 5 11 3 -1. + <_> + 5 6 11 1 3. + <_> + + <_> + 7 6 4 12 -1. + <_> + 7 12 4 6 2. + <_> + + <_> + 12 13 8 5 -1. + <_> + 12 13 4 5 2. + <_> + + <_> + 7 6 1 12 -1. + <_> + 7 12 1 6 2. + <_> + + <_> + 1 2 6 3 -1. + <_> + 4 2 3 3 2. + <_> + + <_> + 9 5 6 10 -1. + <_> + 12 5 3 5 2. + <_> + 9 10 3 5 2. + <_> + + <_> + 5 5 8 12 -1. + <_> + 5 5 4 6 2. + <_> + 9 11 4 6 2. + <_> + + <_> + 0 7 20 6 -1. + <_> + 0 9 20 2 3. + <_> + + <_> + 4 2 2 2 -1. + <_> + 4 3 2 1 2. + <_> + + <_> + 4 18 12 2 -1. + <_> + 8 18 4 2 3. + <_> + + <_> + 7 4 4 16 -1. + <_> + 7 12 4 8 2. + <_> + + <_> + 7 6 7 8 -1. + <_> + 7 10 7 4 2. + <_> + + <_> + 6 3 3 1 -1. + <_> + 7 3 1 1 3. + <_> + + <_> + 11 15 2 4 -1. + <_> + 11 17 2 2 2. + <_> + + <_> + 3 5 4 8 -1. + <_> + 3 9 4 4 2. + <_> + + <_> + 7 1 6 12 -1. + <_> + 7 7 6 6 2. + <_> + + <_> + 4 6 6 2 -1. + <_> + 6 6 2 2 3. + <_> + + <_> + 16 4 4 6 -1. + <_> + 16 6 4 2 3. + <_> + + <_> + 3 3 5 2 -1. + <_> + 3 4 5 1 2. + <_> + + <_> + 9 11 2 3 -1. + <_> + 9 12 2 1 3. + <_> + + <_> + 2 16 4 2 -1. + <_> + 2 17 4 1 2. + <_> + + <_> + 7 13 6 6 -1. + <_> + 10 13 3 3 2. + <_> + 7 16 3 3 2. + <_> + + <_> + 7 0 3 4 -1. + <_> + 8 0 1 4 3. + <_> + + <_> + 8 15 4 3 -1. + <_> + 8 16 4 1 3. + <_> + + <_> + 0 4 4 6 -1. + <_> + 0 6 4 2 3. + <_> + + <_> + 5 6 12 3 -1. + <_> + 9 6 4 3 3. + <_> + + <_> + 7 6 6 14 -1. + <_> + 9 6 2 14 3. + <_> + + <_> + 9 7 3 3 -1. + <_> + 10 7 1 3 3. + <_> + + <_> + 6 12 2 4 -1. + <_> + 6 14 2 2 2. + <_> + + <_> + 10 12 7 6 -1. + <_> + 10 14 7 2 3. + <_> + + <_> + 1 0 15 2 -1. + <_> + 1 1 15 1 2. + <_> + + <_> + 14 0 6 6 -1. + <_> + 14 0 3 6 2. + <_> + + <_> + 5 3 3 1 -1. + <_> + 6 3 1 1 3. + <_> + + <_> + 14 0 6 6 -1. + <_> + 14 0 3 6 2. + <_> + + <_> + 0 3 20 10 -1. + <_> + 0 8 20 5 2. + <_> + + <_> + 14 0 6 6 -1. + <_> + 14 0 3 6 2. + <_> + + <_> + 0 0 6 6 -1. + <_> + 3 0 3 6 2. + <_> + + <_> + 19 15 1 2 -1. + <_> + 19 16 1 1 2. + <_> + + <_> + 0 2 4 8 -1. + <_> + 2 2 2 8 2. + <_> + + <_> + 2 1 18 4 -1. + <_> + 11 1 9 2 2. + <_> + 2 3 9 2 2. + <_> + + <_> + 8 12 1 2 -1. + <_> + 8 13 1 1 2. + <_> + + <_> + 5 2 10 6 -1. + <_> + 10 2 5 3 2. + <_> + 5 5 5 3 2. + <_> + + <_> + 9 7 2 4 -1. + <_> + 10 7 1 4 2. + <_> + + <_> + 9 7 3 3 -1. + <_> + 10 7 1 3 3. + <_> + + <_> + 4 5 12 8 -1. + <_> + 8 5 4 8 3. + <_> + + <_> + 15 15 4 3 -1. + <_> + 15 16 4 1 3. + <_> + + <_> + 8 18 3 1 -1. + <_> + 9 18 1 1 3. + <_> + + <_> + 9 13 4 3 -1. + <_> + 9 14 4 1 3. + <_> + + <_> + 7 13 4 3 -1. + <_> + 7 14 4 1 3. + <_> + + <_> + 19 15 1 2 -1. + <_> + 19 16 1 1 2. + <_> + + <_> + 0 15 8 4 -1. + <_> + 0 17 8 2 2. + <_> + + <_> + 9 3 6 4 -1. + <_> + 11 3 2 4 3. + <_> + + <_> + 8 14 4 3 -1. + <_> + 8 15 4 1 3. + <_> + + <_> + 3 14 14 6 -1. + <_> + 3 16 14 2 3. + <_> + + <_> + 6 3 6 6 -1. + <_> + 6 6 6 3 2. + <_> + + <_> + 5 11 10 6 -1. + <_> + 5 14 10 3 2. + <_> + + <_> + 3 10 3 4 -1. + <_> + 4 10 1 4 3. + <_> + + <_> + 13 9 2 2 -1. + <_> + 13 9 1 2 2. + <_> + + <_> + 5 3 6 4 -1. + <_> + 7 3 2 4 3. + <_> + + <_> + 9 7 3 3 -1. + <_> + 10 7 1 3 3. + <_> + + <_> + 2 12 2 3 -1. + <_> + 2 13 2 1 3. + <_> + + <_> + 9 8 3 12 -1. + <_> + 9 12 3 4 3. + <_> + + <_> + 3 14 4 6 -1. + <_> + 3 14 2 3 2. + <_> + 5 17 2 3 2. + <_> + + <_> + 16 15 2 2 -1. + <_> + 16 16 2 1 2. + <_> + + <_> + 2 15 2 2 -1. + <_> + 2 16 2 1 2. + <_> + + <_> + 8 12 4 3 -1. + <_> + 8 13 4 1 3. + <_> + + <_> + 0 7 20 1 -1. + <_> + 10 7 10 1 2. + <_> + + <_> + 7 6 8 3 -1. + <_> + 7 6 4 3 2. + <_> + + <_> + 5 7 8 2 -1. + <_> + 9 7 4 2 2. + <_> + + <_> + 9 7 3 5 -1. + <_> + 10 7 1 5 3. + <_> + + <_> + 8 7 3 5 -1. + <_> + 9 7 1 5 3. + <_> + + <_> + 11 1 3 5 -1. + <_> + 12 1 1 5 3. + <_> + + <_> + 6 2 3 6 -1. + <_> + 7 2 1 6 3. + <_> + + <_> + 14 14 6 5 -1. + <_> + 14 14 3 5 2. + <_> + + <_> + 9 8 2 2 -1. + <_> + 9 9 2 1 2. + <_> + + <_> + 10 7 1 3 -1. + <_> + 10 8 1 1 3. + <_> + + <_> + 6 6 2 2 -1. + <_> + 6 6 1 1 2. + <_> + 7 7 1 1 2. + <_> + + <_> + 2 11 18 4 -1. + <_> + 11 11 9 2 2. + <_> + 2 13 9 2 2. + <_> + + <_> + 6 6 2 2 -1. + <_> + 6 6 1 1 2. + <_> + 7 7 1 1 2. + <_> + + <_> + 0 15 20 2 -1. + <_> + 0 16 20 1 2. + <_> + + <_> + 4 14 2 3 -1. + <_> + 4 15 2 1 3. + <_> + + <_> + 8 14 4 3 -1. + <_> + 8 15 4 1 3. + <_> + + <_> + 8 7 2 3 -1. + <_> + 8 8 2 1 3. + <_> + + <_> + 9 10 2 3 -1. + <_> + 9 11 2 1 3. + <_> + + <_> + 5 4 10 4 -1. + <_> + 5 6 10 2 2. + <_> + + <_> + 9 7 6 4 -1. + <_> + 12 7 3 2 2. + <_> + 9 9 3 2 2. + <_> + + <_> + 4 7 3 6 -1. + <_> + 4 9 3 2 3. + <_> + + <_> + 11 15 4 4 -1. + <_> + 13 15 2 2 2. + <_> + 11 17 2 2 2. + <_> + + <_> + 7 8 4 2 -1. + <_> + 7 9 4 1 2. + <_> + + <_> + 13 1 4 3 -1. + <_> + 13 1 2 3 2. + <_> + + <_> + 5 15 4 4 -1. + <_> + 5 15 2 2 2. + <_> + 7 17 2 2 2. + <_> + + <_> + 9 5 4 7 -1. + <_> + 9 5 2 7 2. + <_> + + <_> + 5 6 8 3 -1. + <_> + 9 6 4 3 2. + <_> + + <_> + 9 9 2 2 -1. + <_> + 9 10 2 1 2. + <_> + + <_> + 7 15 5 3 -1. + <_> + 7 16 5 1 3. + <_> + + <_> + 11 10 4 3 -1. + <_> + 11 10 2 3 2. + <_> + + <_> + 6 9 8 10 -1. + <_> + 6 14 8 5 2. + <_> + + <_> + 10 11 6 2 -1. + <_> + 10 11 3 2 2. + <_> + + <_> + 4 11 6 2 -1. + <_> + 7 11 3 2 2. + <_> + + <_> + 11 3 8 1 -1. + <_> + 11 3 4 1 2. + <_> + + <_> + 6 3 3 2 -1. + <_> + 7 3 1 2 3. + <_> + + <_> + 14 5 6 5 -1. + <_> + 14 5 3 5 2. + <_> + + <_> + 7 5 2 12 -1. + <_> + 7 11 2 6 2. + <_> + + <_> + 8 11 4 3 -1. + <_> + 8 12 4 1 3. + <_> + + <_> + 4 1 2 3 -1. + <_> + 5 1 1 3 2. + <_> + + <_> + 18 3 2 6 -1. + <_> + 18 5 2 2 3. + <_> + + <_> + 0 3 2 6 -1. + <_> + 0 5 2 2 3. + <_> + + <_> + 9 12 2 3 -1. + <_> + 9 13 2 1 3. + <_> + + <_> + 7 13 4 3 -1. + <_> + 7 14 4 1 3. + <_> + + <_> + 18 0 2 6 -1. + <_> + 18 2 2 2 3. + <_> + + <_> + 0 0 2 6 -1. + <_> + 0 2 2 2 3. + <_> + + <_> + 8 14 6 3 -1. + <_> + 8 15 6 1 3. + <_> + + <_> + 7 4 2 4 -1. + <_> + 8 4 1 4 2. + <_> + + <_> + 8 5 4 6 -1. + <_> + 8 7 4 2 3. + <_> + + <_> + 6 4 2 2 -1. + <_> + 7 4 1 2 2. + <_> + + <_> + 3 14 14 4 -1. + <_> + 10 14 7 2 2. + <_> + 3 16 7 2 2. + <_> + + <_> + 6 15 6 2 -1. + <_> + 6 15 3 1 2. + <_> + 9 16 3 1 2. + <_> + + <_> + 14 15 6 2 -1. + <_> + 14 16 6 1 2. + <_> + + <_> + 2 12 12 8 -1. + <_> + 2 16 12 4 2. + <_> + + <_> + 7 7 7 2 -1. + <_> + 7 8 7 1 2. + <_> + + <_> + 0 2 18 2 -1. + <_> + 0 3 18 1 2. + <_> + + <_> + 9 6 2 5 -1. + <_> + 9 6 1 5 2. + <_> + + <_> + 7 5 3 8 -1. + <_> + 8 5 1 8 3. + <_> + + <_> + 9 6 3 4 -1. + <_> + 10 6 1 4 3. + <_> + + <_> + 4 13 3 2 -1. + <_> + 4 14 3 1 2. + <_> + + <_> + 9 4 6 3 -1. + <_> + 11 4 2 3 3. + <_> + + <_> + 5 4 6 3 -1. + <_> + 7 4 2 3 3. + <_> + + <_> + 14 11 5 2 -1. + <_> + 14 12 5 1 2. + <_> + + <_> + 1 2 6 9 -1. + <_> + 3 2 2 9 3. + <_> + + <_> + 14 6 6 13 -1. + <_> + 14 6 3 13 2. + <_> + + <_> + 3 6 14 8 -1. + <_> + 3 6 7 4 2. + <_> + 10 10 7 4 2. + <_> + + <_> + 16 0 4 11 -1. + <_> + 16 0 2 11 2. + <_> + + <_> + 3 4 12 12 -1. + <_> + 3 4 6 6 2. + <_> + 9 10 6 6 2. + <_> + + <_> + 11 4 5 3 -1. + <_> + 11 5 5 1 3. + <_> + + <_> + 4 11 4 2 -1. + <_> + 4 12 4 1 2. + <_> + + <_> + 10 7 2 2 -1. + <_> + 10 7 1 2 2. + <_> + + <_> + 8 7 2 2 -1. + <_> + 9 7 1 2 2. + <_> + + <_> + 9 17 3 2 -1. + <_> + 10 17 1 2 3. + <_> + + <_> + 5 6 3 3 -1. + <_> + 5 7 3 1 3. + <_> + + <_> + 10 0 3 3 -1. + <_> + 11 0 1 3 3. + <_> + + <_> + 5 6 6 2 -1. + <_> + 5 6 3 1 2. + <_> + 8 7 3 1 2. + <_> + + <_> + 12 16 4 3 -1. + <_> + 12 17 4 1 3. + <_> + + <_> + 3 12 3 2 -1. + <_> + 3 13 3 1 2. + <_> + + <_> + 9 12 3 2 -1. + <_> + 9 13 3 1 2. + <_> + + <_> + 1 11 16 4 -1. + <_> + 1 11 8 2 2. + <_> + 9 13 8 2 2. + <_> + + <_> + 12 4 3 3 -1. + <_> + 12 5 3 1 3. + <_> + + <_> + 4 4 5 3 -1. + <_> + 4 5 5 1 3. + <_> + + <_> + 12 16 4 3 -1. + <_> + 12 17 4 1 3. + <_> + + <_> + 5 4 3 3 -1. + <_> + 5 5 3 1 3. + <_> + + <_> + 9 0 2 2 -1. + <_> + 9 1 2 1 2. + <_> + + <_> + 8 9 4 2 -1. + <_> + 8 10 4 1 2. + <_> + + <_> + 8 8 4 3 -1. + <_> + 8 9 4 1 3. + <_> + + <_> + 0 13 6 3 -1. + <_> + 2 13 2 3 3. + <_> + + <_> + 16 14 3 2 -1. + <_> + 16 15 3 1 2. + <_> + + <_> + 1 18 18 2 -1. + <_> + 7 18 6 2 3. + <_> + + <_> + 16 14 3 2 -1. + <_> + 16 15 3 1 2. + <_> + + <_> + 1 14 3 2 -1. + <_> + 1 15 3 1 2. + <_> + + <_> + 7 14 6 3 -1. + <_> + 7 15 6 1 3. + <_> + + <_> + 5 14 8 3 -1. + <_> + 5 15 8 1 3. + <_> + + <_> + 10 6 4 14 -1. + <_> + 10 6 2 14 2. + <_> + + <_> + 6 6 4 14 -1. + <_> + 8 6 2 14 2. + <_> + + <_> + 13 5 2 3 -1. + <_> + 13 6 2 1 3. + <_> + + <_> + 7 16 6 1 -1. + <_> + 9 16 2 1 3. + <_> + + <_> + 9 12 3 3 -1. + <_> + 9 13 3 1 3. + <_> + + <_> + 7 0 3 3 -1. + <_> + 8 0 1 3 3. + <_> + + <_> + 4 0 16 18 -1. + <_> + 4 9 16 9 2. + <_> + + <_> + 1 1 16 14 -1. + <_> + 1 8 16 7 2. + <_> + + <_> + 3 9 15 4 -1. + <_> + 8 9 5 4 3. + <_> + + <_> + 6 12 7 3 -1. + <_> + 6 13 7 1 3. + <_> + + <_> + 14 15 2 3 -1. + <_> + 14 16 2 1 3. + <_> + + <_> + 2 3 16 14 -1. + <_> + 2 3 8 7 2. + <_> + 10 10 8 7 2. + <_> + + <_> + 16 2 4 18 -1. + <_> + 18 2 2 9 2. + <_> + 16 11 2 9 2. + <_> + + <_> + 4 15 2 3 -1. + <_> + 4 16 2 1 3. + <_> + + <_> + 16 2 4 18 -1. + <_> + 18 2 2 9 2. + <_> + 16 11 2 9 2. + <_> + + <_> + 1 1 8 3 -1. + <_> + 1 2 8 1 3. + <_> + + <_> + 8 11 4 3 -1. + <_> + 8 12 4 1 3. + <_> + + <_> + 5 11 5 9 -1. + <_> + 5 14 5 3 3. + <_> + + <_> + 16 0 4 11 -1. + <_> + 16 0 2 11 2. + <_> + + <_> + 7 0 6 1 -1. + <_> + 9 0 2 1 3. + <_> + + <_> + 16 3 3 7 -1. + <_> + 17 3 1 7 3. + <_> + + <_> + 1 3 3 7 -1. + <_> + 2 3 1 7 3. + <_> + + <_> + 7 8 6 12 -1. + <_> + 7 12 6 4 3. + <_> + + <_> + 0 0 4 11 -1. + <_> + 2 0 2 11 2. + <_> + + <_> + 14 0 6 20 -1. + <_> + 14 0 3 20 2. + <_> + + <_> + 0 3 1 2 -1. + <_> + 0 4 1 1 2. + <_> + + <_> + 5 5 10 8 -1. + <_> + 10 5 5 4 2. + <_> + 5 9 5 4 2. + <_> + + <_> + 4 7 12 4 -1. + <_> + 4 7 6 2 2. + <_> + 10 9 6 2 2. + <_> + + <_> + 2 1 6 4 -1. + <_> + 5 1 3 4 2. + <_> + + <_> + 9 7 6 4 -1. + <_> + 12 7 3 2 2. + <_> + 9 9 3 2 2. + <_> + + <_> + 5 6 2 6 -1. + <_> + 5 9 2 3 2. + <_> + + <_> + 9 16 6 4 -1. + <_> + 12 16 3 2 2. + <_> + 9 18 3 2 2. + <_> + + <_> + 9 4 2 12 -1. + <_> + 9 10 2 6 2. + <_> + + <_> + 7 1 6 18 -1. + <_> + 9 1 2 18 3. + <_> + + <_> + 4 12 12 2 -1. + <_> + 8 12 4 2 3. + <_> + + <_> + 8 8 6 2 -1. + <_> + 8 9 6 1 2. + <_> + + <_> + 8 0 3 6 -1. + <_> + 9 0 1 6 3. + <_> + + <_> + 11 18 3 2 -1. + <_> + 11 19 3 1 2. + <_> + + <_> + 1 1 17 4 -1. + <_> + 1 3 17 2 2. + <_> + + <_> + 11 8 4 12 -1. + <_> + 11 8 2 12 2. + <_> + + <_> + 8 14 4 3 -1. + <_> + 8 15 4 1 3. + <_> + + <_> + 12 3 2 17 -1. + <_> + 12 3 1 17 2. + <_> + + <_> + 4 7 6 1 -1. + <_> + 6 7 2 1 3. + <_> + + <_> + 18 3 2 3 -1. + <_> + 18 4 2 1 3. + <_> + + <_> + 8 4 3 4 -1. + <_> + 8 6 3 2 2. + <_> + + <_> + 4 5 12 10 -1. + <_> + 4 10 12 5 2. + <_> + + <_> + 5 18 4 2 -1. + <_> + 7 18 2 2 2. + <_> + + <_> + 17 2 3 6 -1. + <_> + 17 4 3 2 3. + <_> + + <_> + 7 7 6 6 -1. + <_> + 9 7 2 6 3. + <_> + + <_> + 17 2 3 6 -1. + <_> + 17 4 3 2 3. + <_> + + <_> + 8 0 3 4 -1. + <_> + 9 0 1 4 3. + <_> + + <_> + 9 14 2 3 -1. + <_> + 9 15 2 1 3. + <_> + + <_> + 0 12 6 3 -1. + <_> + 0 13 6 1 3. + <_> + + <_> + 8 14 4 3 -1. + <_> + 8 15 4 1 3. + <_> + + <_> + 3 12 2 3 -1. + <_> + 3 13 2 1 3. + <_> + + <_> + 5 6 12 7 -1. + <_> + 9 6 4 7 3. + <_> + + <_> + 0 2 3 6 -1. + <_> + 0 4 3 2 3. + <_> + + <_> + 14 6 1 3 -1. + <_> + 14 7 1 1 3. + <_> + + <_> + 2 0 3 14 -1. + <_> + 3 0 1 14 3. + <_> + + <_> + 12 14 5 6 -1. + <_> + 12 16 5 2 3. + <_> + + <_> + 4 14 5 6 -1. + <_> + 4 16 5 2 3. + <_> + + <_> + 11 10 2 2 -1. + <_> + 12 10 1 1 2. + <_> + 11 11 1 1 2. + <_> + + <_> + 5 0 3 14 -1. + <_> + 6 0 1 14 3. + <_> + + <_> + 10 15 2 3 -1. + <_> + 10 16 2 1 3. + <_> + + <_> + 0 2 2 3 -1. + <_> + 0 3 2 1 3. + <_> + + <_> + 5 11 12 6 -1. + <_> + 5 14 12 3 2. + <_> + + <_> + 6 11 3 9 -1. + <_> + 6 14 3 3 3. + <_> + + <_> + 11 10 2 2 -1. + <_> + 12 10 1 1 2. + <_> + 11 11 1 1 2. + <_> + + <_> + 5 6 1 3 -1. + <_> + 5 7 1 1 3. + <_> + + <_> + 4 9 13 3 -1. + <_> + 4 10 13 1 3. + <_> + + <_> + 1 7 15 6 -1. + <_> + 6 7 5 6 3. + <_> + + <_> + 4 5 12 6 -1. + <_> + 8 5 4 6 3. + <_> + + <_> + 8 10 4 3 -1. + <_> + 8 11 4 1 3. + <_> + + <_> + 15 14 1 3 -1. + <_> + 15 15 1 1 3. + <_> + + <_> + 1 11 5 3 -1. + <_> + 1 12 5 1 3. + <_> + + <_> + 7 1 7 12 -1. + <_> + 7 7 7 6 2. + <_> + + <_> + 0 1 6 10 -1. + <_> + 0 1 3 5 2. + <_> + 3 6 3 5 2. + <_> + + <_> + 16 1 4 3 -1. + <_> + 16 2 4 1 3. + <_> + + <_> + 5 5 2 3 -1. + <_> + 5 6 2 1 3. + <_> + + <_> + 12 2 3 5 -1. + <_> + 13 2 1 5 3. + <_> + + <_> + 0 3 4 6 -1. + <_> + 0 5 4 2 3. + <_> + + <_> + 8 12 4 2 -1. + <_> + 8 13 4 1 2. + <_> + + <_> + 8 18 3 1 -1. + <_> + 9 18 1 1 3. + <_> + + <_> + 11 10 2 2 -1. + <_> + 12 10 1 1 2. + <_> + 11 11 1 1 2. + <_> + + <_> + 7 10 2 2 -1. + <_> + 7 10 1 1 2. + <_> + 8 11 1 1 2. + <_> + + <_> + 11 11 4 4 -1. + <_> + 11 13 4 2 2. + <_> + + <_> + 8 12 3 8 -1. + <_> + 9 12 1 8 3. + <_> + + <_> + 13 0 6 3 -1. + <_> + 13 1 6 1 3. + <_> + + <_> + 8 8 3 4 -1. + <_> + 9 8 1 4 3. + <_> + + <_> + 5 7 10 10 -1. + <_> + 10 7 5 5 2. + <_> + 5 12 5 5 2. + <_> + + <_> + 3 18 8 2 -1. + <_> + 3 18 4 1 2. + <_> + 7 19 4 1 2. + <_> + + <_> + 10 2 6 8 -1. + <_> + 12 2 2 8 3. + <_> + + <_> + 4 2 6 8 -1. + <_> + 6 2 2 8 3. + <_> + + <_> + 11 0 3 7 -1. + <_> + 12 0 1 7 3. + <_> + + <_> + 7 11 2 1 -1. + <_> + 8 11 1 1 2. + <_> + + <_> + 15 14 1 3 -1. + <_> + 15 15 1 1 3. + <_> + + <_> + 7 15 2 2 -1. + <_> + 7 15 1 1 2. + <_> + 8 16 1 1 2. + <_> + + <_> + 15 14 1 3 -1. + <_> + 15 15 1 1 3. + <_> + + <_> + 6 0 3 7 -1. + <_> + 7 0 1 7 3. + <_> + + <_> + 18 1 2 7 -1. + <_> + 18 1 1 7 2. + <_> + + <_> + 2 0 8 20 -1. + <_> + 2 10 8 10 2. + <_> + + <_> + 3 0 15 6 -1. + <_> + 3 2 15 2 3. + <_> + + <_> + 4 3 12 2 -1. + <_> + 4 4 12 1 2. + <_> + + <_> + 16 0 4 5 -1. + <_> + 16 0 2 5 2. + <_> + + <_> + 7 0 3 4 -1. + <_> + 8 0 1 4 3. + <_> + + <_> + 16 0 4 5 -1. + <_> + 16 0 2 5 2. + <_> + + <_> + 1 7 6 13 -1. + <_> + 3 7 2 13 3. + <_> + + <_> + 16 0 4 5 -1. + <_> + 16 0 2 5 2. + <_> + + <_> + 0 0 4 5 -1. + <_> + 2 0 2 5 2. + <_> + + <_> + 14 12 3 6 -1. + <_> + 14 14 3 2 3. + <_> + + <_> + 3 12 3 6 -1. + <_> + 3 14 3 2 3. + <_> + + <_> + 16 1 4 3 -1. + <_> + 16 2 4 1 3. + <_> + + <_> + 8 7 2 10 -1. + <_> + 8 7 1 5 2. + <_> + 9 12 1 5 2. + <_> + + <_> + 11 11 4 4 -1. + <_> + 11 13 4 2 2. + <_> + + <_> + 0 1 4 3 -1. + <_> + 0 2 4 1 3. + <_> + + <_> + 13 4 1 3 -1. + <_> + 13 5 1 1 3. + <_> + + <_> + 7 15 3 5 -1. + <_> + 8 15 1 5 3. + <_> + + <_> + 9 7 3 5 -1. + <_> + 10 7 1 5 3. + <_> + + <_> + 8 7 3 5 -1. + <_> + 9 7 1 5 3. + <_> + + <_> + 10 6 4 14 -1. + <_> + 10 6 2 14 2. + <_> + + <_> + 0 5 5 6 -1. + <_> + 0 7 5 2 3. + <_> + + <_> + 9 5 6 4 -1. + <_> + 9 5 3 4 2. + <_> + + <_> + 0 0 18 10 -1. + <_> + 6 0 6 10 3. + <_> + + <_> + 10 6 4 14 -1. + <_> + 10 6 2 14 2. + <_> + + <_> + 6 6 4 14 -1. + <_> + 8 6 2 14 2. + <_> + + <_> + 13 4 1 3 -1. + <_> + 13 5 1 1 3. + <_> + + <_> + 5 1 2 3 -1. + <_> + 6 1 1 3 2. + <_> + + <_> + 18 1 2 18 -1. + <_> + 19 1 1 9 2. + <_> + 18 10 1 9 2. + <_> + + <_> + 2 1 4 3 -1. + <_> + 2 2 4 1 3. + <_> + + <_> + 18 1 2 18 -1. + <_> + 19 1 1 9 2. + <_> + 18 10 1 9 2. + <_> + + <_> + 1 14 4 6 -1. + <_> + 1 14 2 3 2. + <_> + 3 17 2 3 2. + <_> + + <_> + 10 11 7 6 -1. + <_> + 10 13 7 2 3. + <_> + + <_> + 0 10 6 10 -1. + <_> + 0 10 3 5 2. + <_> + 3 15 3 5 2. + <_> + + <_> + 11 0 3 4 -1. + <_> + 12 0 1 4 3. + <_> + + <_> + 5 10 5 6 -1. + <_> + 5 13 5 3 2. + <_> + + <_> + 14 6 1 8 -1. + <_> + 14 10 1 4 2. + <_> + + <_> + 1 7 18 6 -1. + <_> + 1 7 9 3 2. + <_> + 10 10 9 3 2. + <_> + + <_> + 9 7 2 2 -1. + <_> + 9 7 1 2 2. + <_> + + <_> + 5 9 4 5 -1. + <_> + 7 9 2 5 2. + <_> + + <_> + 7 6 6 3 -1. + <_> + 9 6 2 3 3. + <_> + + <_> + 1 0 18 4 -1. + <_> + 7 0 6 4 3. + <_> + + <_> + 7 15 2 4 -1. + <_> + 7 17 2 2 2. + <_> + + <_> + 1 0 19 9 -1. + <_> + 1 3 19 3 3. + <_> + + <_> + 3 7 3 6 -1. + <_> + 3 9 3 2 3. + <_> + + <_> + 13 7 4 4 -1. + <_> + 15 7 2 2 2. + <_> + 13 9 2 2 2. + <_> + + <_> + 3 7 4 4 -1. + <_> + 3 7 2 2 2. + <_> + 5 9 2 2 2. + <_> + + <_> + 9 6 10 8 -1. + <_> + 9 10 10 4 2. + <_> + + <_> + 3 8 14 12 -1. + <_> + 3 14 14 6 2. + <_> + + <_> + 6 5 10 12 -1. + <_> + 11 5 5 6 2. + <_> + 6 11 5 6 2. + <_> + + <_> + 9 11 2 3 -1. + <_> + 9 12 2 1 3. + <_> + + <_> + 9 5 6 5 -1. + <_> + 9 5 3 5 2. + <_> + + <_> + 9 4 2 4 -1. + <_> + 9 6 2 2 2. + <_> + + <_> + 9 5 6 5 -1. + <_> + 9 5 3 5 2. + <_> + + <_> + 5 5 6 5 -1. + <_> + 8 5 3 5 2. + <_> + + <_> + 11 2 6 1 -1. + <_> + 13 2 2 1 3. + <_> + + <_> + 3 2 6 1 -1. + <_> + 5 2 2 1 3. + <_> + + <_> + 13 5 2 3 -1. + <_> + 13 6 2 1 3. + <_> + + <_> + 0 10 1 4 -1. + <_> + 0 12 1 2 2. + <_> + + <_> + 13 5 2 3 -1. + <_> + 13 6 2 1 3. + <_> + + <_> + 8 18 3 2 -1. + <_> + 9 18 1 2 3. + <_> + + <_> + 6 15 9 2 -1. + <_> + 6 16 9 1 2. + <_> + + <_> + 8 14 4 3 -1. + <_> + 8 15 4 1 3. + <_> + + <_> + 18 4 2 4 -1. + <_> + 18 6 2 2 2. + <_> + + <_> + 5 5 2 3 -1. + <_> + 5 6 2 1 3. + <_> + + <_> + 15 16 3 2 -1. + <_> + 15 17 3 1 2. + <_> + + <_> + 0 0 3 9 -1. + <_> + 0 3 3 3 3. + <_> + + <_> + 9 7 3 3 -1. + <_> + 9 8 3 1 3. + <_> + + <_> + 8 7 3 3 -1. + <_> + 8 8 3 1 3. + <_> + + <_> + 9 5 2 6 -1. + <_> + 9 5 1 6 2. + <_> + + <_> + 8 6 3 4 -1. + <_> + 9 6 1 4 3. + <_> + + <_> + 7 6 8 12 -1. + <_> + 11 6 4 6 2. + <_> + 7 12 4 6 2. + <_> + + <_> + 5 6 8 12 -1. + <_> + 5 6 4 6 2. + <_> + 9 12 4 6 2. + <_> + + <_> + 12 4 3 3 -1. + <_> + 12 5 3 1 3. + <_> + + <_> + 2 16 3 2 -1. + <_> + 2 17 3 1 2. + <_> + + <_> + 12 4 3 3 -1. + <_> + 12 5 3 1 3. + <_> + + <_> + 2 12 6 6 -1. + <_> + 2 14 6 2 3. + <_> + + <_> + 7 13 6 3 -1. + <_> + 7 14 6 1 3. + <_> + + <_> + 6 14 6 3 -1. + <_> + 6 15 6 1 3. + <_> + + <_> + 14 15 5 3 -1. + <_> + 14 16 5 1 3. + <_> + + <_> + 5 4 3 3 -1. + <_> + 5 5 3 1 3. + <_> + + <_> + 14 15 5 3 -1. + <_> + 14 16 5 1 3. + <_> + + <_> + 5 3 6 2 -1. + <_> + 7 3 2 2 3. + <_> + + <_> + 8 15 4 3 -1. + <_> + 8 16 4 1 3. + <_> + + <_> + 1 15 5 3 -1. + <_> + 1 16 5 1 3. + <_> + + <_> + 8 13 4 6 -1. + <_> + 10 13 2 3 2. + <_> + 8 16 2 3 2. + <_> + + <_> + 7 8 3 3 -1. + <_> + 8 8 1 3 3. + <_> + + <_> + 12 0 5 4 -1. + <_> + 12 2 5 2 2. + <_> + + <_> + 0 2 20 2 -1. + <_> + 0 2 10 1 2. + <_> + 10 3 10 1 2. + <_> + + <_> + 1 0 18 4 -1. + <_> + 7 0 6 4 3. + <_> + + <_> + 4 3 6 1 -1. + <_> + 6 3 2 1 3. + <_> + + <_> + 4 18 13 2 -1. + <_> + 4 19 13 1 2. + <_> + + <_> + 2 10 3 6 -1. + <_> + 2 12 3 2 3. + <_> + + <_> + 14 12 6 8 -1. + <_> + 17 12 3 4 2. + <_> + 14 16 3 4 2. + <_> + + <_> + 4 13 10 6 -1. + <_> + 4 13 5 3 2. + <_> + 9 16 5 3 2. + <_> + + <_> + 14 12 1 2 -1. + <_> + 14 13 1 1 2. + <_> + + <_> + 8 13 4 3 -1. + <_> + 8 14 4 1 3. + <_> + + <_> + 14 12 2 2 -1. + <_> + 14 13 2 1 2. + <_> + + <_> + 4 12 2 2 -1. + <_> + 4 13 2 1 2. + <_> + + <_> + 8 12 9 2 -1. + <_> + 8 13 9 1 2. + <_> + + <_> + 9 14 2 3 -1. + <_> + 9 15 2 1 3. + <_> + + <_> + 11 10 3 6 -1. + <_> + 11 13 3 3 2. + <_> + + <_> + 5 6 9 12 -1. + <_> + 5 12 9 6 2. + <_> + + <_> + 11 10 3 6 -1. + <_> + 11 13 3 3 2. + <_> + + <_> + 6 10 3 6 -1. + <_> + 6 13 3 3 2. + <_> + + <_> + 5 4 11 3 -1. + <_> + 5 5 11 1 3. + <_> + + <_> + 7 1 5 10 -1. + <_> + 7 6 5 5 2. + <_> + + <_> + 2 8 18 2 -1. + <_> + 2 9 18 1 2. + <_> + + <_> + 7 17 5 3 -1. + <_> + 7 18 5 1 3. + <_> + + <_> + 5 9 12 1 -1. + <_> + 9 9 4 1 3. + <_> + + <_> + 0 14 6 6 -1. + <_> + 0 14 3 3 2. + <_> + 3 17 3 3 2. + <_> + + <_> + 5 9 12 1 -1. + <_> + 9 9 4 1 3. + <_> + + <_> + 3 9 12 1 -1. + <_> + 7 9 4 1 3. + <_> + + <_> + 14 10 6 7 -1. + <_> + 14 10 3 7 2. + <_> + + <_> + 1 0 16 2 -1. + <_> + 1 1 16 1 2. + <_> + + <_> + 10 9 10 9 -1. + <_> + 10 12 10 3 3. + <_> + + <_> + 0 1 10 2 -1. + <_> + 5 1 5 2 2. + <_> + + <_> + 17 3 2 3 -1. + <_> + 17 4 2 1 3. + <_> + + <_> + 1 3 2 3 -1. + <_> + 1 4 2 1 3. + <_> + + <_> + 9 7 3 6 -1. + <_> + 10 7 1 6 3. + <_> + + <_> + 6 5 4 3 -1. + <_> + 8 5 2 3 2. + <_> + + <_> + 7 5 6 6 -1. + <_> + 9 5 2 6 3. + <_> + + <_> + 3 4 12 12 -1. + <_> + 3 4 6 6 2. + <_> + 9 10 6 6 2. + <_> + + <_> + 9 2 6 15 -1. + <_> + 11 2 2 15 3. + <_> + + <_> + 2 2 6 17 -1. + <_> + 4 2 2 17 3. + <_> + + <_> + 14 10 6 7 -1. + <_> + 14 10 3 7 2. + <_> + + <_> + 0 10 6 7 -1. + <_> + 3 10 3 7 2. + <_> + + <_> + 9 2 6 15 -1. + <_> + 11 2 2 15 3. + <_> + + <_> + 5 2 6 15 -1. + <_> + 7 2 2 15 3. + <_> + + <_> + 17 9 3 6 -1. + <_> + 17 11 3 2 3. + <_> + + <_> + 6 7 6 6 -1. + <_> + 8 7 2 6 3. + <_> + + <_> + 1 10 18 6 -1. + <_> + 10 10 9 3 2. + <_> + 1 13 9 3 2. + <_> + + <_> + 0 9 10 9 -1. + <_> + 0 12 10 3 3. + <_> + + <_> + 8 15 4 3 -1. + <_> + 8 16 4 1 3. + <_> + + <_> + 5 12 3 4 -1. + <_> + 5 14 3 2 2. + <_> + + <_> + 3 3 16 12 -1. + <_> + 3 9 16 6 2. + <_> + + <_> + 1 1 12 12 -1. + <_> + 1 1 6 6 2. + <_> + 7 7 6 6 2. + <_> + + <_> + 10 4 2 4 -1. + <_> + 11 4 1 2 2. + <_> + 10 6 1 2 2. + <_> + + <_> + 0 9 10 2 -1. + <_> + 0 9 5 1 2. + <_> + 5 10 5 1 2. + <_> + + <_> + 9 11 3 3 -1. + <_> + 9 12 3 1 3. + <_> + + <_> + 3 12 9 2 -1. + <_> + 3 13 9 1 2. + <_> + + <_> + 9 9 2 2 -1. + <_> + 9 10 2 1 2. + <_> + + <_> + 3 4 13 6 -1. + <_> + 3 6 13 2 3. + <_> + + <_> + 9 7 6 4 -1. + <_> + 12 7 3 2 2. + <_> + 9 9 3 2 2. + <_> + + <_> + 1 0 6 8 -1. + <_> + 4 0 3 8 2. + <_> + + <_> + 9 5 2 12 -1. + <_> + 9 11 2 6 2. + <_> + + <_> + 4 4 3 10 -1. + <_> + 4 9 3 5 2. + <_> + + <_> + 6 17 8 3 -1. + <_> + 6 18 8 1 3. + <_> + + <_> + 0 5 10 6 -1. + <_> + 0 7 10 2 3. + <_> + + <_> + 13 2 3 2 -1. + <_> + 13 3 3 1 2. + <_> + + <_> + 7 5 4 5 -1. + <_> + 9 5 2 5 2. + <_> + + <_> + 12 14 3 6 -1. + <_> + 12 16 3 2 3. + <_> + + <_> + 1 11 8 2 -1. + <_> + 1 12 8 1 2. + <_> + + <_> + 7 13 6 3 -1. + <_> + 7 14 6 1 3. + <_> + + <_> + 0 5 3 6 -1. + <_> + 0 7 3 2 3. + <_> + + <_> + 13 2 3 2 -1. + <_> + 13 3 3 1 2. + <_> + + <_> + 4 14 4 6 -1. + <_> + 4 14 2 3 2. + <_> + 6 17 2 3 2. + <_> + + <_> + 13 2 3 2 -1. + <_> + 13 3 3 1 2. + <_> + + <_> + 8 2 4 12 -1. + <_> + 8 6 4 4 3. + <_> + + <_> + 14 0 6 8 -1. + <_> + 17 0 3 4 2. + <_> + 14 4 3 4 2. + <_> + + <_> + 7 17 3 2 -1. + <_> + 8 17 1 2 3. + <_> + + <_> + 8 12 4 2 -1. + <_> + 8 13 4 1 2. + <_> + + <_> + 6 0 8 12 -1. + <_> + 6 0 4 6 2. + <_> + 10 6 4 6 2. + <_> + + <_> + 14 0 2 10 -1. + <_> + 15 0 1 5 2. + <_> + 14 5 1 5 2. + <_> + + <_> + 5 3 8 6 -1. + <_> + 5 3 4 3 2. + <_> + 9 6 4 3 2. + <_> + + <_> + 14 0 6 10 -1. + <_> + 17 0 3 5 2. + <_> + 14 5 3 5 2. + <_> + + <_> + 9 14 1 2 -1. + <_> + 9 15 1 1 2. + <_> + + <_> + 15 10 4 3 -1. + <_> + 15 11 4 1 3. + <_> + + <_> + 8 14 2 3 -1. + <_> + 8 15 2 1 3. + <_> + + <_> + 3 13 14 4 -1. + <_> + 10 13 7 2 2. + <_> + 3 15 7 2 2. + <_> + + <_> + 1 10 4 3 -1. + <_> + 1 11 4 1 3. + <_> + + <_> + 9 11 6 1 -1. + <_> + 11 11 2 1 3. + <_> + + <_> + 5 11 6 1 -1. + <_> + 7 11 2 1 3. + <_> + + <_> + 3 5 16 15 -1. + <_> + 3 10 16 5 3. + <_> + + <_> + 6 12 4 2 -1. + <_> + 8 12 2 2 2. + <_> + + <_> + 4 4 12 10 -1. + <_> + 10 4 6 5 2. + <_> + 4 9 6 5 2. + <_> + + <_> + 8 6 3 4 -1. + <_> + 9 6 1 4 3. + <_> + + <_> + 8 12 4 8 -1. + <_> + 10 12 2 4 2. + <_> + 8 16 2 4 2. + <_> + + <_> + 8 14 4 3 -1. + <_> + 8 15 4 1 3. + <_> + + <_> + 12 2 3 2 -1. + <_> + 13 2 1 2 3. + <_> + + <_> + 8 15 3 2 -1. + <_> + 8 16 3 1 2. + <_> + + <_> + 6 0 9 14 -1. + <_> + 9 0 3 14 3. + <_> + + <_> + 9 6 2 3 -1. + <_> + 10 6 1 3 2. + <_> + + <_> + 10 8 2 3 -1. + <_> + 10 9 2 1 3. + <_> + + <_> + 0 9 4 6 -1. + <_> + 0 11 4 2 3. + <_> + + <_> + 6 0 8 2 -1. + <_> + 6 1 8 1 2. + <_> + + <_> + 6 14 7 3 -1. + <_> + 6 15 7 1 3. + <_> + + <_> + 8 10 8 9 -1. + <_> + 8 13 8 3 3. + <_> + + <_> + 5 2 3 2 -1. + <_> + 6 2 1 2 3. + <_> + + <_> + 14 1 6 8 -1. + <_> + 17 1 3 4 2. + <_> + 14 5 3 4 2. + <_> + + <_> + 0 1 6 8 -1. + <_> + 0 1 3 4 2. + <_> + 3 5 3 4 2. + <_> + + <_> + 1 2 18 6 -1. + <_> + 10 2 9 3 2. + <_> + 1 5 9 3 2. + <_> + + <_> + 9 3 2 1 -1. + <_> + 10 3 1 1 2. + <_> + + <_> + 13 2 4 6 -1. + <_> + 15 2 2 3 2. + <_> + 13 5 2 3 2. + <_> + + <_> + 5 4 3 3 -1. + <_> + 5 5 3 1 3. + <_> + + <_> + 13 5 1 3 -1. + <_> + 13 6 1 1 3. + <_> + + <_> + 2 16 5 3 -1. + <_> + 2 17 5 1 3. + <_> + + <_> + 13 2 4 6 -1. + <_> + 15 2 2 3 2. + <_> + 13 5 2 3 2. + <_> + + <_> + 3 2 4 6 -1. + <_> + 3 2 2 3 2. + <_> + 5 5 2 3 2. + <_> + + <_> + 13 5 1 2 -1. + <_> + 13 6 1 1 2. + <_> + + <_> + 5 5 2 2 -1. + <_> + 5 6 2 1 2. + <_> + + <_> + 13 9 2 2 -1. + <_> + 13 9 1 2 2. + <_> + + <_> + 5 9 2 2 -1. + <_> + 6 9 1 2 2. + <_> + + <_> + 13 17 3 2 -1. + <_> + 13 18 3 1 2. + <_> + + <_> + 6 16 4 4 -1. + <_> + 6 16 2 2 2. + <_> + 8 18 2 2 2. + <_> + + <_> + 9 16 2 3 -1. + <_> + 9 17 2 1 3. + <_> + + <_> + 0 13 9 6 -1. + <_> + 0 15 9 2 3. + <_> + + <_> + 9 14 2 6 -1. + <_> + 9 17 2 3 2. + <_> + + <_> + 9 15 2 3 -1. + <_> + 9 16 2 1 3. + <_> + + <_> + 1 10 18 6 -1. + <_> + 1 12 18 2 3. + <_> + + <_> + 8 11 4 2 -1. + <_> + 8 12 4 1 2. + <_> + + <_> + 7 9 6 2 -1. + <_> + 7 10 6 1 2. + <_> + + <_> + 8 8 2 3 -1. + <_> + 8 9 2 1 3. + <_> + + <_> + 17 5 3 4 -1. + <_> + 18 5 1 4 3. + <_> + + <_> + 1 19 18 1 -1. + <_> + 7 19 6 1 3. + <_> + + <_> + 9 0 3 2 -1. + <_> + 10 0 1 2 3. + <_> + + <_> + 1 8 1 6 -1. + <_> + 1 10 1 2 3. + <_> + + <_> + 12 17 8 3 -1. + <_> + 12 17 4 3 2. + <_> + + <_> + 0 5 3 4 -1. + <_> + 1 5 1 4 3. + <_> + + <_> + 9 7 2 3 -1. + <_> + 9 8 2 1 3. + <_> + + <_> + 7 11 2 2 -1. + <_> + 7 11 1 1 2. + <_> + 8 12 1 1 2. + <_> + + <_> + 11 3 2 5 -1. + <_> + 11 3 1 5 2. + <_> + + <_> + 7 3 2 5 -1. + <_> + 8 3 1 5 2. + <_> + + <_> + 15 13 2 3 -1. + <_> + 15 14 2 1 3. + <_> + + <_> + 5 6 2 3 -1. + <_> + 5 7 2 1 3. + <_> + + <_> + 4 19 15 1 -1. + <_> + 9 19 5 1 3. + <_> + + <_> + 1 19 15 1 -1. + <_> + 6 19 5 1 3. + <_> + + <_> + 15 13 2 3 -1. + <_> + 15 14 2 1 3. + <_> + + <_> + 5 0 4 15 -1. + <_> + 7 0 2 15 2. + <_> + + <_> + 9 6 2 5 -1. + <_> + 9 6 1 5 2. + <_> + + <_> + 9 5 2 7 -1. + <_> + 10 5 1 7 2. + <_> + + <_> + 16 11 3 3 -1. + <_> + 16 12 3 1 3. + <_> + + <_> + 1 11 3 3 -1. + <_> + 1 12 3 1 3. + <_> + + <_> + 6 6 8 3 -1. + <_> + 6 7 8 1 3. + <_> + + <_> + 0 15 6 2 -1. + <_> + 0 16 6 1 2. + <_> + + <_> + 1 0 18 6 -1. + <_> + 7 0 6 6 3. + <_> + + <_> + 6 0 3 4 -1. + <_> + 7 0 1 4 3. + <_> + + <_> + 14 10 4 10 -1. + <_> + 16 10 2 5 2. + <_> + 14 15 2 5 2. + <_> + + <_> + 3 2 3 2 -1. + <_> + 4 2 1 2 3. + <_> + + <_> + 11 2 2 2 -1. + <_> + 11 3 2 1 2. + <_> + + <_> + 2 10 4 10 -1. + <_> + 2 10 2 5 2. + <_> + 4 15 2 5 2. + <_> + + <_> + 0 13 20 6 -1. + <_> + 10 13 10 3 2. + <_> + 0 16 10 3 2. + <_> + + <_> + 0 5 2 15 -1. + <_> + 1 5 1 15 2. + <_> + + <_> + 1 7 18 4 -1. + <_> + 10 7 9 2 2. + <_> + 1 9 9 2 2. + <_> + + <_> + 0 0 2 17 -1. + <_> + 1 0 1 17 2. + <_> + + <_> + 2 6 16 6 -1. + <_> + 10 6 8 3 2. + <_> + 2 9 8 3 2. + <_> + + <_> + 8 14 1 3 -1. + <_> + 8 15 1 1 3. + <_> + + <_> + 8 15 4 2 -1. + <_> + 8 16 4 1 2. + <_> + + <_> + 5 2 8 2 -1. + <_> + 5 2 4 1 2. + <_> + 9 3 4 1 2. + <_> + + <_> + 6 11 8 6 -1. + <_> + 6 14 8 3 2. + <_> + + <_> + 9 13 2 2 -1. + <_> + 9 14 2 1 2. + <_> + + <_> + 18 4 2 6 -1. + <_> + 18 6 2 2 3. + <_> + + <_> + 9 12 2 2 -1. + <_> + 9 13 2 1 2. + <_> + + <_> + 18 4 2 6 -1. + <_> + 18 6 2 2 3. + <_> + + <_> + 9 13 1 3 -1. + <_> + 9 14 1 1 3. + <_> + + <_> + 18 4 2 6 -1. + <_> + 18 6 2 2 3. + <_> + + <_> + 0 4 2 6 -1. + <_> + 0 6 2 2 3. + <_> + + <_> + 9 12 3 3 -1. + <_> + 9 13 3 1 3. + <_> + + <_> + 3 13 2 3 -1. + <_> + 3 14 2 1 3. + <_> + + <_> + 13 13 4 3 -1. + <_> + 13 14 4 1 3. + <_> + + <_> + 5 4 3 3 -1. + <_> + 5 5 3 1 3. + <_> + + <_> + 5 2 10 6 -1. + <_> + 5 4 10 2 3. + <_> + + <_> + 3 13 4 3 -1. + <_> + 3 14 4 1 3. + <_> + + <_> + 3 7 15 5 -1. + <_> + 8 7 5 5 3. + <_> + + <_> + 3 7 12 2 -1. + <_> + 7 7 4 2 3. + <_> + + <_> + 10 3 3 9 -1. + <_> + 11 3 1 9 3. + <_> + + <_> + 8 6 4 6 -1. + <_> + 10 6 2 6 2. + <_> + + <_> + 9 7 4 3 -1. + <_> + 9 8 4 1 3. + <_> + + <_> + 0 9 4 9 -1. + <_> + 2 9 2 9 2. + <_> + + <_> + 9 13 3 5 -1. + <_> + 10 13 1 5 3. + <_> + + <_> + 7 7 6 3 -1. + <_> + 9 7 2 3 3. + <_> + + <_> + 9 7 3 5 -1. + <_> + 10 7 1 5 3. + <_> + + <_> + 5 7 8 2 -1. + <_> + 9 7 4 2 2. + <_> + + <_> + 5 9 12 2 -1. + <_> + 9 9 4 2 3. + <_> + + <_> + 5 6 10 3 -1. + <_> + 10 6 5 3 2. + <_> + + <_> + 10 12 3 1 -1. + <_> + 11 12 1 1 3. + <_> + + <_> + 0 1 11 15 -1. + <_> + 0 6 11 5 3. + <_> + + <_> + 1 0 18 6 -1. + <_> + 7 0 6 6 3. + <_> + + <_> + 7 7 6 1 -1. + <_> + 9 7 2 1 3. + <_> + + <_> + 5 16 6 4 -1. + <_> + 5 16 3 2 2. + <_> + 8 18 3 2 2. + <_> + + <_> + 6 5 9 8 -1. + <_> + 6 9 9 4 2. + <_> + + <_> + 5 10 2 6 -1. + <_> + 5 13 2 3 2. + <_> + + <_> + 7 6 8 10 -1. + <_> + 11 6 4 5 2. + <_> + 7 11 4 5 2. + <_> + + <_> + 5 6 8 10 -1. + <_> + 5 6 4 5 2. + <_> + 9 11 4 5 2. + <_> + + <_> + 9 5 2 2 -1. + <_> + 9 6 2 1 2. + <_> + + <_> + 5 12 8 2 -1. + <_> + 5 13 8 1 2. + <_> + + <_> + 10 2 8 2 -1. + <_> + 10 3 8 1 2. + <_> + + <_> + 4 0 2 10 -1. + <_> + 4 0 1 5 2. + <_> + 5 5 1 5 2. + <_> + + <_> + 9 10 2 2 -1. + <_> + 9 11 2 1 2. + <_> + + <_> + 2 8 15 3 -1. + <_> + 2 9 15 1 3. + <_> + + <_> + 8 13 4 3 -1. + <_> + 8 14 4 1 3. + <_> + + <_> + 7 2 3 2 -1. + <_> + 8 2 1 2 3. + <_> + + <_> + 7 13 6 3 -1. + <_> + 7 14 6 1 3. + <_> + + <_> + 9 9 2 2 -1. + <_> + 9 10 2 1 2. + <_> + + <_> + 17 2 3 6 -1. + <_> + 17 4 3 2 3. + <_> + + <_> + 1 5 3 4 -1. + <_> + 2 5 1 4 3. + <_> + + <_> + 14 8 4 6 -1. + <_> + 14 10 4 2 3. + <_> + + <_> + 1 4 3 8 -1. + <_> + 2 4 1 8 3. + <_> + + <_> + 8 13 4 6 -1. + <_> + 8 16 4 3 2. + <_> + + <_> + 3 14 2 2 -1. + <_> + 3 15 2 1 2. + <_> + + <_> + 14 8 4 6 -1. + <_> + 14 10 4 2 3. + <_> + + <_> + 2 8 4 6 -1. + <_> + 2 10 4 2 3. + <_> + + <_> + 10 14 1 6 -1. + <_> + 10 17 1 3 2. + <_> + + <_> + 7 5 3 6 -1. + <_> + 8 5 1 6 3. + <_> + + <_> + 11 2 2 6 -1. + <_> + 12 2 1 3 2. + <_> + 11 5 1 3 2. + <_> + + <_> + 6 6 6 5 -1. + <_> + 8 6 2 5 3. + <_> + + <_> + 17 1 3 6 -1. + <_> + 17 3 3 2 3. + <_> + + <_> + 8 7 3 5 -1. + <_> + 9 7 1 5 3. + <_> + + <_> + 9 18 3 2 -1. + <_> + 10 18 1 2 3. + <_> + + <_> + 8 18 3 2 -1. + <_> + 9 18 1 2 3. + <_> + + <_> + 12 3 5 2 -1. + <_> + 12 4 5 1 2. + <_> + + <_> + 7 1 5 12 -1. + <_> + 7 7 5 6 2. + <_> + + <_> + 1 0 18 4 -1. + <_> + 7 0 6 4 3. + <_> + + <_> + 4 2 2 2 -1. + <_> + 4 3 2 1 2. + <_> + + <_> + 11 14 4 2 -1. + <_> + 13 14 2 1 2. + <_> + 11 15 2 1 2. + <_> + + <_> + 0 2 3 6 -1. + <_> + 0 4 3 2 3. + <_> + + <_> + 9 7 2 3 -1. + <_> + 9 8 2 1 3. + <_> + + <_> + 5 5 1 3 -1. + <_> + 5 6 1 1 3. + <_> + + <_> + 10 10 6 1 -1. + <_> + 10 10 3 1 2. + <_> + + <_> + 4 10 6 1 -1. + <_> + 7 10 3 1 2. + <_> + + <_> + 9 17 3 3 -1. + <_> + 9 18 3 1 3. + <_> + + <_> + 4 14 1 3 -1. + <_> + 4 15 1 1 3. + <_> + + <_> + 12 5 3 3 -1. + <_> + 12 6 3 1 3. + <_> + + <_> + 4 5 12 3 -1. + <_> + 4 6 12 1 3. + <_> + + <_> + 9 8 2 3 -1. + <_> + 9 9 2 1 3. + <_> + + <_> + 4 9 3 3 -1. + <_> + 5 9 1 3 3. + <_> + + <_> + 6 0 9 17 -1. + <_> + 9 0 3 17 3. + <_> + + <_> + 9 12 1 3 -1. + <_> + 9 13 1 1 3. + <_> + + <_> + 9 5 2 15 -1. + <_> + 9 10 2 5 3. + <_> + + <_> + 8 14 2 3 -1. + <_> + 8 15 2 1 3. + <_> + + <_> + 10 14 1 3 -1. + <_> + 10 15 1 1 3. + <_> + + <_> + 7 1 6 5 -1. + <_> + 9 1 2 5 3. + <_> + + <_> + 0 0 20 2 -1. + <_> + 0 0 10 2 2. + <_> + + <_> + 2 13 5 3 -1. + <_> + 2 14 5 1 3. + <_> + + <_> + 9 11 2 3 -1. + <_> + 9 12 2 1 3. + <_> + + <_> + 2 5 9 15 -1. + <_> + 2 10 9 5 3. + <_> + + <_> + 5 0 12 10 -1. + <_> + 11 0 6 5 2. + <_> + 5 5 6 5 2. + <_> + + <_> + 5 1 2 3 -1. + <_> + 6 1 1 3 2. + <_> + + <_> + 10 7 6 1 -1. + <_> + 12 7 2 1 3. + <_> + + <_> + 3 1 2 10 -1. + <_> + 3 1 1 5 2. + <_> + 4 6 1 5 2. + <_> + + <_> + 13 7 2 1 -1. + <_> + 13 7 1 1 2. + <_> + + <_> + 4 13 4 6 -1. + <_> + 4 15 4 2 3. + <_> + + <_> + 13 7 2 1 -1. + <_> + 13 7 1 1 2. + <_> + + <_> + 5 7 2 1 -1. + <_> + 6 7 1 1 2. + <_> + + <_> + 2 12 18 4 -1. + <_> + 11 12 9 2 2. + <_> + 2 14 9 2 2. + <_> + + <_> + 5 7 2 2 -1. + <_> + 5 7 1 1 2. + <_> + 6 8 1 1 2. + <_> + + <_> + 16 3 4 2 -1. + <_> + 16 4 4 1 2. + <_> + + <_> + 0 2 2 18 -1. + <_> + 0 2 1 9 2. + <_> + 1 11 1 9 2. + <_> + + <_> + 1 2 18 4 -1. + <_> + 10 2 9 2 2. + <_> + 1 4 9 2 2. + <_> + + <_> + 9 14 1 3 -1. + <_> + 9 15 1 1 3. + <_> + + <_> + 2 12 18 4 -1. + <_> + 11 12 9 2 2. + <_> + 2 14 9 2 2. + <_> + + <_> + 0 12 18 4 -1. + <_> + 0 12 9 2 2. + <_> + 9 14 9 2 2. + <_> + + <_> + 11 4 5 3 -1. + <_> + 11 5 5 1 3. + <_> + + <_> + 6 4 7 3 -1. + <_> + 6 5 7 1 3. + <_> + + <_> + 13 17 3 3 -1. + <_> + 13 18 3 1 3. + <_> + + <_> + 8 1 3 4 -1. + <_> + 9 1 1 4 3. + <_> + + <_> + 11 4 2 4 -1. + <_> + 11 4 1 4 2. + <_> + + <_> + 0 17 9 3 -1. + <_> + 3 17 3 3 3. + <_> + + <_> + 11 0 2 8 -1. + <_> + 12 0 1 4 2. + <_> + 11 4 1 4 2. + <_> + + <_> + 0 8 6 12 -1. + <_> + 0 8 3 6 2. + <_> + 3 14 3 6 2. + <_> + + <_> + 10 7 4 12 -1. + <_> + 10 13 4 6 2. + <_> + + <_> + 5 3 8 14 -1. + <_> + 5 10 8 7 2. + <_> + + <_> + 14 10 6 1 -1. + <_> + 14 10 3 1 2. + <_> + + <_> + 0 4 10 4 -1. + <_> + 0 6 10 2 2. + <_> + + <_> + 10 0 5 8 -1. + <_> + 10 4 5 4 2. + <_> + + <_> + 8 1 4 8 -1. + <_> + 8 1 2 4 2. + <_> + 10 5 2 4 2. + <_> + + <_> + 9 11 6 1 -1. + <_> + 11 11 2 1 3. + <_> + + <_> + 8 9 3 4 -1. + <_> + 9 9 1 4 3. + <_> + + <_> + 18 4 2 6 -1. + <_> + 18 6 2 2 3. + <_> + + <_> + 8 8 3 4 -1. + <_> + 9 8 1 4 3. + <_> + + <_> + 7 1 13 3 -1. + <_> + 7 2 13 1 3. + <_> + + <_> + 7 13 6 1 -1. + <_> + 9 13 2 1 3. + <_> + + <_> + 12 11 3 6 -1. + <_> + 12 13 3 2 3. + <_> + + <_> + 5 11 6 1 -1. + <_> + 7 11 2 1 3. + <_> + + <_> + 1 4 18 10 -1. + <_> + 10 4 9 5 2. + <_> + 1 9 9 5 2. + <_> + + <_> + 8 6 4 9 -1. + <_> + 8 9 4 3 3. + <_> + + <_> + 8 6 4 3 -1. + <_> + 8 7 4 1 3. + <_> + + <_> + 8 7 3 3 -1. + <_> + 9 7 1 3 3. + <_> + + <_> + 14 15 4 3 -1. + <_> + 14 16 4 1 3. + <_> + + <_> + 5 10 3 10 -1. + <_> + 6 10 1 10 3. + <_> + + <_> + 8 15 4 3 -1. + <_> + 8 16 4 1 3. + <_> + + <_> + 0 8 1 6 -1. + <_> + 0 10 1 2 3. + <_> + + <_> + 10 15 1 3 -1. + <_> + 10 16 1 1 3. + <_> + + <_> + 2 15 4 3 -1. + <_> + 2 16 4 1 3. + <_> + + <_> + 18 3 2 8 -1. + <_> + 19 3 1 4 2. + <_> + 18 7 1 4 2. + <_> + + <_> + 0 3 2 8 -1. + <_> + 0 3 1 4 2. + <_> + 1 7 1 4 2. + <_> + + <_> + 3 7 14 10 -1. + <_> + 10 7 7 5 2. + <_> + 3 12 7 5 2. + <_> + + <_> + 0 7 19 3 -1. + <_> + 0 8 19 1 3. + <_> + + <_> + 12 6 3 3 -1. + <_> + 12 7 3 1 3. + <_> + + <_> + 0 6 1 3 -1. + <_> + 0 7 1 1 3. + <_> + + <_> + 12 6 3 3 -1. + <_> + 12 7 3 1 3. + <_> + + <_> + 5 6 3 3 -1. + <_> + 5 7 3 1 3. + <_> + + <_> + 8 2 4 2 -1. + <_> + 8 3 4 1 2. + <_> + + <_> + 6 3 4 12 -1. + <_> + 8 3 2 12 2. + <_> + + <_> + 13 6 2 3 -1. + <_> + 13 7 2 1 3. + <_> + + <_> + 0 10 20 4 -1. + <_> + 0 12 20 2 2. + <_> + + <_> + 2 0 17 14 -1. + <_> + 2 7 17 7 2. + <_> + + <_> + 0 0 6 10 -1. + <_> + 0 0 3 5 2. + <_> + 3 5 3 5 2. + <_> + + <_> + 14 6 6 4 -1. + <_> + 14 6 3 4 2. + <_> + + <_> + 0 6 6 4 -1. + <_> + 3 6 3 4 2. + <_> + + <_> + 13 2 7 2 -1. + <_> + 13 3 7 1 2. + <_> + + <_> + 0 2 7 2 -1. + <_> + 0 3 7 1 2. + <_> + + <_> + 6 11 14 2 -1. + <_> + 13 11 7 1 2. + <_> + 6 12 7 1 2. + <_> + + <_> + 8 5 2 2 -1. + <_> + 8 5 1 1 2. + <_> + 9 6 1 1 2. + <_> + + <_> + 13 9 2 3 -1. + <_> + 13 9 1 3 2. + <_> + + <_> + 1 1 3 12 -1. + <_> + 2 1 1 12 3. + <_> + + <_> + 17 4 1 3 -1. + <_> + 17 5 1 1 3. + <_> + + <_> + 2 4 1 3 -1. + <_> + 2 5 1 1 3. + <_> + + <_> + 14 5 1 3 -1. + <_> + 14 6 1 1 3. + <_> + + <_> + 7 16 2 3 -1. + <_> + 7 17 2 1 3. + <_> + + <_> + 8 13 4 6 -1. + <_> + 10 13 2 3 2. + <_> + 8 16 2 3 2. + <_> + + <_> + 5 5 1 3 -1. + <_> + 5 6 1 1 3. + <_> + + <_> + 16 0 4 20 -1. + <_> + 16 0 2 20 2. + <_> + + <_> + 5 1 2 6 -1. + <_> + 5 1 1 3 2. + <_> + 6 4 1 3 2. + <_> + + <_> + 5 4 10 4 -1. + <_> + 5 6 10 2 2. + <_> + + <_> + 15 2 4 12 -1. + <_> + 15 2 2 12 2. + <_> + + <_> + 7 6 4 12 -1. + <_> + 7 12 4 6 2. + <_> + + <_> + 14 5 1 8 -1. + <_> + 14 9 1 4 2. + <_> + + <_> + 1 4 14 10 -1. + <_> + 1 4 7 5 2. + <_> + 8 9 7 5 2. + <_> + + <_> + 11 6 6 14 -1. + <_> + 14 6 3 7 2. + <_> + 11 13 3 7 2. + <_> + + <_> + 3 6 6 14 -1. + <_> + 3 6 3 7 2. + <_> + 6 13 3 7 2. + <_> + + <_> + 4 9 15 2 -1. + <_> + 9 9 5 2 3. + <_> + + <_> + 7 14 6 3 -1. + <_> + 7 15 6 1 3. + <_> + + <_> + 6 3 14 4 -1. + <_> + 13 3 7 2 2. + <_> + 6 5 7 2 2. + <_> + + <_> + 1 9 15 2 -1. + <_> + 6 9 5 2 3. + <_> + + <_> + 6 11 8 9 -1. + <_> + 6 14 8 3 3. + <_> + + <_> + 7 4 3 8 -1. + <_> + 8 4 1 8 3. + <_> + + <_> + 14 6 2 6 -1. + <_> + 14 9 2 3 2. + <_> + + <_> + 5 7 6 4 -1. + <_> + 5 7 3 2 2. + <_> + 8 9 3 2 2. + <_> + + <_> + 1 1 18 19 -1. + <_> + 7 1 6 19 3. + <_> + + <_> + 1 2 6 5 -1. + <_> + 4 2 3 5 2. + <_> + + <_> + 12 17 6 2 -1. + <_> + 12 18 6 1 2. + <_> + + <_> + 2 17 6 2 -1. + <_> + 2 18 6 1 2. + <_> + + <_> + 17 3 3 6 -1. + <_> + 17 5 3 2 3. + <_> + + <_> + 8 17 3 3 -1. + <_> + 8 18 3 1 3. + <_> + + <_> + 10 13 2 6 -1. + <_> + 10 16 2 3 2. + <_> + + <_> + 7 13 6 3 -1. + <_> + 7 14 6 1 3. + <_> + + <_> + 17 3 3 6 -1. + <_> + 17 5 3 2 3. + <_> + + <_> + 8 13 2 3 -1. + <_> + 8 14 2 1 3. + <_> + + <_> + 9 3 6 2 -1. + <_> + 11 3 2 2 3. + <_> + + <_> + 0 3 3 6 -1. + <_> + 0 5 3 2 3. + <_> + + <_> + 8 5 4 6 -1. + <_> + 8 7 4 2 3. + <_> + + <_> + 5 5 3 2 -1. + <_> + 5 6 3 1 2. + <_> + + <_> + 10 1 3 4 -1. + <_> + 11 1 1 4 3. + <_> + + <_> + 1 2 5 9 -1. + <_> + 1 5 5 3 3. + <_> + + <_> + 13 6 2 3 -1. + <_> + 13 7 2 1 3. + <_> + + <_> + 0 6 14 3 -1. + <_> + 7 6 7 3 2. + <_> + + <_> + 2 11 18 8 -1. + <_> + 2 15 18 4 2. + <_> + + <_> + 5 6 2 3 -1. + <_> + 5 7 2 1 3. + <_> + + <_> + 10 6 4 2 -1. + <_> + 12 6 2 1 2. + <_> + 10 7 2 1 2. + <_> + + <_> + 6 6 4 2 -1. + <_> + 6 6 2 1 2. + <_> + 8 7 2 1 2. + <_> + + <_> + 10 1 3 4 -1. + <_> + 11 1 1 4 3. + <_> + + <_> + 7 1 2 7 -1. + <_> + 8 1 1 7 2. + <_> + + <_> + 4 2 15 14 -1. + <_> + 4 9 15 7 2. + <_> + + <_> + 8 7 3 2 -1. + <_> + 9 7 1 2 3. + <_> + + <_> + 2 3 18 4 -1. + <_> + 11 3 9 2 2. + <_> + 2 5 9 2 2. + <_> + + <_> + 9 7 2 2 -1. + <_> + 10 7 1 2 2. + <_> + + <_> + 13 9 2 3 -1. + <_> + 13 9 1 3 2. + <_> + + <_> + 5 2 6 2 -1. + <_> + 7 2 2 2 3. + <_> + + <_> + 9 5 2 7 -1. + <_> + 9 5 1 7 2. + <_> + + <_> + 5 9 2 3 -1. + <_> + 6 9 1 3 2. + <_> + + <_> + 6 0 14 18 -1. + <_> + 6 9 14 9 2. + <_> + + <_> + 2 16 6 3 -1. + <_> + 2 17 6 1 3. + <_> + + <_> + 9 7 3 6 -1. + <_> + 10 7 1 6 3. + <_> + + <_> + 7 8 4 3 -1. + <_> + 7 9 4 1 3. + <_> + + <_> + 7 12 6 3 -1. + <_> + 7 13 6 1 3. + <_> + + <_> + 9 12 2 3 -1. + <_> + 9 13 2 1 3. + <_> + + <_> + 7 12 6 2 -1. + <_> + 9 12 2 2 3. + <_> + + <_> + 5 11 4 6 -1. + <_> + 5 14 4 3 2. + <_> + + <_> + 11 12 7 2 -1. + <_> + 11 13 7 1 2. + <_> + + <_> + 6 10 8 6 -1. + <_> + 6 10 4 3 2. + <_> + 10 13 4 3 2. + <_> + + <_> + 11 10 3 4 -1. + <_> + 11 12 3 2 2. + <_> + + <_> + 9 16 2 3 -1. + <_> + 9 17 2 1 3. + <_> + + <_> + 13 3 1 9 -1. + <_> + 13 6 1 3 3. + <_> + + <_> + 1 13 14 6 -1. + <_> + 1 15 14 2 3. + <_> + + <_> + 13 6 1 6 -1. + <_> + 13 9 1 3 2. + <_> + + <_> + 0 4 3 8 -1. + <_> + 1 4 1 8 3. + <_> + + <_> + 18 0 2 18 -1. + <_> + 18 0 1 18 2. + <_> + + <_> + 2 3 6 2 -1. + <_> + 2 4 6 1 2. + <_> + + <_> + 9 0 8 6 -1. + <_> + 9 2 8 2 3. + <_> + + <_> + 6 6 1 6 -1. + <_> + 6 9 1 3 2. + <_> + + <_> + 14 8 6 3 -1. + <_> + 14 9 6 1 3. + <_> + + <_> + 0 0 2 18 -1. + <_> + 1 0 1 18 2. + <_> + + <_> + 1 18 18 2 -1. + <_> + 10 18 9 1 2. + <_> + 1 19 9 1 2. + <_> + + <_> + 3 15 2 2 -1. + <_> + 3 16 2 1 2. + <_> + + <_> + 8 14 5 3 -1. + <_> + 8 15 5 1 3. + <_> + + <_> + 8 14 2 3 -1. + <_> + 8 15 2 1 3. + <_> + + <_> + 12 3 3 3 -1. + <_> + 13 3 1 3 3. + <_> + + <_> + 7 5 6 2 -1. + <_> + 9 5 2 2 3. + <_> + + <_> + 15 5 5 2 -1. + <_> + 15 6 5 1 2. + <_> + + <_> + 0 5 5 2 -1. + <_> + 0 6 5 1 2. + <_> + + <_> + 17 14 1 6 -1. + <_> + 17 17 1 3 2. + <_> + + <_> + 2 9 9 3 -1. + <_> + 5 9 3 3 3. + <_> + + <_> + 12 3 3 3 -1. + <_> + 13 3 1 3 3. + <_> + + <_> + 0 0 4 18 -1. + <_> + 2 0 2 18 2. + <_> + + <_> + 17 6 1 3 -1. + <_> + 17 7 1 1 3. + <_> + + <_> + 2 14 1 6 -1. + <_> + 2 17 1 3 2. + <_> + + <_> + 19 8 1 2 -1. + <_> + 19 9 1 1 2. + <_> + + <_> + 5 3 3 3 -1. + <_> + 6 3 1 3 3. + <_> + + <_> + 9 16 2 3 -1. + <_> + 9 17 2 1 3. + <_> + + <_> + 2 6 1 3 -1. + <_> + 2 7 1 1 3. + <_> + + <_> + 12 4 8 2 -1. + <_> + 16 4 4 1 2. + <_> + 12 5 4 1 2. + <_> + + <_> + 0 4 8 2 -1. + <_> + 0 4 4 1 2. + <_> + 4 5 4 1 2. + <_> + + <_> + 2 16 18 4 -1. + <_> + 2 18 18 2 2. + <_> + + <_> + 7 15 2 4 -1. + <_> + 7 17 2 2 2. + <_> + + <_> + 4 0 14 3 -1. + <_> + 4 1 14 1 3. + <_> + + <_> + 0 0 4 20 -1. + <_> + 2 0 2 20 2. + <_> + + <_> + 12 4 4 8 -1. + <_> + 14 4 2 4 2. + <_> + 12 8 2 4 2. + <_> + + <_> + 6 7 2 2 -1. + <_> + 6 7 1 1 2. + <_> + 7 8 1 1 2. + <_> + + <_> + 10 6 2 3 -1. + <_> + 10 7 2 1 3. + <_> + + <_> + 8 7 3 2 -1. + <_> + 8 8 3 1 2. + <_> + + <_> + 8 2 6 12 -1. + <_> + 8 8 6 6 2. + <_> + + <_> + 4 0 11 12 -1. + <_> + 4 4 11 4 3. + <_> + + <_> + 14 9 6 11 -1. + <_> + 16 9 2 11 3. + <_> + + <_> + 0 14 4 3 -1. + <_> + 0 15 4 1 3. + <_> + + <_> + 9 10 2 3 -1. + <_> + 9 11 2 1 3. + <_> + + <_> + 5 11 3 2 -1. + <_> + 5 12 3 1 2. + <_> + + <_> + 9 15 3 3 -1. + <_> + 10 15 1 3 3. + <_> + + <_> + 8 8 3 4 -1. + <_> + 9 8 1 4 3. + <_> + + <_> + 9 15 3 3 -1. + <_> + 10 15 1 3 3. + <_> + + <_> + 7 7 3 2 -1. + <_> + 8 7 1 2 3. + <_> + + <_> + 2 10 16 4 -1. + <_> + 10 10 8 2 2. + <_> + 2 12 8 2 2. + <_> + + <_> + 2 3 4 17 -1. + <_> + 4 3 2 17 2. + <_> + + <_> + 15 13 2 7 -1. + <_> + 15 13 1 7 2. + <_> + + <_> + 2 2 6 1 -1. + <_> + 5 2 3 1 2. + <_> + + <_> + 5 2 12 4 -1. + <_> + 9 2 4 4 3. + <_> + + <_> + 6 0 8 12 -1. + <_> + 6 0 4 6 2. + <_> + 10 6 4 6 2. + <_> + + <_> + 13 7 2 2 -1. + <_> + 14 7 1 1 2. + <_> + 13 8 1 1 2. + <_> + + <_> + 0 12 20 6 -1. + <_> + 0 14 20 2 3. + <_> + + <_> + 14 7 2 3 -1. + <_> + 14 7 1 3 2. + <_> + + <_> + 0 8 9 12 -1. + <_> + 3 8 3 12 3. + <_> + + <_> + 3 0 16 2 -1. + <_> + 3 0 8 2 2. + <_> + + <_> + 6 15 3 3 -1. + <_> + 6 16 3 1 3. + <_> + + <_> + 8 15 6 3 -1. + <_> + 8 16 6 1 3. + <_> + + <_> + 0 10 1 6 -1. + <_> + 0 12 1 2 3. + <_> + + <_> + 10 9 4 3 -1. + <_> + 10 10 4 1 3. + <_> + + <_> + 9 15 2 3 -1. + <_> + 9 16 2 1 3. + <_> + + <_> + 5 7 10 1 -1. + <_> + 5 7 5 1 2. + <_> + + <_> + 4 0 12 19 -1. + <_> + 10 0 6 19 2. + <_> + + <_> + 0 6 20 6 -1. + <_> + 10 6 10 3 2. + <_> + 0 9 10 3 2. + <_> + + <_> + 3 6 2 2 -1. + <_> + 3 6 1 1 2. + <_> + 4 7 1 1 2. + <_> + + <_> + 15 6 2 2 -1. + <_> + 16 6 1 1 2. + <_> + 15 7 1 1 2. + <_> + + <_> + 3 6 2 2 -1. + <_> + 3 6 1 1 2. + <_> + 4 7 1 1 2. + <_> + + <_> + 14 4 1 12 -1. + <_> + 14 10 1 6 2. + <_> + + <_> + 2 5 16 10 -1. + <_> + 2 5 8 5 2. + <_> + 10 10 8 5 2. + <_> + + <_> + 9 17 3 2 -1. + <_> + 10 17 1 2 3. + <_> + + <_> + 1 4 2 2 -1. + <_> + 1 5 2 1 2. + <_> + + <_> + 5 0 15 5 -1. + <_> + 10 0 5 5 3. + <_> + + <_> + 0 0 15 5 -1. + <_> + 5 0 5 5 3. + <_> + + <_> + 11 2 2 17 -1. + <_> + 11 2 1 17 2. + <_> + + <_> + 7 2 2 17 -1. + <_> + 8 2 1 17 2. + <_> + + <_> + 15 11 2 9 -1. + <_> + 15 11 1 9 2. + <_> + + <_> + 3 11 2 9 -1. + <_> + 4 11 1 9 2. + <_> + + <_> + 5 16 14 4 -1. + <_> + 5 16 7 4 2. + <_> + + <_> + 1 4 18 1 -1. + <_> + 7 4 6 1 3. + <_> + + <_> + 13 7 6 4 -1. + <_> + 16 7 3 2 2. + <_> + 13 9 3 2 2. + <_> + + <_> + 9 8 2 12 -1. + <_> + 9 12 2 4 3. + <_> + + <_> + 12 1 6 6 -1. + <_> + 12 3 6 2 3. + <_> + + <_> + 5 2 6 6 -1. + <_> + 5 2 3 3 2. + <_> + 8 5 3 3 2. + <_> + + <_> + 9 16 6 4 -1. + <_> + 12 16 3 2 2. + <_> + 9 18 3 2 2. + <_> + + <_> + 1 2 18 3 -1. + <_> + 7 2 6 3 3. + <_> + + <_> + 7 4 9 10 -1. + <_> + 7 9 9 5 2. + <_> + + <_> + 5 9 4 4 -1. + <_> + 7 9 2 4 2. + <_> + + <_> + 11 10 3 6 -1. + <_> + 11 13 3 3 2. + <_> + + <_> + 7 11 5 3 -1. + <_> + 7 12 5 1 3. + <_> + + <_> + 7 11 6 6 -1. + <_> + 10 11 3 3 2. + <_> + 7 14 3 3 2. + <_> + + <_> + 0 0 10 9 -1. + <_> + 0 3 10 3 3. + <_> + + <_> + 13 14 1 6 -1. + <_> + 13 16 1 2 3. + <_> + + <_> + 0 2 3 6 -1. + <_> + 0 4 3 2 3. + <_> + + <_> + 8 14 4 3 -1. + <_> + 8 15 4 1 3. + <_> + + <_> + 6 14 1 6 -1. + <_> + 6 16 1 2 3. + <_> + + <_> + 9 15 2 3 -1. + <_> + 9 16 2 1 3. + <_> + + <_> + 6 4 3 3 -1. + <_> + 7 4 1 3 3. + <_> + + <_> + 9 0 11 3 -1. + <_> + 9 1 11 1 3. + <_> + + <_> + 0 6 20 3 -1. + <_> + 0 7 20 1 3. + <_> + + <_> + 10 1 1 2 -1. + <_> + 10 2 1 1 2. + <_> + + <_> + 9 6 2 6 -1. + <_> + 10 6 1 6 2. + <_> + + <_> + 5 8 12 1 -1. + <_> + 9 8 4 1 3. + <_> + + <_> + 3 8 12 1 -1. + <_> + 7 8 4 1 3. + <_> + + <_> + 9 7 3 5 -1. + <_> + 10 7 1 5 3. + <_> + + <_> + 3 9 6 2 -1. + <_> + 6 9 3 2 2. + <_> + + <_> + 12 9 3 3 -1. + <_> + 12 10 3 1 3. + <_> + + <_> + 7 0 6 1 -1. + <_> + 9 0 2 1 3. + <_> + + <_> + 12 9 3 3 -1. + <_> + 12 10 3 1 3. + <_> + + <_> + 7 10 2 1 -1. + <_> + 8 10 1 1 2. + <_> + + <_> + 6 4 9 13 -1. + <_> + 9 4 3 13 3. + <_> + + <_> + 6 8 4 2 -1. + <_> + 6 9 4 1 2. + <_> + + <_> + 16 2 4 6 -1. + <_> + 16 2 2 6 2. + <_> + + <_> + 0 17 6 3 -1. + <_> + 0 18 6 1 3. + <_> + + <_> + 10 10 3 10 -1. + <_> + 10 15 3 5 2. + <_> + + <_> + 8 7 3 5 -1. + <_> + 9 7 1 5 3. + <_> + + <_> + 10 4 4 3 -1. + <_> + 10 4 2 3 2. + <_> + + <_> + 8 4 3 8 -1. + <_> + 9 4 1 8 3. + <_> + + <_> + 6 6 9 13 -1. + <_> + 9 6 3 13 3. + <_> + + <_> + 6 0 8 12 -1. + <_> + 6 0 4 6 2. + <_> + 10 6 4 6 2. + <_> + + <_> + 14 2 6 8 -1. + <_> + 16 2 2 8 3. + <_> + + <_> + 6 0 3 6 -1. + <_> + 7 0 1 6 3. + <_> + + <_> + 14 2 6 8 -1. + <_> + 16 2 2 8 3. + <_> + + <_> + 0 5 6 6 -1. + <_> + 0 8 6 3 2. + <_> + + <_> + 9 12 6 2 -1. + <_> + 12 12 3 1 2. + <_> + 9 13 3 1 2. + <_> + + <_> + 8 17 3 2 -1. + <_> + 9 17 1 2 3. + <_> + + <_> + 11 6 2 2 -1. + <_> + 12 6 1 1 2. + <_> + 11 7 1 1 2. + <_> + + <_> + 1 9 18 2 -1. + <_> + 7 9 6 2 3. + <_> + + <_> + 11 6 2 2 -1. + <_> + 12 6 1 1 2. + <_> + 11 7 1 1 2. + <_> + + <_> + 3 4 12 8 -1. + <_> + 7 4 4 8 3. + <_> + + <_> + 13 11 5 3 -1. + <_> + 13 12 5 1 3. + <_> + + <_> + 9 10 2 3 -1. + <_> + 9 11 2 1 3. + <_> + + <_> + 14 7 2 3 -1. + <_> + 14 7 1 3 2. + <_> + + <_> + 5 4 1 3 -1. + <_> + 5 5 1 1 3. + <_> + + <_> + 13 4 2 3 -1. + <_> + 13 5 2 1 3. + <_> + + <_> + 5 4 2 3 -1. + <_> + 5 5 2 1 3. + <_> + + <_> + 9 8 2 3 -1. + <_> + 9 9 2 1 3. + <_> + + <_> + 8 9 2 2 -1. + <_> + 8 10 2 1 2. + <_> + + <_> + 15 14 1 4 -1. + <_> + 15 16 1 2 2. + <_> + + <_> + 3 12 2 2 -1. + <_> + 3 13 2 1 2. + <_> + + <_> + 12 15 2 2 -1. + <_> + 13 15 1 1 2. + <_> + 12 16 1 1 2. + <_> + + <_> + 9 13 2 2 -1. + <_> + 9 14 2 1 2. + <_> + + <_> + 4 11 14 9 -1. + <_> + 4 14 14 3 3. + <_> + + <_> + 7 13 4 3 -1. + <_> + 7 14 4 1 3. + <_> + + <_> + 15 14 1 4 -1. + <_> + 15 16 1 2 2. + <_> + + <_> + 4 14 1 4 -1. + <_> + 4 16 1 2 2. + <_> + + <_> + 14 0 6 13 -1. + <_> + 16 0 2 13 3. + <_> + + <_> + 4 1 2 12 -1. + <_> + 4 1 1 6 2. + <_> + 5 7 1 6 2. + <_> + + <_> + 11 14 6 6 -1. + <_> + 14 14 3 3 2. + <_> + 11 17 3 3 2. + <_> + + <_> + 3 14 6 6 -1. + <_> + 3 14 3 3 2. + <_> + 6 17 3 3 2. + <_> + + <_> + 14 17 3 2 -1. + <_> + 14 18 3 1 2. + <_> + + <_> + 3 17 3 2 -1. + <_> + 3 18 3 1 2. + <_> + + <_> + 14 0 6 13 -1. + <_> + 16 0 2 13 3. + <_> + + <_> + 0 0 6 13 -1. + <_> + 2 0 2 13 3. + <_> + + <_> + 10 10 7 6 -1. + <_> + 10 12 7 2 3. + <_> + + <_> + 6 15 2 2 -1. + <_> + 6 15 1 1 2. + <_> + 7 16 1 1 2. + <_> + + <_> + 6 11 8 6 -1. + <_> + 10 11 4 3 2. + <_> + 6 14 4 3 2. + <_> + + <_> + 7 6 2 2 -1. + <_> + 7 6 1 1 2. + <_> + 8 7 1 1 2. + <_> + + <_> + 2 2 16 6 -1. + <_> + 10 2 8 3 2. + <_> + 2 5 8 3 2. + <_> + + <_> + 5 4 3 3 -1. + <_> + 5 5 3 1 3. + <_> + + <_> + 11 7 3 10 -1. + <_> + 11 12 3 5 2. + <_> + + <_> + 6 7 3 10 -1. + <_> + 6 12 3 5 2. + <_> + + <_> + 10 7 3 2 -1. + <_> + 11 7 1 2 3. + <_> + + <_> + 8 12 4 2 -1. + <_> + 8 13 4 1 2. + <_> + + <_> + 10 1 1 3 -1. + <_> + 10 2 1 1 3. + <_> + + <_> + 1 2 4 18 -1. + <_> + 1 2 2 9 2. + <_> + 3 11 2 9 2. + <_> + + <_> + 12 4 4 12 -1. + <_> + 12 10 4 6 2. + <_> + + <_> + 0 0 1 6 -1. + <_> + 0 2 1 2 3. + <_> + + <_> + 9 11 2 3 -1. + <_> + 9 12 2 1 3. + <_> + + <_> + 8 7 4 3 -1. + <_> + 8 8 4 1 3. + <_> + + <_> + 10 7 3 2 -1. + <_> + 11 7 1 2 3. + <_> + + <_> + 7 7 3 2 -1. + <_> + 8 7 1 2 3. + <_> + + <_> + 9 4 6 1 -1. + <_> + 11 4 2 1 3. + <_> + + <_> + 8 7 2 3 -1. + <_> + 9 7 1 3 2. + <_> + + <_> + 12 7 8 6 -1. + <_> + 16 7 4 3 2. + <_> + 12 10 4 3 2. + <_> + + <_> + 0 7 8 6 -1. + <_> + 0 7 4 3 2. + <_> + 4 10 4 3 2. + <_> + + <_> + 18 2 2 10 -1. + <_> + 19 2 1 5 2. + <_> + 18 7 1 5 2. + <_> + + <_> + 0 2 6 4 -1. + <_> + 3 2 3 4 2. + <_> + + <_> + 9 4 6 1 -1. + <_> + 11 4 2 1 3. + <_> + + <_> + 7 15 2 2 -1. + <_> + 7 15 1 1 2. + <_> + 8 16 1 1 2. + <_> + + <_> + 11 13 1 6 -1. + <_> + 11 16 1 3 2. + <_> + + <_> + 8 13 1 6 -1. + <_> + 8 16 1 3 2. + <_> + + <_> + 14 3 2 1 -1. + <_> + 14 3 1 1 2. + <_> + + <_> + 8 15 2 3 -1. + <_> + 8 16 2 1 3. + <_> + + <_> + 12 15 7 4 -1. + <_> + 12 17 7 2 2. + <_> + + <_> + 4 14 12 3 -1. + <_> + 4 15 12 1 3. + <_> + + <_> + 10 3 3 2 -1. + <_> + 11 3 1 2 3. + <_> + + <_> + 4 12 2 2 -1. + <_> + 4 13 2 1 2. + <_> + + <_> + 10 11 4 6 -1. + <_> + 10 14 4 3 2. + <_> + + <_> + 7 13 2 2 -1. + <_> + 7 13 1 1 2. + <_> + 8 14 1 1 2. + <_> + + <_> + 4 11 14 4 -1. + <_> + 11 11 7 2 2. + <_> + 4 13 7 2 2. + <_> + + <_> + 1 18 18 2 -1. + <_> + 7 18 6 2 3. + <_> + + <_> + 11 18 2 2 -1. + <_> + 12 18 1 1 2. + <_> + 11 19 1 1 2. + <_> + + <_> + 7 18 2 2 -1. + <_> + 7 18 1 1 2. + <_> + 8 19 1 1 2. + <_> + + <_> + 12 18 8 2 -1. + <_> + 12 19 8 1 2. + <_> + + <_> + 7 14 6 2 -1. + <_> + 7 15 6 1 2. + <_> + + <_> + 8 12 4 8 -1. + <_> + 10 12 2 4 2. + <_> + 8 16 2 4 2. + <_> + + <_> + 4 9 3 3 -1. + <_> + 4 10 3 1 3. + <_> + + <_> + 7 10 6 2 -1. + <_> + 9 10 2 2 3. + <_> + + <_> + 5 0 4 15 -1. + <_> + 7 0 2 15 2. + <_> + + <_> + 8 6 12 14 -1. + <_> + 12 6 4 14 3. + <_> + + <_> + 5 16 3 3 -1. + <_> + 5 17 3 1 3. + <_> + + <_> + 8 1 12 19 -1. + <_> + 12 1 4 19 3. + <_> + + <_> + 3 0 3 2 -1. + <_> + 3 1 3 1 2. + <_> + + <_> + 10 12 4 5 -1. + <_> + 10 12 2 5 2. + <_> + + <_> + 6 12 4 5 -1. + <_> + 8 12 2 5 2. + <_> + + <_> + 11 11 2 2 -1. + <_> + 12 11 1 1 2. + <_> + 11 12 1 1 2. + <_> + + <_> + 0 2 3 6 -1. + <_> + 0 4 3 2 3. + <_> + + <_> + 11 11 2 2 -1. + <_> + 12 11 1 1 2. + <_> + 11 12 1 1 2. + <_> + + <_> + 7 6 4 10 -1. + <_> + 7 11 4 5 2. + <_> + + <_> + 11 11 2 2 -1. + <_> + 12 11 1 1 2. + <_> + 11 12 1 1 2. + <_> + + <_> + 2 13 5 2 -1. + <_> + 2 14 5 1 2. + <_> + + <_> + 11 11 2 2 -1. + <_> + 12 11 1 1 2. + <_> + 11 12 1 1 2. + <_> + + <_> + 7 11 2 2 -1. + <_> + 7 11 1 1 2. + <_> + 8 12 1 1 2. + <_> + + <_> + 14 13 3 3 -1. + <_> + 14 14 3 1 3. + <_> + + <_> + 3 13 3 3 -1. + <_> + 3 14 3 1 3. + <_> + + <_> + 9 14 2 3 -1. + <_> + 9 15 2 1 3. + <_> + + <_> + 8 7 3 3 -1. + <_> + 8 8 3 1 3. + <_> + + <_> + 13 5 3 3 -1. + <_> + 13 6 3 1 3. + <_> + + <_> + 0 9 5 3 -1. + <_> + 0 10 5 1 3. + <_> + + <_> + 13 5 3 3 -1. + <_> + 13 6 3 1 3. + <_> + + <_> + 9 12 2 8 -1. + <_> + 9 12 1 4 2. + <_> + 10 16 1 4 2. + <_> + + <_> + 11 7 2 2 -1. + <_> + 12 7 1 1 2. + <_> + 11 8 1 1 2. + <_> + + <_> + 0 16 6 4 -1. + <_> + 3 16 3 4 2. + <_> + + <_> + 10 6 2 3 -1. + <_> + 10 7 2 1 3. + <_> + + <_> + 9 5 2 6 -1. + <_> + 9 7 2 2 3. + <_> + + <_> + 12 15 8 4 -1. + <_> + 12 15 4 4 2. + <_> + + <_> + 0 14 8 6 -1. + <_> + 4 14 4 6 2. + <_> + + <_> + 9 0 3 2 -1. + <_> + 10 0 1 2 3. + <_> + + <_> + 4 15 4 2 -1. + <_> + 6 15 2 2 2. + <_> + + <_> + 12 7 3 13 -1. + <_> + 13 7 1 13 3. + <_> + + <_> + 5 7 3 13 -1. + <_> + 6 7 1 13 3. + <_> + + <_> + 9 6 3 9 -1. + <_> + 9 9 3 3 3. + <_> + + <_> + 4 4 7 12 -1. + <_> + 4 10 7 6 2. + <_> + + <_> + 12 12 2 2 -1. + <_> + 13 12 1 1 2. + <_> + 12 13 1 1 2. + <_> + + <_> + 6 12 2 2 -1. + <_> + 6 12 1 1 2. + <_> + 7 13 1 1 2. + <_> + + <_> + 8 9 4 2 -1. + <_> + 10 9 2 1 2. + <_> + 8 10 2 1 2. + <_> + + <_> + 3 6 2 2 -1. + <_> + 3 6 1 1 2. + <_> + 4 7 1 1 2. + <_> + + <_> + 16 6 3 2 -1. + <_> + 16 7 3 1 2. + <_> + + <_> + 0 7 19 4 -1. + <_> + 0 9 19 2 2. + <_> + + <_> + 10 2 10 1 -1. + <_> + 10 2 5 1 2. + <_> + + <_> + 9 4 2 12 -1. + <_> + 9 10 2 6 2. + <_> + + <_> + 12 18 4 1 -1. + <_> + 12 18 2 1 2. + <_> + + <_> + 1 7 6 4 -1. + <_> + 1 7 3 2 2. + <_> + 4 9 3 2 2. + <_> + + <_> + 12 0 6 13 -1. + <_> + 14 0 2 13 3. + <_> + + <_> + 2 0 6 13 -1. + <_> + 4 0 2 13 3. + <_> + + <_> + 10 5 8 8 -1. + <_> + 10 9 8 4 2. + <_> + + <_> + 8 3 2 5 -1. + <_> + 9 3 1 5 2. + <_> + + <_> + 8 4 9 1 -1. + <_> + 11 4 3 1 3. + <_> + + <_> + 3 4 9 1 -1. + <_> + 6 4 3 1 3. + <_> + + <_> + 1 0 18 10 -1. + <_> + 7 0 6 10 3. + <_> + + <_> + 7 17 5 3 -1. + <_> + 7 18 5 1 3. + <_> + + <_> + 7 11 6 1 -1. + <_> + 9 11 2 1 3. + <_> + + <_> + 2 2 3 2 -1. + <_> + 2 3 3 1 2. + <_> + + <_> + 8 12 4 2 -1. + <_> + 8 13 4 1 2. + <_> + + <_> + 6 10 3 6 -1. + <_> + 6 13 3 3 2. + <_> + + <_> + 11 4 2 4 -1. + <_> + 11 4 1 4 2. + <_> + + <_> + 7 4 2 4 -1. + <_> + 8 4 1 4 2. + <_> + + <_> + 9 6 2 4 -1. + <_> + 9 6 1 4 2. + <_> + + <_> + 6 13 8 3 -1. + <_> + 6 14 8 1 3. + <_> + + <_> + 9 15 3 4 -1. + <_> + 10 15 1 4 3. + <_> + + <_> + 9 2 2 17 -1. + <_> + 10 2 1 17 2. + <_> + + <_> + 7 0 6 1 -1. + <_> + 9 0 2 1 3. + <_> + + <_> + 8 15 3 4 -1. + <_> + 9 15 1 4 3. + <_> + + <_> + 7 13 7 3 -1. + <_> + 7 14 7 1 3. + <_> + + <_> + 8 16 3 3 -1. + <_> + 9 16 1 3 3. + <_> + + <_> + 6 2 8 10 -1. + <_> + 6 7 8 5 2. + <_> + + <_> + 2 5 8 8 -1. + <_> + 2 9 8 4 2. + <_> + + <_> + 14 16 2 2 -1. + <_> + 14 17 2 1 2. + <_> + + <_> + 4 16 2 2 -1. + <_> + 4 17 2 1 2. + <_> + + <_> + 10 11 4 6 -1. + <_> + 10 14 4 3 2. + <_> + + <_> + 6 11 4 6 -1. + <_> + 6 14 4 3 2. + <_> + + <_> + 10 14 1 3 -1. + <_> + 10 15 1 1 3. + <_> + + <_> + 8 14 4 3 -1. + <_> + 8 15 4 1 3. + <_> + + <_> + 10 0 4 6 -1. + <_> + 12 0 2 3 2. + <_> + 10 3 2 3 2. + <_> + + <_> + 0 3 20 2 -1. + <_> + 0 4 20 1 2. + <_> + + <_> + 12 0 8 2 -1. + <_> + 16 0 4 1 2. + <_> + 12 1 4 1 2. + <_> + + <_> + 2 12 10 8 -1. + <_> + 2 16 10 4 2. + <_> + + <_> + 17 7 2 10 -1. + <_> + 18 7 1 5 2. + <_> + 17 12 1 5 2. + <_> + + <_> + 1 7 2 10 -1. + <_> + 1 7 1 5 2. + <_> + 2 12 1 5 2. + <_> + + <_> + 15 10 3 6 -1. + <_> + 15 12 3 2 3. + <_> + + <_> + 4 4 6 2 -1. + <_> + 6 4 2 2 3. + <_> + + <_> + 0 5 20 6 -1. + <_> + 0 7 20 2 3. + <_> + + <_> + 0 0 8 2 -1. + <_> + 0 0 4 1 2. + <_> + 4 1 4 1 2. + <_> + + <_> + 1 0 18 4 -1. + <_> + 7 0 6 4 3. + <_> + + <_> + 1 13 6 2 -1. + <_> + 1 14 6 1 2. + <_> + + <_> + 10 8 3 4 -1. + <_> + 11 8 1 4 3. + <_> + + <_> + 6 1 6 1 -1. + <_> + 8 1 2 1 3. + <_> + + <_> + 8 14 4 3 -1. + <_> + 8 15 4 1 3. + <_> + + <_> + 1 6 18 2 -1. + <_> + 10 6 9 2 2. + <_> + + <_> + 15 11 1 2 -1. + <_> + 15 12 1 1 2. + <_> + + <_> + 6 5 1 2 -1. + <_> + 6 6 1 1 2. + <_> + + <_> + 13 4 1 3 -1. + <_> + 13 5 1 1 3. + <_> + + <_> + 2 15 1 2 -1. + <_> + 2 16 1 1 2. + <_> + + <_> + 12 4 4 3 -1. + <_> + 12 5 4 1 3. + <_> + + <_> + 0 0 7 3 -1. + <_> + 0 1 7 1 3. + <_> + + <_> + 9 12 6 2 -1. + <_> + 9 12 3 2 2. + <_> + + <_> + 5 4 2 3 -1. + <_> + 5 5 2 1 3. + <_> + + <_> + 18 4 2 3 -1. + <_> + 18 5 2 1 3. + <_> + + <_> + 3 0 8 6 -1. + <_> + 3 2 8 2 3. + <_> + + <_> + 0 2 20 6 -1. + <_> + 10 2 10 3 2. + <_> + 0 5 10 3 2. + <_> + + <_> + 4 7 2 4 -1. + <_> + 5 7 1 4 2. + <_> + + <_> + 3 10 15 2 -1. + <_> + 8 10 5 2 3. + <_> + + <_> + 3 0 12 11 -1. + <_> + 9 0 6 11 2. + <_> + + <_> + 13 0 2 6 -1. + <_> + 13 0 1 6 2. + <_> + + <_> + 0 19 2 1 -1. + <_> + 1 19 1 1 2. + <_> + + <_> + 16 10 4 10 -1. + <_> + 18 10 2 5 2. + <_> + 16 15 2 5 2. + <_> + + <_> + 4 8 10 3 -1. + <_> + 4 9 10 1 3. + <_> + + <_> + 14 12 3 3 -1. + <_> + 14 13 3 1 3. + <_> + + <_> + 0 10 4 10 -1. + <_> + 0 10 2 5 2. + <_> + 2 15 2 5 2. + <_> + + <_> + 18 3 2 6 -1. + <_> + 18 5 2 2 3. + <_> + + <_> + 6 6 1 3 -1. + <_> + 6 7 1 1 3. + <_> + + <_> + 7 7 7 2 -1. + <_> + 7 8 7 1 2. + <_> + + <_> + 0 3 2 6 -1. + <_> + 0 5 2 2 3. + <_> + + <_> + 11 1 3 1 -1. + <_> + 12 1 1 1 3. + <_> + + <_> + 5 0 2 6 -1. + <_> + 6 0 1 6 2. + <_> + + <_> + 1 1 18 14 -1. + <_> + 7 1 6 14 3. + <_> + + <_> + 4 6 8 3 -1. + <_> + 8 6 4 3 2. + <_> + + <_> + 9 12 6 2 -1. + <_> + 9 12 3 2 2. + <_> + + <_> + 5 12 6 2 -1. + <_> + 8 12 3 2 2. + <_> + + <_> + 10 7 3 5 -1. + <_> + 11 7 1 5 3. + <_> + + <_> + 7 7 3 5 -1. + <_> + 8 7 1 5 3. + <_> + + <_> + 13 0 3 10 -1. + <_> + 14 0 1 10 3. + <_> + + <_> + 4 11 3 2 -1. + <_> + 4 12 3 1 2. + <_> + + <_> + 17 3 3 6 -1. + <_> + 18 3 1 6 3. + <_> + + <_> + 1 8 18 10 -1. + <_> + 1 13 18 5 2. + <_> + + <_> + 13 0 3 10 -1. + <_> + 14 0 1 10 3. + <_> + + <_> + 9 14 2 3 -1. + <_> + 9 15 2 1 3. + <_> + + <_> + 16 3 3 7 -1. + <_> + 17 3 1 7 3. + <_> + + <_> + 4 0 3 10 -1. + <_> + 5 0 1 10 3. + <_> + + <_> + 16 3 3 7 -1. + <_> + 17 3 1 7 3. + <_> + + <_> + 0 9 1 2 -1. + <_> + 0 10 1 1 2. + <_> + + <_> + 18 1 2 10 -1. + <_> + 18 1 1 10 2. + <_> + + <_> + 0 1 2 10 -1. + <_> + 1 1 1 10 2. + <_> + + <_> + 10 16 3 4 -1. + <_> + 11 16 1 4 3. + <_> + + <_> + 2 8 3 3 -1. + <_> + 3 8 1 3 3. + <_> + + <_> + 11 0 2 6 -1. + <_> + 12 0 1 3 2. + <_> + 11 3 1 3 2. + <_> + + <_> + 7 0 2 6 -1. + <_> + 7 0 1 3 2. + <_> + 8 3 1 3 2. + <_> + + <_> + 16 3 3 7 -1. + <_> + 17 3 1 7 3. + <_> + + <_> + 1 3 3 7 -1. + <_> + 2 3 1 7 3. + <_> + + <_> + 14 1 6 16 -1. + <_> + 16 1 2 16 3. + <_> + + <_> + 0 1 6 16 -1. + <_> + 2 1 2 16 3. + <_> + + <_> + 2 0 16 8 -1. + <_> + 10 0 8 4 2. + <_> + 2 4 8 4 2. + <_> + + <_> + 6 8 5 3 -1. + <_> + 6 9 5 1 3. + <_> + + <_> + 9 7 3 3 -1. + <_> + 10 7 1 3 3. + <_> + + <_> + 8 8 4 3 -1. + <_> + 8 9 4 1 3. + <_> + + <_> + 9 6 2 4 -1. + <_> + 9 6 1 4 2. + <_> + + <_> + 0 7 15 1 -1. + <_> + 5 7 5 1 3. + <_> + + <_> + 8 2 7 9 -1. + <_> + 8 5 7 3 3. + <_> + + <_> + 1 7 16 4 -1. + <_> + 1 7 8 2 2. + <_> + 9 9 8 2 2. + <_> + + <_> + 6 12 8 2 -1. + <_> + 6 13 8 1 2. + <_> + + <_> + 8 11 3 3 -1. + <_> + 8 12 3 1 3. + <_> + + <_> + 4 5 14 10 -1. + <_> + 11 5 7 5 2. + <_> + 4 10 7 5 2. + <_> + + <_> + 4 12 3 2 -1. + <_> + 4 13 3 1 2. + <_> + + <_> + 9 11 6 1 -1. + <_> + 11 11 2 1 3. + <_> + + <_> + 4 9 7 6 -1. + <_> + 4 11 7 2 3. + <_> + + <_> + 7 10 6 3 -1. + <_> + 7 11 6 1 3. + <_> + + <_> + 9 11 2 2 -1. + <_> + 9 12 2 1 2. + <_> + + <_> + 0 5 20 6 -1. + <_> + 0 7 20 2 3. + <_> + + <_> + 6 4 6 1 -1. + <_> + 8 4 2 1 3. + <_> + + <_> + 9 11 6 1 -1. + <_> + 11 11 2 1 3. + <_> + + <_> + 5 11 6 1 -1. + <_> + 7 11 2 1 3. + <_> + + <_> + 10 16 3 4 -1. + <_> + 11 16 1 4 3. + <_> + + <_> + 8 7 3 3 -1. + <_> + 9 7 1 3 3. + <_> + + <_> + 2 12 16 8 -1. + <_> + 2 16 16 4 2. + <_> + + <_> + 0 15 15 2 -1. + <_> + 0 16 15 1 2. + <_> + + <_> + 15 4 5 6 -1. + <_> + 15 6 5 2 3. + <_> + + <_> + 9 5 2 4 -1. + <_> + 10 5 1 4 2. + <_> + + <_> + 8 10 9 6 -1. + <_> + 8 12 9 2 3. + <_> + + <_> + 2 19 15 1 -1. + <_> + 7 19 5 1 3. + <_> + + <_> + 10 16 3 4 -1. + <_> + 11 16 1 4 3. + <_> + + <_> + 0 15 20 4 -1. + <_> + 0 17 20 2 2. + <_> + + <_> + 10 16 3 4 -1. + <_> + 11 16 1 4 3. + <_> + + <_> + 7 16 3 4 -1. + <_> + 8 16 1 4 3. + <_> + + <_> + 9 16 3 3 -1. + <_> + 9 17 3 1 3. + <_> + + <_> + 8 11 4 6 -1. + <_> + 8 14 4 3 2. + <_> + + <_> + 9 6 2 12 -1. + <_> + 9 10 2 4 3. + <_> + + <_> + 8 17 4 3 -1. + <_> + 8 18 4 1 3. + <_> + + <_> + 9 18 8 2 -1. + <_> + 13 18 4 1 2. + <_> + 9 19 4 1 2. + <_> + + <_> + 1 18 8 2 -1. + <_> + 1 19 8 1 2. + <_> + + <_> + 13 5 6 15 -1. + <_> + 15 5 2 15 3. + <_> + + <_> + 9 8 2 2 -1. + <_> + 9 9 2 1 2. + <_> + + <_> + 9 5 2 3 -1. + <_> + 9 5 1 3 2. + <_> + + <_> + 1 5 6 15 -1. + <_> + 3 5 2 15 3. + <_> + + <_> + 4 1 14 8 -1. + <_> + 11 1 7 4 2. + <_> + 4 5 7 4 2. + <_> + + <_> + 2 4 4 16 -1. + <_> + 2 4 2 8 2. + <_> + 4 12 2 8 2. + <_> + + <_> + 12 4 3 12 -1. + <_> + 12 10 3 6 2. + <_> + + <_> + 4 5 10 12 -1. + <_> + 4 5 5 6 2. + <_> + 9 11 5 6 2. + <_> + + <_> + 9 14 2 3 -1. + <_> + 9 15 2 1 3. + <_> + + <_> + 5 4 2 3 -1. + <_> + 5 5 2 1 3. + <_> + + <_> + 12 2 4 10 -1. + <_> + 14 2 2 5 2. + <_> + 12 7 2 5 2. + <_> + + <_> + 6 4 7 3 -1. + <_> + 6 5 7 1 3. + <_> + + <_> + 2 0 18 2 -1. + <_> + 11 0 9 1 2. + <_> + 2 1 9 1 2. + <_> + + <_> + 0 0 18 2 -1. + <_> + 0 0 9 1 2. + <_> + 9 1 9 1 2. + <_> + + <_> + 13 13 4 6 -1. + <_> + 15 13 2 3 2. + <_> + 13 16 2 3 2. + <_> + + <_> + 3 13 4 6 -1. + <_> + 3 13 2 3 2. + <_> + 5 16 2 3 2. + <_> + + <_> + 10 12 2 6 -1. + <_> + 10 15 2 3 2. + <_> + + <_> + 5 9 10 10 -1. + <_> + 5 9 5 5 2. + <_> + 10 14 5 5 2. + <_> + + <_> + 11 4 4 2 -1. + <_> + 13 4 2 1 2. + <_> + 11 5 2 1 2. + <_> + + <_> + 7 12 6 8 -1. + <_> + 10 12 3 8 2. + <_> + + <_> + 12 2 4 10 -1. + <_> + 14 2 2 5 2. + <_> + 12 7 2 5 2. + <_> + + <_> + 8 11 2 1 -1. + <_> + 9 11 1 1 2. + <_> + + <_> + 10 5 1 12 -1. + <_> + 10 9 1 4 3. + <_> + + <_> + 0 11 6 9 -1. + <_> + 3 11 3 9 2. + <_> + + <_> + 12 2 4 10 -1. + <_> + 14 2 2 5 2. + <_> + 12 7 2 5 2. + <_> + + <_> + 4 2 4 10 -1. + <_> + 4 2 2 5 2. + <_> + 6 7 2 5 2. + <_> + + <_> + 11 4 4 2 -1. + <_> + 13 4 2 1 2. + <_> + 11 5 2 1 2. + <_> + + <_> + 0 14 6 3 -1. + <_> + 0 15 6 1 3. + <_> + + <_> + 11 4 4 2 -1. + <_> + 13 4 2 1 2. + <_> + 11 5 2 1 2. + <_> + + <_> + 6 1 3 2 -1. + <_> + 7 1 1 2 3. + <_> + + <_> + 11 4 4 2 -1. + <_> + 13 4 2 1 2. + <_> + 11 5 2 1 2. + <_> + + <_> + 5 4 4 2 -1. + <_> + 5 4 2 1 2. + <_> + 7 5 2 1 2. + <_> + + <_> + 13 0 2 12 -1. + <_> + 14 0 1 6 2. + <_> + 13 6 1 6 2. + <_> + + <_> + 6 0 3 10 -1. + <_> + 7 0 1 10 3. + <_> + + <_> + 3 0 17 8 -1. + <_> + 3 4 17 4 2. + <_> + + <_> + 0 4 20 4 -1. + <_> + 0 6 20 2 2. + <_> + + <_> + 0 3 8 2 -1. + <_> + 4 3 4 2 2. + <_> + + <_> + 8 11 4 3 -1. + <_> + 8 12 4 1 3. + <_> + + <_> + 5 7 6 4 -1. + <_> + 5 7 3 2 2. + <_> + 8 9 3 2 2. + <_> + + <_> + 8 3 4 9 -1. + <_> + 8 6 4 3 3. + <_> + + <_> + 8 15 1 4 -1. + <_> + 8 17 1 2 2. + <_> + + <_> + 4 5 12 7 -1. + <_> + 8 5 4 7 3. + <_> + + <_> + 4 2 4 10 -1. + <_> + 4 2 2 5 2. + <_> + 6 7 2 5 2. + <_> + + <_> + 3 0 17 2 -1. + <_> + 3 1 17 1 2. + <_> + + <_> + 2 2 16 15 -1. + <_> + 2 7 16 5 3. + <_> + + <_> + 15 2 5 2 -1. + <_> + 15 3 5 1 2. + <_> + + <_> + 9 3 2 2 -1. + <_> + 10 3 1 2 2. + <_> + + <_> + 4 5 16 15 -1. + <_> + 4 10 16 5 3. + <_> + + <_> + 7 13 5 6 -1. + <_> + 7 16 5 3 2. + <_> + + <_> + 10 7 3 2 -1. + <_> + 11 7 1 2 3. + <_> + + <_> + 8 3 3 1 -1. + <_> + 9 3 1 1 3. + <_> + + <_> + 9 16 3 3 -1. + <_> + 9 17 3 1 3. + <_> + + <_> + 0 2 5 2 -1. + <_> + 0 3 5 1 2. + <_> + + <_> + 12 5 4 3 -1. + <_> + 12 6 4 1 3. + <_> + + <_> + 1 7 12 1 -1. + <_> + 5 7 4 1 3. + <_> + + <_> + 7 5 6 14 -1. + <_> + 7 12 6 7 2. + <_> + + <_> + 0 0 8 10 -1. + <_> + 0 0 4 5 2. + <_> + 4 5 4 5 2. + <_> + + <_> + 9 1 3 2 -1. + <_> + 10 1 1 2 3. + <_> + + <_> + 8 1 3 2 -1. + <_> + 9 1 1 2 3. + <_> + + <_> + 12 4 3 3 -1. + <_> + 12 5 3 1 3. + <_> + + <_> + 7 4 6 16 -1. + <_> + 7 12 6 8 2. + <_> + + <_> + 12 4 3 3 -1. + <_> + 12 5 3 1 3. + <_> + + <_> + 2 3 2 6 -1. + <_> + 2 5 2 2 3. + <_> + + <_> + 14 2 6 9 -1. + <_> + 14 5 6 3 3. + <_> + + <_> + 5 4 3 3 -1. + <_> + 5 5 3 1 3. + <_> + + <_> + 9 17 3 2 -1. + <_> + 10 17 1 2 3. + <_> + + <_> + 5 5 2 3 -1. + <_> + 5 6 2 1 3. + <_> + + <_> + 13 11 3 6 -1. + <_> + 13 13 3 2 3. + <_> + + <_> + 3 14 2 6 -1. + <_> + 3 17 2 3 2. + <_> + + <_> + 14 3 6 2 -1. + <_> + 14 4 6 1 2. + <_> + + <_> + 0 8 16 2 -1. + <_> + 0 9 16 1 2. + <_> + + <_> + 14 3 6 2 -1. + <_> + 14 4 6 1 2. + <_> + + <_> + 0 0 5 6 -1. + <_> + 0 2 5 2 3. + <_> + + <_> + 12 5 4 3 -1. + <_> + 12 6 4 1 3. + <_> + + <_> + 4 11 3 6 -1. + <_> + 4 13 3 2 3. + <_> + + <_> + 12 5 4 3 -1. + <_> + 12 6 4 1 3. + <_> + + <_> + 9 5 1 3 -1. + <_> + 9 6 1 1 3. + <_> + + <_> + 12 5 4 3 -1. + <_> + 12 6 4 1 3. + <_> + + <_> + 6 6 8 12 -1. + <_> + 6 12 8 6 2. + <_> + + <_> + 12 5 4 3 -1. + <_> + 12 6 4 1 3. + <_> + + <_> + 5 12 9 2 -1. + <_> + 8 12 3 2 3. + <_> + + <_> + 12 5 4 3 -1. + <_> + 12 6 4 1 3. + <_> + + <_> + 4 5 4 3 -1. + <_> + 4 6 4 1 3. + <_> + + <_> + 6 6 9 2 -1. + <_> + 9 6 3 2 3. + <_> + + <_> + 4 11 1 3 -1. + <_> + 4 12 1 1 3. + <_> + + <_> + 14 12 6 6 -1. + <_> + 14 12 3 6 2. + <_> + + <_> + 7 0 3 7 -1. + <_> + 8 0 1 7 3. + <_> + + <_> + 9 8 3 3 -1. + <_> + 10 8 1 3 3. + <_> + + <_> + 8 8 3 3 -1. + <_> + 9 8 1 3 3. + <_> + + <_> + 5 10 11 3 -1. + <_> + 5 11 11 1 3. + <_> + + <_> + 5 7 10 1 -1. + <_> + 10 7 5 1 2. + <_> + + <_> + 9 7 3 2 -1. + <_> + 10 7 1 2 3. + <_> + + <_> + 8 7 3 2 -1. + <_> + 9 7 1 2 3. + <_> + + <_> + 11 9 4 2 -1. + <_> + 11 9 2 2 2. + <_> + + <_> + 5 9 4 2 -1. + <_> + 7 9 2 2 2. + <_> + + <_> + 14 10 2 4 -1. + <_> + 14 12 2 2 2. + <_> + + <_> + 7 7 3 2 -1. + <_> + 8 7 1 2 3. + <_> + + <_> + 14 17 6 3 -1. + <_> + 14 18 6 1 3. + <_> + + <_> + 4 5 12 12 -1. + <_> + 4 5 6 6 2. + <_> + 10 11 6 6 2. + <_> + + <_> + 6 9 8 8 -1. + <_> + 10 9 4 4 2. + <_> + 6 13 4 4 2. + <_> + + <_> + 0 4 15 4 -1. + <_> + 5 4 5 4 3. + <_> + + <_> + 13 2 4 1 -1. + <_> + 13 2 2 1 2. + <_> + + <_> + 4 12 2 2 -1. + <_> + 4 13 2 1 2. + <_> + + <_> + 8 13 4 3 -1. + <_> + 8 14 4 1 3. + <_> + + <_> + 9 13 2 3 -1. + <_> + 9 14 2 1 3. + <_> + + <_> + 13 11 2 3 -1. + <_> + 13 12 2 1 3. + <_> + + <_> + 7 12 4 4 -1. + <_> + 7 12 2 2 2. + <_> + 9 14 2 2 2. + <_> + + <_> + 10 11 2 2 -1. + <_> + 11 11 1 1 2. + <_> + 10 12 1 1 2. + <_> + + <_> + 8 17 3 2 -1. + <_> + 9 17 1 2 3. + <_> + + <_> + 10 11 2 2 -1. + <_> + 11 11 1 1 2. + <_> + 10 12 1 1 2. + <_> + + <_> + 0 17 6 3 -1. + <_> + 0 18 6 1 3. + <_> + + <_> + 10 11 2 2 -1. + <_> + 11 11 1 1 2. + <_> + 10 12 1 1 2. + <_> + + <_> + 8 11 2 2 -1. + <_> + 8 11 1 1 2. + <_> + 9 12 1 1 2. + <_> + + <_> + 12 5 8 4 -1. + <_> + 12 5 4 4 2. + <_> + + <_> + 0 5 8 4 -1. + <_> + 4 5 4 4 2. + <_> + + <_> + 13 2 4 1 -1. + <_> + 13 2 2 1 2. + <_> + + <_> + 3 2 4 1 -1. + <_> + 5 2 2 1 2. + <_> + + <_> + 10 0 4 2 -1. + <_> + 12 0 2 1 2. + <_> + 10 1 2 1 2. + <_> + + <_> + 7 12 3 1 -1. + <_> + 8 12 1 1 3. + <_> + + <_> + 8 11 4 8 -1. + <_> + 10 11 2 4 2. + <_> + 8 15 2 4 2. + <_> + + <_> + 9 9 2 2 -1. + <_> + 9 10 2 1 2. + <_> + + <_> + 3 18 15 2 -1. + <_> + 3 19 15 1 2. + <_> + + <_> + 2 6 2 12 -1. + <_> + 2 6 1 6 2. + <_> + 3 12 1 6 2. + <_> + + <_> + 9 8 2 3 -1. + <_> + 9 9 2 1 3. + <_> + + <_> + 7 10 3 2 -1. + <_> + 8 10 1 2 3. + <_> + + <_> + 11 11 3 1 -1. + <_> + 12 11 1 1 3. + <_> + + <_> + 6 11 3 1 -1. + <_> + 7 11 1 1 3. + <_> + + <_> + 9 2 4 2 -1. + <_> + 11 2 2 1 2. + <_> + 9 3 2 1 2. + <_> + + <_> + 4 12 2 3 -1. + <_> + 4 13 2 1 3. + <_> + + <_> + 2 1 18 3 -1. + <_> + 8 1 6 3 3. + <_> + + <_> + 5 1 4 14 -1. + <_> + 7 1 2 14 2. + <_> + + <_> + 8 16 12 3 -1. + <_> + 8 16 6 3 2. + <_> + + <_> + 1 17 18 3 -1. + <_> + 7 17 6 3 3. + <_> + + <_> + 9 14 2 6 -1. + <_> + 9 17 2 3 2. + <_> + + <_> + 9 12 1 8 -1. + <_> + 9 16 1 4 2. + <_> + + <_> + 9 14 2 3 -1. + <_> + 9 15 2 1 3. + <_> + + <_> + 9 6 2 12 -1. + <_> + 9 10 2 4 3. + <_> + + <_> + 12 9 3 3 -1. + <_> + 12 10 3 1 3. + <_> + + <_> + 0 1 4 8 -1. + <_> + 2 1 2 8 2. + <_> + + <_> + 9 1 6 2 -1. + <_> + 12 1 3 1 2. + <_> + 9 2 3 1 2. + <_> + + <_> + 1 3 12 14 -1. + <_> + 1 10 12 7 2. + <_> + + <_> + 8 12 4 2 -1. + <_> + 10 12 2 1 2. + <_> + 8 13 2 1 2. + <_> + + <_> + 1 9 10 2 -1. + <_> + 1 9 5 1 2. + <_> + 6 10 5 1 2. + <_> + + <_> + 8 15 4 3 -1. + <_> + 8 16 4 1 3. + <_> + + <_> + 6 8 8 3 -1. + <_> + 6 9 8 1 3. + <_> + + <_> + 9 15 5 3 -1. + <_> + 9 16 5 1 3. + <_> + + <_> + 8 7 4 3 -1. + <_> + 8 8 4 1 3. + <_> + + <_> + 7 7 6 2 -1. + <_> + 7 8 6 1 2. + <_> + + <_> + 5 7 8 2 -1. + <_> + 5 7 4 1 2. + <_> + 9 8 4 1 2. + <_> + + <_> + 12 9 3 3 -1. + <_> + 12 10 3 1 3. + <_> + + <_> + 4 7 4 2 -1. + <_> + 4 8 4 1 2. + <_> + + <_> + 14 2 6 9 -1. + <_> + 14 5 6 3 3. + <_> + + <_> + 4 9 3 3 -1. + <_> + 5 9 1 3 3. + <_> + + <_> + 12 9 3 3 -1. + <_> + 12 10 3 1 3. + <_> + + <_> + 0 2 6 9 -1. + <_> + 0 5 6 3 3. + <_> + + <_> + 17 3 3 6 -1. + <_> + 18 3 1 6 3. + <_> + + <_> + 0 3 3 6 -1. + <_> + 1 3 1 6 3. + <_> + + <_> + 17 14 1 2 -1. + <_> + 17 15 1 1 2. + <_> + + <_> + 4 9 4 3 -1. + <_> + 6 9 2 3 2. + <_> + + <_> + 12 9 3 3 -1. + <_> + 12 10 3 1 3. + <_> + + <_> + 5 9 3 3 -1. + <_> + 5 10 3 1 3. + <_> + + <_> + 9 5 6 8 -1. + <_> + 12 5 3 4 2. + <_> + 9 9 3 4 2. + <_> + + <_> + 5 5 6 8 -1. + <_> + 5 5 3 4 2. + <_> + 8 9 3 4 2. + <_> + + <_> + 16 1 4 6 -1. + <_> + 16 4 4 3 2. + <_> + + <_> + 1 0 6 20 -1. + <_> + 3 0 2 20 3. + <_> + + <_> + 12 11 3 2 -1. + <_> + 13 11 1 2 3. + <_> + + <_> + 5 11 3 2 -1. + <_> + 6 11 1 2 3. + <_> + + <_> + 9 4 6 1 -1. + <_> + 11 4 2 1 3. + <_> + + <_> + 0 0 8 3 -1. + <_> + 4 0 4 3 2. + <_> + + <_> + 15 0 2 5 -1. + <_> + 15 0 1 5 2. + <_> + + <_> + 4 1 3 2 -1. + <_> + 5 1 1 2 3. + <_> + + <_> + 7 0 6 15 -1. + <_> + 9 0 2 15 3. + <_> + + <_> + 6 11 3 1 -1. + <_> + 7 11 1 1 3. + <_> + + <_> + 12 0 3 4 -1. + <_> + 13 0 1 4 3. + <_> + + <_> + 5 4 6 1 -1. + <_> + 7 4 2 1 3. + <_> + + <_> + 12 7 3 2 -1. + <_> + 12 8 3 1 2. + <_> + + <_> + 0 1 4 6 -1. + <_> + 0 4 4 3 2. + <_> + + <_> + 12 7 3 2 -1. + <_> + 12 8 3 1 2. + <_> + + <_> + 2 16 3 3 -1. + <_> + 2 17 3 1 3. + <_> + + <_> + 13 8 6 10 -1. + <_> + 16 8 3 5 2. + <_> + 13 13 3 5 2. + <_> + + <_> + 0 9 5 2 -1. + <_> + 0 10 5 1 2. + <_> + + <_> + 12 11 2 2 -1. + <_> + 13 11 1 1 2. + <_> + 12 12 1 1 2. + <_> + + <_> + 3 15 3 3 -1. + <_> + 3 16 3 1 3. + <_> + + <_> + 12 7 3 2 -1. + <_> + 12 8 3 1 2. + <_> + + <_> + 5 7 3 2 -1. + <_> + 5 8 3 1 2. + <_> + + <_> + 9 5 9 9 -1. + <_> + 9 8 9 3 3. + <_> + + <_> + 5 0 3 7 -1. + <_> + 6 0 1 7 3. + <_> + + <_> + 5 2 12 5 -1. + <_> + 9 2 4 5 3. + <_> + + <_> + 6 11 2 2 -1. + <_> + 6 11 1 1 2. + <_> + 7 12 1 1 2. + <_> + + <_> + 15 15 3 2 -1. + <_> + 15 16 3 1 2. + <_> + + <_> + 2 15 3 2 -1. + <_> + 2 16 3 1 2. + <_> + + <_> + 14 12 6 8 -1. + <_> + 17 12 3 4 2. + <_> + 14 16 3 4 2. + <_> + + <_> + 2 8 15 6 -1. + <_> + 7 8 5 6 3. + <_> + + <_> + 2 2 18 17 -1. + <_> + 8 2 6 17 3. + <_> + + <_> + 5 1 4 1 -1. + <_> + 7 1 2 1 2. + <_> + + <_> + 5 2 12 5 -1. + <_> + 9 2 4 5 3. + <_> + + <_> + 3 2 12 5 -1. + <_> + 7 2 4 5 3. + <_> + + <_> + 4 9 12 4 -1. + <_> + 10 9 6 2 2. + <_> + 4 11 6 2 2. + <_> + + <_> + 5 15 6 2 -1. + <_> + 5 15 3 1 2. + <_> + 8 16 3 1 2. + <_> + + <_> + 10 14 2 3 -1. + <_> + 10 15 2 1 3. + <_> + + <_> + 0 13 20 2 -1. + <_> + 0 13 10 1 2. + <_> + 10 14 10 1 2. + <_> + + <_> + 4 9 12 8 -1. + <_> + 10 9 6 4 2. + <_> + 4 13 6 4 2. + <_> + + <_> + 8 13 3 6 -1. + <_> + 8 16 3 3 2. + <_> + + <_> + 10 12 2 2 -1. + <_> + 10 13 2 1 2. + <_> + + <_> + 9 12 2 2 -1. + <_> + 9 12 1 1 2. + <_> + 10 13 1 1 2. + <_> + + <_> + 4 11 14 4 -1. + <_> + 11 11 7 2 2. + <_> + 4 13 7 2 2. + <_> + + <_> + 8 5 4 2 -1. + <_> + 8 6 4 1 2. + <_> + + <_> + 10 10 6 3 -1. + <_> + 12 10 2 3 3. + <_> + + <_> + 2 14 1 2 -1. + <_> + 2 15 1 1 2. + <_> + + <_> + 13 8 6 12 -1. + <_> + 16 8 3 6 2. + <_> + 13 14 3 6 2. + <_> + + <_> + 1 8 6 12 -1. + <_> + 1 8 3 6 2. + <_> + 4 14 3 6 2. + <_> + + <_> + 10 0 6 10 -1. + <_> + 12 0 2 10 3. + <_> + + <_> + 5 11 8 4 -1. + <_> + 5 11 4 2 2. + <_> + 9 13 4 2 2. + <_> + + <_> + 10 16 8 4 -1. + <_> + 14 16 4 2 2. + <_> + 10 18 4 2 2. + <_> + + <_> + 7 7 6 6 -1. + <_> + 9 7 2 6 3. + <_> + + <_> + 10 2 4 10 -1. + <_> + 10 2 2 10 2. + <_> + + <_> + 6 1 4 9 -1. + <_> + 8 1 2 9 2. + <_> + + <_> + 12 19 2 1 -1. + <_> + 12 19 1 1 2. + <_> + + <_> + 1 2 4 9 -1. + <_> + 3 2 2 9 2. + <_> + + <_> + 7 5 6 4 -1. + <_> + 9 5 2 4 3. + <_> + + <_> + 9 4 2 4 -1. + <_> + 9 6 2 2 2. + <_> + + <_> + 14 5 2 8 -1. + <_> + 14 9 2 4 2. + <_> + + <_> + 7 6 5 12 -1. + <_> + 7 12 5 6 2. + <_> + + <_> + 14 6 2 6 -1. + <_> + 14 9 2 3 2. + <_> + + <_> + 4 6 2 6 -1. + <_> + 4 9 2 3 2. + <_> + + <_> + 8 15 10 4 -1. + <_> + 13 15 5 2 2. + <_> + 8 17 5 2 2. + <_> + + <_> + 6 18 2 2 -1. + <_> + 7 18 1 2 2. + <_> + + <_> + 11 3 6 2 -1. + <_> + 11 4 6 1 2. + <_> + + <_> + 2 0 16 6 -1. + <_> + 2 2 16 2 3. + <_> + + <_> + 11 3 6 2 -1. + <_> + 11 4 6 1 2. + <_> + + <_> + 4 11 10 3 -1. + <_> + 4 12 10 1 3. + <_> + + <_> + 11 3 6 2 -1. + <_> + 11 4 6 1 2. + <_> + + <_> + 3 3 6 2 -1. + <_> + 3 4 6 1 2. + <_> + + <_> + 16 0 4 7 -1. + <_> + 16 0 2 7 2. + <_> + + <_> + 0 14 9 6 -1. + <_> + 0 16 9 2 3. + <_> + + <_> + 9 16 3 3 -1. + <_> + 9 17 3 1 3. + <_> + + <_> + 4 6 6 2 -1. + <_> + 6 6 2 2 3. + <_> + + <_> + 15 11 1 3 -1. + <_> + 15 12 1 1 3. + <_> + + <_> + 5 5 2 3 -1. + <_> + 5 6 2 1 3. + <_> + + <_> + 10 9 2 2 -1. + <_> + 10 10 2 1 2. + <_> + + <_> + 3 1 4 3 -1. + <_> + 5 1 2 3 2. + <_> + + <_> + 16 0 4 7 -1. + <_> + 16 0 2 7 2. + <_> + + <_> + 0 0 20 1 -1. + <_> + 10 0 10 1 2. + <_> + + <_> + 15 11 1 3 -1. + <_> + 15 12 1 1 3. + <_> + + <_> + 0 4 3 4 -1. + <_> + 1 4 1 4 3. + <_> + + <_> + 16 3 3 6 -1. + <_> + 16 5 3 2 3. + <_> + + <_> + 1 3 3 6 -1. + <_> + 1 5 3 2 3. + <_> + + <_> + 6 2 12 6 -1. + <_> + 12 2 6 3 2. + <_> + 6 5 6 3 2. + <_> + + <_> + 8 10 4 3 -1. + <_> + 8 11 4 1 3. + <_> + + <_> + 4 2 14 6 -1. + <_> + 11 2 7 3 2. + <_> + 4 5 7 3 2. + <_> + + <_> + 9 11 2 3 -1. + <_> + 9 12 2 1 3. + <_> + + <_> + 15 13 2 3 -1. + <_> + 15 14 2 1 3. + <_> + + <_> + 8 12 4 3 -1. + <_> + 8 13 4 1 3. + <_> + + <_> + 15 11 1 3 -1. + <_> + 15 12 1 1 3. + <_> + + <_> + 7 13 5 2 -1. + <_> + 7 14 5 1 2. + <_> + + <_> + 7 12 6 3 -1. + <_> + 7 13 6 1 3. + <_> + + <_> + 5 11 4 4 -1. + <_> + 5 13 4 2 2. + <_> + + <_> + 11 4 3 3 -1. + <_> + 12 4 1 3 3. + <_> + + <_> + 6 4 3 3 -1. + <_> + 7 4 1 3 3. + <_> + + <_> + 16 5 3 6 -1. + <_> + 17 5 1 6 3. + <_> + + <_> + 3 6 12 7 -1. + <_> + 7 6 4 7 3. + <_> + + <_> + 16 5 3 6 -1. + <_> + 17 5 1 6 3. + <_> + + <_> + 3 13 2 3 -1. + <_> + 3 14 2 1 3. + <_> + + <_> + 16 5 3 6 -1. + <_> + 17 5 1 6 3. + <_> + + <_> + 1 5 3 6 -1. + <_> + 2 5 1 6 3. + <_> + + <_> + 1 9 18 1 -1. + <_> + 7 9 6 1 3. + <_> + + <_> + 0 9 8 7 -1. + <_> + 4 9 4 7 2. + <_> + + <_> + 12 11 8 2 -1. + <_> + 12 12 8 1 2. + <_> + + <_> + 0 11 8 2 -1. + <_> + 0 12 8 1 2. + <_> + + <_> + 9 13 2 3 -1. + <_> + 9 14 2 1 3. + <_> + + <_> + 4 10 12 4 -1. + <_> + 4 10 6 2 2. + <_> + 10 12 6 2 2. + <_> + + <_> + 9 3 3 7 -1. + <_> + 10 3 1 7 3. + <_> + + <_> + 7 2 3 5 -1. + <_> + 8 2 1 5 3. + <_> + + <_> + 9 12 4 6 -1. + <_> + 11 12 2 3 2. + <_> + 9 15 2 3 2. + <_> + + <_> + 8 7 3 6 -1. + <_> + 9 7 1 6 3. + <_> + + <_> + 15 4 4 2 -1. + <_> + 15 5 4 1 2. + <_> + + <_> + 8 7 3 3 -1. + <_> + 9 7 1 3 3. + <_> + + <_> + 14 2 6 4 -1. + <_> + 14 4 6 2 2. + <_> + + <_> + 7 16 6 1 -1. + <_> + 9 16 2 1 3. + <_> + + <_> + 15 13 2 3 -1. + <_> + 15 14 2 1 3. + <_> + + <_> + 8 7 3 10 -1. + <_> + 9 7 1 10 3. + <_> + + <_> + 11 10 2 6 -1. + <_> + 11 12 2 2 3. + <_> + + <_> + 6 10 4 1 -1. + <_> + 8 10 2 1 2. + <_> + + <_> + 10 9 2 2 -1. + <_> + 10 10 2 1 2. + <_> + + <_> + 8 9 2 2 -1. + <_> + 8 10 2 1 2. + <_> + + <_> + 12 7 2 2 -1. + <_> + 13 7 1 1 2. + <_> + 12 8 1 1 2. + <_> + + <_> + 5 7 2 2 -1. + <_> + 5 7 1 1 2. + <_> + 6 8 1 1 2. + <_> + + <_> + 13 0 3 14 -1. + <_> + 14 0 1 14 3. + <_> + + <_> + 4 0 3 14 -1. + <_> + 5 0 1 14 3. + <_> + + <_> + 13 4 3 14 -1. + <_> + 14 4 1 14 3. + <_> + + <_> + 9 14 2 3 -1. + <_> + 9 15 2 1 3. + <_> + + <_> + 8 14 4 3 -1. + <_> + 8 15 4 1 3. + <_> + + <_> + 4 2 3 16 -1. + <_> + 5 2 1 16 3. + <_> + + <_> + 7 2 8 10 -1. + <_> + 7 7 8 5 2. + <_> + + <_> + 6 14 7 3 -1. + <_> + 6 15 7 1 3. + <_> + + <_> + 9 2 10 12 -1. + <_> + 14 2 5 6 2. + <_> + 9 8 5 6 2. + <_> + + <_> + 6 7 8 2 -1. + <_> + 6 8 8 1 2. + <_> + + <_> + 8 13 4 6 -1. + <_> + 8 16 4 3 2. + <_> + + <_> + 6 6 1 3 -1. + <_> + 6 7 1 1 3. + <_> + + <_> + 16 2 4 6 -1. + <_> + 16 4 4 2 3. + <_> + + <_> + 6 6 4 2 -1. + <_> + 6 6 2 1 2. + <_> + 8 7 2 1 2. + <_> + + <_> + 16 2 4 6 -1. + <_> + 16 4 4 2 3. + <_> + + <_> + 0 2 4 6 -1. + <_> + 0 4 4 2 3. + <_> + + <_> + 9 6 2 6 -1. + <_> + 9 6 1 6 2. + <_> + + <_> + 3 4 6 10 -1. + <_> + 3 9 6 5 2. + <_> + + <_> + 9 5 2 6 -1. + <_> + 9 5 1 6 2. + <_> + + <_> + 3 13 2 3 -1. + <_> + 3 14 2 1 3. + <_> + + <_> + 13 13 3 2 -1. + <_> + 13 14 3 1 2. + <_> + + <_> + 2 16 10 4 -1. + <_> + 2 16 5 2 2. + <_> + 7 18 5 2 2. + <_> + + <_> + 5 6 10 6 -1. + <_> + 10 6 5 3 2. + <_> + 5 9 5 3 2. + <_> + + <_> + 7 14 1 3 -1. + <_> + 7 15 1 1 3. + <_> + + <_> + 14 16 6 3 -1. + <_> + 14 17 6 1 3. + <_> + + <_> + 5 4 3 3 -1. + <_> + 5 5 3 1 3. + <_> + + <_> + 7 4 10 3 -1. + <_> + 7 5 10 1 3. + <_> + + <_> + 0 4 5 4 -1. + <_> + 0 6 5 2 2. + <_> + + <_> + 13 11 3 9 -1. + <_> + 13 14 3 3 3. + <_> + + <_> + 4 11 3 9 -1. + <_> + 4 14 3 3 3. + <_> + + <_> + 9 7 2 1 -1. + <_> + 9 7 1 1 2. + <_> + + <_> + 5 0 6 17 -1. + <_> + 7 0 2 17 3. + <_> + + <_> + 10 3 6 3 -1. + <_> + 10 3 3 3 2. + <_> + + <_> + 2 2 15 4 -1. + <_> + 7 2 5 4 3. + <_> + + <_> + 8 2 8 2 -1. + <_> + 12 2 4 1 2. + <_> + 8 3 4 1 2. + <_> + + <_> + 8 1 3 6 -1. + <_> + 8 3 3 2 3. + <_> + + <_> + 9 17 2 2 -1. + <_> + 9 18 2 1 2. + <_> + + <_> + 0 0 2 14 -1. + <_> + 1 0 1 14 2. + <_> + + <_> + 12 0 7 3 -1. + <_> + 12 1 7 1 3. + <_> + + <_> + 1 14 1 2 -1. + <_> + 1 15 1 1 2. + <_> + + <_> + 14 12 2 8 -1. + <_> + 15 12 1 4 2. + <_> + 14 16 1 4 2. + <_> + + <_> + 1 0 7 3 -1. + <_> + 1 1 7 1 3. + <_> + + <_> + 14 12 2 8 -1. + <_> + 15 12 1 4 2. + <_> + 14 16 1 4 2. + <_> + + <_> + 6 0 8 12 -1. + <_> + 6 0 4 6 2. + <_> + 10 6 4 6 2. + <_> + + <_> + 6 1 8 9 -1. + <_> + 6 4 8 3 3. + <_> + + <_> + 5 2 2 2 -1. + <_> + 5 3 2 1 2. + <_> + + <_> + 13 14 6 6 -1. + <_> + 16 14 3 3 2. + <_> + 13 17 3 3 2. + <_> + + <_> + 0 17 20 2 -1. + <_> + 0 17 10 1 2. + <_> + 10 18 10 1 2. + <_> + + <_> + 10 3 2 6 -1. + <_> + 11 3 1 3 2. + <_> + 10 6 1 3 2. + <_> + + <_> + 5 12 6 2 -1. + <_> + 8 12 3 2 2. + <_> + + <_> + 10 7 6 13 -1. + <_> + 10 7 3 13 2. + <_> + + <_> + 5 15 10 5 -1. + <_> + 10 15 5 5 2. + <_> + + <_> + 10 4 4 10 -1. + <_> + 10 4 2 10 2. + <_> + + <_> + 5 7 2 1 -1. + <_> + 6 7 1 1 2. + <_> + + <_> + 10 3 6 7 -1. + <_> + 10 3 3 7 2. + <_> + + <_> + 4 3 6 7 -1. + <_> + 7 3 3 7 2. + <_> + + <_> + 1 7 18 5 -1. + <_> + 7 7 6 5 3. + <_> + + <_> + 3 17 4 3 -1. + <_> + 5 17 2 3 2. + <_> + + <_> + 8 14 12 6 -1. + <_> + 14 14 6 3 2. + <_> + 8 17 6 3 2. + <_> + + <_> + 0 13 20 4 -1. + <_> + 0 13 10 2 2. + <_> + 10 15 10 2 2. + <_> + + <_> + 4 5 14 2 -1. + <_> + 11 5 7 1 2. + <_> + 4 6 7 1 2. + <_> + + <_> + 1 2 10 12 -1. + <_> + 1 2 5 6 2. + <_> + 6 8 5 6 2. + <_> + + <_> + 6 1 14 3 -1. + <_> + 6 2 14 1 3. + <_> + + <_> + 8 16 2 3 -1. + <_> + 8 17 2 1 3. + <_> + + <_> + 9 17 3 2 -1. + <_> + 10 17 1 2 3. + <_> + + <_> + 5 15 4 2 -1. + <_> + 5 15 2 1 2. + <_> + 7 16 2 1 2. + <_> + + <_> + 10 15 1 3 -1. + <_> + 10 16 1 1 3. + <_> + + <_> + 8 16 4 4 -1. + <_> + 8 16 2 2 2. + <_> + 10 18 2 2 2. + <_> + + <_> + 6 11 8 6 -1. + <_> + 6 14 8 3 2. + <_> + + <_> + 2 13 5 2 -1. + <_> + 2 14 5 1 2. + <_> + + <_> + 13 14 6 6 -1. + <_> + 16 14 3 3 2. + <_> + 13 17 3 3 2. + <_> + + <_> + 1 9 18 4 -1. + <_> + 7 9 6 4 3. + <_> + + <_> + 13 14 6 6 -1. + <_> + 16 14 3 3 2. + <_> + 13 17 3 3 2. + <_> + + <_> + 0 2 1 6 -1. + <_> + 0 4 1 2 3. + <_> + + <_> + 5 0 15 20 -1. + <_> + 5 10 15 10 2. + <_> + + <_> + 1 14 6 6 -1. + <_> + 1 14 3 3 2. + <_> + 4 17 3 3 2. + <_> + + <_> + 8 14 4 6 -1. + <_> + 10 14 2 3 2. + <_> + 8 17 2 3 2. + <_> + + <_> + 7 11 2 1 -1. + <_> + 8 11 1 1 2. + <_> + + <_> + 9 17 3 2 -1. + <_> + 10 17 1 2 3. + <_> + + <_> + 8 17 3 2 -1. + <_> + 9 17 1 2 3. + <_> + + <_> + 12 14 4 6 -1. + <_> + 14 14 2 3 2. + <_> + 12 17 2 3 2. + <_> + + <_> + 4 14 4 6 -1. + <_> + 4 14 2 3 2. + <_> + 6 17 2 3 2. + <_> + + <_> + 13 14 2 6 -1. + <_> + 14 14 1 3 2. + <_> + 13 17 1 3 2. + <_> + + <_> + 5 14 2 6 -1. + <_> + 5 14 1 3 2. + <_> + 6 17 1 3 2. + <_> + + <_> + 7 0 6 12 -1. + <_> + 7 4 6 4 3. + <_> + + <_> + 0 7 12 2 -1. + <_> + 4 7 4 2 3. + <_> + + <_> + 10 3 3 13 -1. + <_> + 11 3 1 13 3. + <_> + + <_> + 7 3 3 13 -1. + <_> + 8 3 1 13 3. + <_> + + <_> + 10 8 6 3 -1. + <_> + 10 9 6 1 3. + <_> + + <_> + 3 11 3 2 -1. + <_> + 4 11 1 2 3. + <_> + + <_> + 13 12 6 8 -1. + <_> + 16 12 3 4 2. + <_> + 13 16 3 4 2. + <_> + + <_> + 7 6 6 5 -1. + <_> + 9 6 2 5 3. + <_> + + <_> + 17 11 2 7 -1. + <_> + 17 11 1 7 2. + <_> + + <_> + 3 13 8 2 -1. + <_> + 7 13 4 2 2. + <_> + + <_> + 6 9 8 3 -1. + <_> + 6 10 8 1 3. + <_> + + <_> + 4 3 4 3 -1. + <_> + 4 4 4 1 3. + <_> + + <_> + 11 3 4 3 -1. + <_> + 11 4 4 1 3. + <_> + + <_> + 1 4 17 12 -1. + <_> + 1 8 17 4 3. + <_> + + <_> + 11 3 4 3 -1. + <_> + 11 4 4 1 3. + <_> + + <_> + 4 8 6 3 -1. + <_> + 4 9 6 1 3. + <_> + + <_> + 12 3 5 3 -1. + <_> + 12 4 5 1 3. + <_> + + <_> + 1 11 2 7 -1. + <_> + 2 11 1 7 2. + <_> + + <_> + 15 12 2 8 -1. + <_> + 16 12 1 4 2. + <_> + 15 16 1 4 2. + <_> + + <_> + 4 8 11 3 -1. + <_> + 4 9 11 1 3. + <_> + + <_> + 9 13 6 2 -1. + <_> + 12 13 3 1 2. + <_> + 9 14 3 1 2. + <_> + + <_> + 6 13 4 3 -1. + <_> + 6 14 4 1 3. + <_> + + <_> + 9 12 3 3 -1. + <_> + 10 12 1 3 3. + <_> + + <_> + 5 3 3 3 -1. + <_> + 5 4 3 1 3. + <_> + + <_> + 9 4 2 3 -1. + <_> + 9 5 2 1 3. + <_> + + <_> + 0 2 16 3 -1. + <_> + 0 3 16 1 3. + <_> + + <_> + 15 12 2 8 -1. + <_> + 16 12 1 4 2. + <_> + 15 16 1 4 2. + <_> + + <_> + 3 12 2 8 -1. + <_> + 3 12 1 4 2. + <_> + 4 16 1 4 2. + <_> + + <_> + 14 13 3 6 -1. + <_> + 14 15 3 2 3. + <_> + + <_> + 3 13 3 6 -1. + <_> + 3 15 3 2 3. + <_> + + <_> + 6 5 10 2 -1. + <_> + 11 5 5 1 2. + <_> + 6 6 5 1 2. + <_> + + <_> + 2 14 14 6 -1. + <_> + 2 17 14 3 2. + <_> + + <_> + 10 14 1 3 -1. + <_> + 10 15 1 1 3. + <_> + + <_> + 4 16 2 2 -1. + <_> + 4 16 1 1 2. + <_> + 5 17 1 1 2. + <_> + + <_> + 10 6 2 3 -1. + <_> + 10 7 2 1 3. + <_> + + <_> + 0 17 20 2 -1. + <_> + 0 17 10 1 2. + <_> + 10 18 10 1 2. + <_> + + <_> + 13 6 1 3 -1. + <_> + 13 7 1 1 3. + <_> + + <_> + 8 13 3 2 -1. + <_> + 9 13 1 2 3. + <_> + + <_> + 12 2 3 3 -1. + <_> + 13 2 1 3 3. + <_> + + <_> + 3 18 2 2 -1. + <_> + 3 18 1 1 2. + <_> + 4 19 1 1 2. + <_> + + <_> + 9 16 3 4 -1. + <_> + 10 16 1 4 3. + <_> + + <_> + 6 6 1 3 -1. + <_> + 6 7 1 1 3. + <_> + + <_> + 13 1 5 2 -1. + <_> + 13 2 5 1 2. + <_> + + <_> + 7 14 6 2 -1. + <_> + 7 14 3 1 2. + <_> + 10 15 3 1 2. + <_> + + <_> + 11 3 3 4 -1. + <_> + 12 3 1 4 3. + <_> + + <_> + 1 13 12 6 -1. + <_> + 5 13 4 6 3. + <_> + + <_> + 14 11 5 2 -1. + <_> + 14 12 5 1 2. + <_> + + <_> + 2 15 14 4 -1. + <_> + 2 15 7 2 2. + <_> + 9 17 7 2 2. + <_> + + <_> + 3 7 14 2 -1. + <_> + 10 7 7 1 2. + <_> + 3 8 7 1 2. + <_> + + <_> + 1 11 4 2 -1. + <_> + 1 12 4 1 2. + <_> + + <_> + 14 0 6 14 -1. + <_> + 16 0 2 14 3. + <_> + + <_> + 4 11 1 3 -1. + <_> + 4 12 1 1 3. + <_> + + <_> + 14 0 6 14 -1. + <_> + 16 0 2 14 3. + <_> + + <_> + 1 10 3 7 -1. + <_> + 2 10 1 7 3. + <_> + + <_> + 8 12 9 2 -1. + <_> + 8 13 9 1 2. + <_> + + <_> + 0 6 20 1 -1. + <_> + 10 6 10 1 2. + <_> + + <_> + 8 4 4 4 -1. + <_> + 8 4 2 4 2. + <_> + + <_> + 0 0 2 2 -1. + <_> + 0 1 2 1 2. + <_> + + <_> + 5 3 10 9 -1. + <_> + 5 6 10 3 3. + <_> + + <_> + 15 2 4 10 -1. + <_> + 15 2 2 10 2. + <_> + + <_> + 8 2 2 7 -1. + <_> + 9 2 1 7 2. + <_> + + <_> + 7 4 12 1 -1. + <_> + 11 4 4 1 3. + <_> + + <_> + 3 4 9 1 -1. + <_> + 6 4 3 1 3. + <_> + + <_> + 15 10 1 4 -1. + <_> + 15 12 1 2 2. + <_> + + <_> + 4 10 6 4 -1. + <_> + 7 10 3 4 2. + <_> + + <_> + 15 9 1 6 -1. + <_> + 15 12 1 3 2. + <_> + + <_> + 7 17 6 3 -1. + <_> + 7 18 6 1 3. + <_> + + <_> + 14 3 2 16 -1. + <_> + 15 3 1 8 2. + <_> + 14 11 1 8 2. + <_> + + <_> + 4 9 1 6 -1. + <_> + 4 12 1 3 2. + <_> + + <_> + 12 1 5 2 -1. + <_> + 12 2 5 1 2. + <_> + + <_> + 6 18 4 2 -1. + <_> + 6 18 2 1 2. + <_> + 8 19 2 1 2. + <_> + + <_> + 2 4 16 10 -1. + <_> + 10 4 8 5 2. + <_> + 2 9 8 5 2. + <_> + + <_> + 6 5 1 10 -1. + <_> + 6 10 1 5 2. + <_> + + <_> + 4 8 15 2 -1. + <_> + 9 8 5 2 3. + <_> + + <_> + 1 8 15 2 -1. + <_> + 6 8 5 2 3. + <_> + + <_> + 9 5 3 6 -1. + <_> + 9 7 3 2 3. + <_> + + <_> + 5 7 8 2 -1. + <_> + 9 7 4 2 2. + <_> + + <_> + 9 11 2 3 -1. + <_> + 9 12 2 1 3. + <_> + + <_> + 1 0 16 3 -1. + <_> + 1 1 16 1 3. + <_> + + <_> + 11 2 7 2 -1. + <_> + 11 3 7 1 2. + <_> + + <_> + 5 1 10 18 -1. + <_> + 5 7 10 6 3. + <_> + + <_> + 17 4 3 2 -1. + <_> + 18 4 1 2 3. + <_> + + <_> + 8 13 1 3 -1. + <_> + 8 14 1 1 3. + <_> + + <_> + 3 14 14 6 -1. + <_> + 3 16 14 2 3. + <_> + + <_> + 0 2 3 4 -1. + <_> + 1 2 1 4 3. + <_> + + <_> + 12 1 5 2 -1. + <_> + 12 2 5 1 2. + <_> + + <_> + 3 1 5 2 -1. + <_> + 3 2 5 1 2. + <_> + + <_> + 10 13 2 3 -1. + <_> + 10 14 2 1 3. + <_> + + <_> + 8 13 2 3 -1. + <_> + 8 14 2 1 3. + <_> + + <_> + 14 12 2 3 -1. + <_> + 14 13 2 1 3. + <_> + + <_> + 7 2 2 3 -1. + <_> + 7 3 2 1 3. + <_> + + <_> + 5 6 10 4 -1. + <_> + 10 6 5 2 2. + <_> + 5 8 5 2 2. + <_> + + <_> + 9 13 1 6 -1. + <_> + 9 16 1 3 2. + <_> + + <_> + 10 12 2 2 -1. + <_> + 11 12 1 1 2. + <_> + 10 13 1 1 2. + <_> + + <_> + 4 12 2 3 -1. + <_> + 4 13 2 1 3. + <_> + + <_> + 14 4 6 6 -1. + <_> + 14 6 6 2 3. + <_> + + <_> + 8 17 2 3 -1. + <_> + 8 18 2 1 3. + <_> + + <_> + 16 4 4 6 -1. + <_> + 16 6 4 2 3. + <_> + + <_> + 0 4 4 6 -1. + <_> + 0 6 4 2 3. + <_> + + <_> + 14 6 2 3 -1. + <_> + 14 6 1 3 2. + <_> + + <_> + 4 9 8 1 -1. + <_> + 8 9 4 1 2. + <_> + + <_> + 8 12 4 3 -1. + <_> + 8 13 4 1 3. + <_> + + <_> + 5 12 10 6 -1. + <_> + 5 14 10 2 3. + <_> + + <_> + 11 12 1 2 -1. + <_> + 11 13 1 1 2. + <_> + + <_> + 8 15 4 2 -1. + <_> + 8 16 4 1 2. + <_> + + <_> + 6 9 8 8 -1. + <_> + 10 9 4 4 2. + <_> + 6 13 4 4 2. + <_> + + <_> + 7 12 4 6 -1. + <_> + 7 12 2 3 2. + <_> + 9 15 2 3 2. + <_> + + <_> + 10 11 3 1 -1. + <_> + 11 11 1 1 3. + <_> + + <_> + 9 7 2 10 -1. + <_> + 9 7 1 5 2. + <_> + 10 12 1 5 2. + <_> + + <_> + 8 0 6 6 -1. + <_> + 10 0 2 6 3. + <_> + + <_> + 3 11 2 6 -1. + <_> + 3 13 2 2 3. + <_> + + <_> + 16 12 1 2 -1. + <_> + 16 13 1 1 2. + <_> + + <_> + 1 14 6 6 -1. + <_> + 1 14 3 3 2. + <_> + 4 17 3 3 2. + <_> + + <_> + 13 1 3 6 -1. + <_> + 14 1 1 6 3. + <_> + + <_> + 8 8 2 2 -1. + <_> + 8 9 2 1 2. + <_> + + <_> + 9 9 3 3 -1. + <_> + 10 9 1 3 3. + <_> + + <_> + 8 7 3 3 -1. + <_> + 8 8 3 1 3. + <_> + + <_> + 14 0 2 3 -1. + <_> + 14 0 1 3 2. + <_> + + <_> + 1 0 18 9 -1. + <_> + 7 0 6 9 3. + <_> + + <_> + 11 5 4 15 -1. + <_> + 11 5 2 15 2. + <_> + + <_> + 5 5 4 15 -1. + <_> + 7 5 2 15 2. + <_> + + <_> + 14 0 2 3 -1. + <_> + 14 0 1 3 2. + <_> + + <_> + 4 0 2 3 -1. + <_> + 5 0 1 3 2. + <_> + + <_> + 11 12 2 2 -1. + <_> + 12 12 1 1 2. + <_> + 11 13 1 1 2. + <_> + + <_> + 7 12 2 2 -1. + <_> + 7 12 1 1 2. + <_> + 8 13 1 1 2. + <_> + + <_> + 12 0 3 4 -1. + <_> + 13 0 1 4 3. + <_> + + <_> + 4 11 3 3 -1. + <_> + 4 12 3 1 3. + <_> + + <_> + 12 7 4 2 -1. + <_> + 12 8 4 1 2. + <_> + + <_> + 8 10 3 2 -1. + <_> + 9 10 1 2 3. + <_> + + <_> + 9 9 3 2 -1. + <_> + 10 9 1 2 3. + <_> + + <_> + 8 9 3 2 -1. + <_> + 9 9 1 2 3. + <_> + + <_> + 12 0 3 4 -1. + <_> + 13 0 1 4 3. + <_> + + <_> + 5 0 3 4 -1. + <_> + 6 0 1 4 3. + <_> + + <_> + 4 14 12 4 -1. + <_> + 10 14 6 2 2. + <_> + 4 16 6 2 2. + <_> + + <_> + 8 13 2 3 -1. + <_> + 8 14 2 1 3. + <_> + + <_> + 10 10 3 8 -1. + <_> + 10 14 3 4 2. + <_> + + <_> + 8 10 4 8 -1. + <_> + 8 10 2 4 2. + <_> + 10 14 2 4 2. + <_> + + <_> + 10 8 3 1 -1. + <_> + 11 8 1 1 3. + <_> + + <_> + 9 12 1 6 -1. + <_> + 9 15 1 3 2. + <_> + + <_> + 10 8 3 1 -1. + <_> + 11 8 1 1 3. + <_> + + <_> + 7 8 3 1 -1. + <_> + 8 8 1 1 3. + <_> + + <_> + 5 2 15 14 -1. + <_> + 5 9 15 7 2. + <_> + + <_> + 2 1 2 10 -1. + <_> + 2 1 1 5 2. + <_> + 3 6 1 5 2. + <_> + + <_> + 14 14 2 3 -1. + <_> + 14 15 2 1 3. + <_> + + <_> + 2 7 3 3 -1. + <_> + 3 7 1 3 3. + <_> + + <_> + 17 4 3 3 -1. + <_> + 17 5 3 1 3. + <_> + + <_> + 0 4 3 3 -1. + <_> + 0 5 3 1 3. + <_> + + <_> + 13 5 6 2 -1. + <_> + 16 5 3 1 2. + <_> + 13 6 3 1 2. + <_> + + <_> + 4 19 12 1 -1. + <_> + 8 19 4 1 3. + <_> + + <_> + 12 12 2 4 -1. + <_> + 12 14 2 2 2. + <_> + + <_> + 3 15 1 3 -1. + <_> + 3 16 1 1 3. + <_> + + <_> + 11 16 6 4 -1. + <_> + 11 16 3 4 2. + <_> + + <_> + 2 10 3 10 -1. + <_> + 3 10 1 10 3. + <_> + + <_> + 12 8 2 4 -1. + <_> + 12 8 1 4 2. + <_> + + <_> + 6 8 2 4 -1. + <_> + 7 8 1 4 2. + <_> + + <_> + 10 14 2 3 -1. + <_> + 10 14 1 3 2. + <_> + + <_> + 5 1 10 3 -1. + <_> + 10 1 5 3 2. + <_> + + <_> + 10 7 3 2 -1. + <_> + 11 7 1 2 3. + <_> + + <_> + 5 6 9 2 -1. + <_> + 8 6 3 2 3. + <_> + + <_> + 9 8 2 2 -1. + <_> + 9 9 2 1 2. + <_> + + <_> + 2 11 16 6 -1. + <_> + 2 11 8 3 2. + <_> + 10 14 8 3 2. + <_> + + <_> + 12 7 2 2 -1. + <_> + 13 7 1 1 2. + <_> + 12 8 1 1 2. + <_> + + <_> + 9 5 2 3 -1. + <_> + 9 6 2 1 3. + <_> + + <_> + 9 7 3 2 -1. + <_> + 10 7 1 2 3. + <_> + + <_> + 5 1 8 12 -1. + <_> + 5 7 8 6 2. + <_> + + <_> + 13 5 2 2 -1. + <_> + 13 6 2 1 2. + <_> + + <_> + 5 5 2 2 -1. + <_> + 5 6 2 1 2. + <_> + + <_> + 12 4 3 3 -1. + <_> + 12 5 3 1 3. + <_> + + <_> + 4 14 2 3 -1. + <_> + 4 15 2 1 3. + <_> + + <_> + 12 4 3 3 -1. + <_> + 12 5 3 1 3. + <_> + + <_> + 5 4 3 3 -1. + <_> + 5 5 3 1 3. + <_> + + <_> + 9 14 2 6 -1. + <_> + 10 14 1 3 2. + <_> + 9 17 1 3 2. + <_> + + <_> + 8 14 3 2 -1. + <_> + 9 14 1 2 3. + <_> + + <_> + 9 5 6 6 -1. + <_> + 11 5 2 6 3. + <_> + + <_> + 5 5 6 6 -1. + <_> + 7 5 2 6 3. + <_> + + <_> + 13 13 1 2 -1. + <_> + 13 14 1 1 2. + <_> + + <_> + 0 2 10 2 -1. + <_> + 0 3 10 1 2. + <_> + + <_> + 13 13 1 2 -1. + <_> + 13 14 1 1 2. + <_> + + <_> + 5 7 2 2 -1. + <_> + 5 7 1 1 2. + <_> + 6 8 1 1 2. + <_> + + <_> + 13 5 2 7 -1. + <_> + 13 5 1 7 2. + <_> + + <_> + 6 13 1 2 -1. + <_> + 6 14 1 1 2. + <_> + + <_> + 11 0 3 7 -1. + <_> + 12 0 1 7 3. + <_> + + <_> + 0 3 2 16 -1. + <_> + 0 3 1 8 2. + <_> + 1 11 1 8 2. + <_> + + <_> + 11 0 3 7 -1. + <_> + 12 0 1 7 3. + <_> + + <_> + 6 0 3 7 -1. + <_> + 7 0 1 7 3. + <_> + + <_> + 11 16 8 4 -1. + <_> + 11 16 4 4 2. + <_> + + <_> + 1 16 8 4 -1. + <_> + 5 16 4 4 2. + <_> + + <_> + 13 5 2 7 -1. + <_> + 13 5 1 7 2. + <_> + + <_> + 5 5 2 7 -1. + <_> + 6 5 1 7 2. + <_> + + <_> + 18 6 2 14 -1. + <_> + 18 13 2 7 2. + <_> + + <_> + 6 10 3 4 -1. + <_> + 6 12 3 2 2. + <_> + + <_> + 14 7 1 2 -1. + <_> + 14 8 1 1 2. + <_> + + <_> + 0 1 18 6 -1. + <_> + 0 1 9 3 2. + <_> + 9 4 9 3 2. + <_> + + <_> + 14 7 1 2 -1. + <_> + 14 8 1 1 2. + <_> + + <_> + 0 6 2 14 -1. + <_> + 0 13 2 7 2. + <_> + + <_> + 17 0 3 12 -1. + <_> + 18 0 1 12 3. + <_> + + <_> + 0 6 18 3 -1. + <_> + 0 7 18 1 3. + <_> + + <_> + 6 0 14 16 -1. + <_> + 6 8 14 8 2. + <_> + + <_> + 0 0 3 12 -1. + <_> + 1 0 1 12 3. + <_> + + <_> + 13 0 3 7 -1. + <_> + 14 0 1 7 3. + <_> + + <_> + 5 7 1 2 -1. + <_> + 5 8 1 1 2. + <_> + + <_> + 14 4 6 6 -1. + <_> + 14 6 6 2 3. + <_> + + <_> + 5 7 7 2 -1. + <_> + 5 8 7 1 2. + <_> + + <_> + 8 6 6 9 -1. + <_> + 8 9 6 3 3. + <_> + + <_> + 5 4 6 1 -1. + <_> + 7 4 2 1 3. + <_> + + <_> + 13 0 6 4 -1. + <_> + 16 0 3 2 2. + <_> + 13 2 3 2 2. + <_> + + <_> + 1 2 18 12 -1. + <_> + 1 6 18 4 3. + <_> + + <_> + 3 2 17 12 -1. + <_> + 3 6 17 4 3. + <_> + + <_> + 5 14 7 3 -1. + <_> + 5 15 7 1 3. + <_> + + <_> + 10 14 1 3 -1. + <_> + 10 15 1 1 3. + <_> + + <_> + 3 14 3 3 -1. + <_> + 3 15 3 1 3. + <_> + + <_> + 14 4 6 6 -1. + <_> + 14 6 6 2 3. + <_> + + <_> + 0 4 6 6 -1. + <_> + 0 6 6 2 3. + <_> + + <_> + 12 5 4 3 -1. + <_> + 12 6 4 1 3. + <_> + + <_> + 4 5 4 3 -1. + <_> + 4 6 4 1 3. + <_> + + <_> + 18 0 2 6 -1. + <_> + 18 2 2 2 3. + <_> + + <_> + 8 1 4 9 -1. + <_> + 10 1 2 9 2. + <_> + + <_> + 6 6 8 2 -1. + <_> + 6 6 4 2 2. + <_> + + <_> + 6 5 4 2 -1. + <_> + 6 5 2 1 2. + <_> + 8 6 2 1 2. + <_> + + <_> + 10 5 2 3 -1. + <_> + 10 6 2 1 3. + <_> + + <_> + 9 5 1 3 -1. + <_> + 9 6 1 1 3. + <_> + + <_> + 9 10 2 2 -1. + <_> + 9 11 2 1 2. + <_> + + <_> + 0 8 4 3 -1. + <_> + 0 9 4 1 3. + <_> + + <_> + 6 0 8 6 -1. + <_> + 6 3 8 3 2. + <_> + + <_> + 1 0 6 4 -1. + <_> + 1 0 3 2 2. + <_> + 4 2 3 2 2. + <_> + + <_> + 13 0 3 7 -1. + <_> + 14 0 1 7 3. + <_> + + <_> + 9 16 2 2 -1. + <_> + 9 17 2 1 2. + <_> + + <_> + 11 4 6 10 -1. + <_> + 11 9 6 5 2. + <_> + + <_> + 0 10 19 2 -1. + <_> + 0 11 19 1 2. + <_> + + <_> + 9 5 8 9 -1. + <_> + 9 8 8 3 3. + <_> + + <_> + 4 0 3 7 -1. + <_> + 5 0 1 7 3. + <_> + + <_> + 8 6 4 12 -1. + <_> + 10 6 2 6 2. + <_> + 8 12 2 6 2. + <_> + + <_> + 0 2 6 4 -1. + <_> + 0 4 6 2 2. + <_> + + <_> + 8 15 4 3 -1. + <_> + 8 16 4 1 3. + <_> + + <_> + 8 0 3 7 -1. + <_> + 9 0 1 7 3. + <_> + + <_> + 9 5 3 4 -1. + <_> + 10 5 1 4 3. + <_> + + <_> + 8 5 3 4 -1. + <_> + 9 5 1 4 3. + <_> + + <_> + 7 6 6 1 -1. + <_> + 9 6 2 1 3. + <_> + + <_> + 7 14 4 4 -1. + <_> + 7 14 2 2 2. + <_> + 9 16 2 2 2. + <_> + + <_> + 13 14 4 6 -1. + <_> + 15 14 2 3 2. + <_> + 13 17 2 3 2. + <_> + + <_> + 7 8 1 8 -1. + <_> + 7 12 1 4 2. + <_> + + <_> + 16 0 2 8 -1. + <_> + 17 0 1 4 2. + <_> + 16 4 1 4 2. + <_> + + <_> + 2 0 2 8 -1. + <_> + 2 0 1 4 2. + <_> + 3 4 1 4 2. + <_> + + <_> + 6 1 14 3 -1. + <_> + 6 2 14 1 3. + <_> + + <_> + 7 9 3 10 -1. + <_> + 7 14 3 5 2. + <_> + + <_> + 9 14 2 2 -1. + <_> + 9 15 2 1 2. + <_> + + <_> + 7 7 6 8 -1. + <_> + 7 11 6 4 2. + <_> + + <_> + 9 7 3 6 -1. + <_> + 9 10 3 3 2. + <_> + + <_> + 7 13 3 3 -1. + <_> + 7 14 3 1 3. + <_> + + <_> + 9 9 2 2 -1. + <_> + 9 10 2 1 2. + <_> + + <_> + 0 1 18 2 -1. + <_> + 6 1 6 2 3. + <_> + + <_> + 7 1 6 14 -1. + <_> + 7 8 6 7 2. + <_> + + <_> + 1 9 18 1 -1. + <_> + 7 9 6 1 3. + <_> + + <_> + 9 7 2 2 -1. + <_> + 9 7 1 2 2. + <_> + + <_> + 9 3 2 9 -1. + <_> + 10 3 1 9 2. + <_> + + <_> + 18 14 2 3 -1. + <_> + 18 15 2 1 3. + <_> + + <_> + 7 11 3 1 -1. + <_> + 8 11 1 1 3. + <_> + + <_> + 10 8 3 4 -1. + <_> + 11 8 1 4 3. + <_> + + <_> + 7 14 3 6 -1. + <_> + 8 14 1 6 3. + <_> + + <_> + 10 8 3 4 -1. + <_> + 11 8 1 4 3. + <_> + + <_> + 7 8 3 4 -1. + <_> + 8 8 1 4 3. + <_> + + <_> + 7 9 6 9 -1. + <_> + 7 12 6 3 3. + <_> + + <_> + 0 14 2 3 -1. + <_> + 0 15 2 1 3. + <_> + + <_> + 11 12 1 2 -1. + <_> + 11 13 1 1 2. + <_> + + <_> + 4 3 8 3 -1. + <_> + 8 3 4 3 2. + <_> + + <_> + 0 4 20 6 -1. + <_> + 0 4 10 6 2. + <_> + + <_> + 9 14 1 3 -1. + <_> + 9 15 1 1 3. + <_> + + <_> + 8 14 4 3 -1. + <_> + 8 15 4 1 3. + <_> + + <_> + 0 15 14 4 -1. + <_> + 0 17 14 2 2. + <_> + + <_> + 1 14 18 6 -1. + <_> + 1 17 18 3 2. + <_> + + <_> + 0 0 10 6 -1. + <_> + 0 0 5 3 2. + <_> + 5 3 5 3 2. + \ No newline at end of file diff --git a/intelliJ/remote-debugging/README.adoc b/intelliJ/remote-debugging/README.adoc deleted file mode 100644 index 7110a5d7b9..0000000000 --- a/intelliJ/remote-debugging/README.adoc +++ /dev/null @@ -1,85 +0,0 @@ -:toc: -:spring_version: current -:icons: font -:source-highlighter: prettify -:project_id: gs-scheduling-tasks -This guide walks you through the steps for scheduling tasks with Spring. - -== What you'll build - -You'll build an application that prints out the current time every five seconds using Spring's `@Scheduled` annotation. - -== What you'll need - -:java_version: 1.8 -include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/prereq_editor_jdk_buildtools.adoc[] - - -include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/how_to_complete_this_guide.adoc[] - - -include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/hide-show-gradle.adoc[] - -include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/hide-show-maven.adoc[] - -include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/hide-show-sts.adoc[] - - - -[[initial]] -== Create a scheduled task -Now that you've set up your project, you can create a scheduled task. - -`src/main/java/hello/ScheduledTasks.java` -[source,java] ----- -include::complete/src/main/java/hello/ScheduledTasks.java[] ----- - -The `Scheduled` annotation defines when a particular method runs. -NOTE: This example uses `fixedRate`, which specifies the interval between method invocations measured from the start time of each invocation. There are https://docs.spring.io/spring/docs/{spring_version}/spring-framework-reference/html/scheduling.html#scheduling-annotation-support-scheduled[other options], like `fixedDelay`, which specifies the interval between invocations measured from the completion of the task. You can also https://docs.spring.io/spring/docs/{spring_version}/javadoc-api/org/springframework/scheduling/support/CronSequenceGenerator.html[use `@Scheduled(cron=". . .")` expressions for more sophisticated task scheduling]. - -== Enable Scheduling - -Although scheduled tasks can be embedded in web apps and WAR files, the simpler approach demonstrated below creates a standalone application. You package everything in a single, executable JAR file, driven by a good old Java `main()` method. - -`src/main/java/hello/Application.java` -[source,java] ----- -include::complete/src/main/java/hello/Application.java[] ----- - -include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/spring-boot-application.adoc[] - -https://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#scheduling-enable-annotation-support[`@EnableScheduling`] ensures that a background task executor is created. Without it, nothing gets scheduled. - - -include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/build_an_executable_jar_subhead.adoc[] - -include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/build_an_executable_jar_with_both.adoc[] - - - -Logging output is displayed and you can see from the logs that it is on a background thread. You should see your scheduled task fire every 5 seconds: - -.... -[...] -2016-08-25 13:10:00.143 INFO 31565 --- [pool-1-thread-1] hello.ScheduledTasks : The time is now 13:10:00 -2016-08-25 13:10:05.143 INFO 31565 --- [pool-1-thread-1] hello.ScheduledTasks : The time is now 13:10:05 -2016-08-25 13:10:10.143 INFO 31565 --- [pool-1-thread-1] hello.ScheduledTasks : The time is now 13:10:10 -2016-08-25 13:10:15.143 INFO 31565 --- [pool-1-thread-1] hello.ScheduledTasks : The time is now 13:10:15 -.... - -== Summary - -Congratulations! You created an application with a scheduled task. Heck, the actual code was shorter than the build file! This technique works in any type of application. - -== See Also - -The following guides may also be helpful: - -* https://spring.io/guides/gs/spring-boot/[Building an Application with Spring Boot] -* https://spring.io/guides/gs/batch-processing/[Creating a Batch Service] - -include::https://raw.githubusercontent.com/spring-guides/getting-started-macros/master/footer.adoc[] - diff --git a/intelliJ/remote-debugging/README.md b/intelliJ/remote-debugging/README.md new file mode 100644 index 0000000000..54e3e00ace --- /dev/null +++ b/intelliJ/remote-debugging/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [Remote Debugging with IntelliJ IDEA](https://www.baeldung.com/intellij-remote-debugging) diff --git a/intelliJ/remote-debugging/pom.xml b/intelliJ/remote-debugging/pom.xml index 43b9a44d13..b8845e49d2 100644 --- a/intelliJ/remote-debugging/pom.xml +++ b/intelliJ/remote-debugging/pom.xml @@ -9,14 +9,16 @@ gs-scheduling-tasks - org.springframework.boot - spring-boot-starter-parent - 2.1.6.RELEASE + com.baeldung + parent-boot-2 + 0.0.1-SNAPSHOT + ../../parent-boot-2 1.8 3.1.2 + 2.1.6.RELEASE @@ -45,5 +47,4 @@ - diff --git a/jackson-modules/pom.xml b/jackson-modules/pom.xml index a8568c1950..4281710ac9 100644 --- a/jackson-modules/pom.xml +++ b/jackson-modules/pom.xml @@ -21,7 +21,6 @@ jackson-conversions-2 jackson-custom-conversions jackson-exceptions - jackson-simple diff --git a/jackson-modules/jackson-simple/README.md b/jackson-simple/README.md similarity index 87% rename from jackson-modules/jackson-simple/README.md rename to jackson-simple/README.md index ffc76ead22..41aee8cac9 100644 --- a/jackson-modules/jackson-simple/README.md +++ b/jackson-simple/README.md @@ -16,4 +16,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring ### NOTE: -Since this is a module tied to an e-book, it should **not** be used to store the code for any further article. +Since this is a module tied to an e-book, it should **not** be moved or used to store the code for any further article. diff --git a/jackson-modules/jackson-simple/pom.xml b/jackson-simple/pom.xml similarity index 77% rename from jackson-modules/jackson-simple/pom.xml rename to jackson-simple/pom.xml index fef28e4359..f41df7085c 100644 --- a/jackson-modules/jackson-simple/pom.xml +++ b/jackson-simple/pom.xml @@ -8,11 +8,18 @@ com.baeldung - jackson-modules + parent-java 0.0.1-SNAPSHOT + ../parent-java + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson.version} + org.assertj diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/AliasBean.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/AliasBean.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/AliasBean.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/AliasBean.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithCreator.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithCreator.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithCreator.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithCreator.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithCustomAnnotation.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithCustomAnnotation.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithCustomAnnotation.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithCustomAnnotation.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithFilter.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithFilter.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithFilter.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithFilter.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithGetter.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithGetter.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithGetter.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithGetter.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithIgnore.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithIgnore.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithIgnore.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithIgnore.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithInject.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithInject.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithInject.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/BeanWithInject.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/ExtendableBean.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/ExtendableBean.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/ExtendableBean.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/ExtendableBean.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/MyBean.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/MyBean.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/MyBean.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/MyBean.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/PrivateBean.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/PrivateBean.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/PrivateBean.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/PrivateBean.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/RawBean.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/RawBean.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/RawBean.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/RawBean.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/UnwrappedUser.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/UnwrappedUser.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/UnwrappedUser.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/UnwrappedUser.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/UserWithIgnoreType.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/UserWithIgnoreType.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/UserWithIgnoreType.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/UserWithIgnoreType.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/Zoo.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/Zoo.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/Zoo.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/Zoo.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/ItemWithIdentity.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/ItemWithIdentity.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/ItemWithIdentity.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/ItemWithIdentity.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/ItemWithIgnore.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/ItemWithIgnore.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/ItemWithIgnore.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/ItemWithIgnore.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/ItemWithRef.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/ItemWithRef.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/ItemWithRef.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/ItemWithRef.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/UserWithIdentity.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/UserWithIdentity.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/UserWithIdentity.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/UserWithIdentity.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/UserWithIgnore.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/UserWithIgnore.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/UserWithIgnore.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/UserWithIgnore.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/UserWithRef.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/UserWithRef.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/UserWithRef.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/bidirection/UserWithRef.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/date/CustomDateDeserializer.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/date/CustomDateDeserializer.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/date/CustomDateDeserializer.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/date/CustomDateDeserializer.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/date/CustomDateSerializer.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/date/CustomDateSerializer.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/date/CustomDateSerializer.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/date/CustomDateSerializer.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/date/EventWithFormat.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/date/EventWithFormat.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/date/EventWithFormat.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/date/EventWithFormat.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/date/EventWithSerializer.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/date/EventWithSerializer.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/date/EventWithSerializer.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/date/EventWithSerializer.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/deserialization/ItemDeserializerOnClass.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/deserialization/ItemDeserializerOnClass.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/deserialization/ItemDeserializerOnClass.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/deserialization/ItemDeserializerOnClass.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/dtos/Item.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/dtos/Item.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/dtos/Item.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/dtos/Item.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/dtos/ItemWithSerializer.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/dtos/ItemWithSerializer.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/dtos/ItemWithSerializer.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/dtos/ItemWithSerializer.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/dtos/User.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/dtos/User.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/dtos/User.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/dtos/User.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/dtos/withEnum/DistanceEnumWithValue.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/dtos/withEnum/DistanceEnumWithValue.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/dtos/withEnum/DistanceEnumWithValue.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/dtos/withEnum/DistanceEnumWithValue.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/exception/UserWithRoot.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/exception/UserWithRoot.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/exception/UserWithRoot.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/exception/UserWithRoot.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/exception/UserWithRootNamespace.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/exception/UserWithRootNamespace.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/exception/UserWithRootNamespace.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/exception/UserWithRootNamespace.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/ignore/MyMixInForIgnoreType.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/ignore/MyMixInForIgnoreType.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/ignore/MyMixInForIgnoreType.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/ignore/MyMixInForIgnoreType.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/jsonview/Item.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/jsonview/Item.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/jsonview/Item.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/jsonview/Item.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/jsonview/Views.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/jsonview/Views.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/jsonview/Views.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/jsonview/Views.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/serialization/ItemSerializer.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/serialization/ItemSerializer.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/serialization/ItemSerializer.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/serialization/ItemSerializer.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/serialization/ItemSerializerOnClass.java b/jackson-simple/src/main/java/com/baeldung/jackson/annotation/serialization/ItemSerializerOnClass.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/annotation/serialization/ItemSerializerOnClass.java rename to jackson-simple/src/main/java/com/baeldung/jackson/annotation/serialization/ItemSerializerOnClass.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDto.java b/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDto.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDto.java rename to jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDto.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoIgnoreField.java b/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoIgnoreField.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoIgnoreField.java rename to jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoIgnoreField.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoIgnoreFieldByName.java b/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoIgnoreFieldByName.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoIgnoreFieldByName.java rename to jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoIgnoreFieldByName.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoIgnoreNull.java b/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoIgnoreNull.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoIgnoreNull.java rename to jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoIgnoreNull.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoIncludeNonDefault.java b/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoIncludeNonDefault.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoIncludeNonDefault.java rename to jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoIncludeNonDefault.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoWithFilter.java b/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoWithFilter.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoWithFilter.java rename to jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoWithFilter.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoWithSpecialField.java b/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoWithSpecialField.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoWithSpecialField.java rename to jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyDtoWithSpecialField.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyMixInForIgnoreType.java b/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyMixInForIgnoreType.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyMixInForIgnoreType.java rename to jackson-simple/src/main/java/com/baeldung/jackson/ignore/MyMixInForIgnoreType.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignorenullfields/MyDto.java b/jackson-simple/src/main/java/com/baeldung/jackson/ignorenullfields/MyDto.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignorenullfields/MyDto.java rename to jackson-simple/src/main/java/com/baeldung/jackson/ignorenullfields/MyDto.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignorenullfields/MyDtoIgnoreNull.java b/jackson-simple/src/main/java/com/baeldung/jackson/ignorenullfields/MyDtoIgnoreNull.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/ignorenullfields/MyDtoIgnoreNull.java rename to jackson-simple/src/main/java/com/baeldung/jackson/ignorenullfields/MyDtoIgnoreNull.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/jsonproperty/MyDto.java b/jackson-simple/src/main/java/com/baeldung/jackson/jsonproperty/MyDto.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/jsonproperty/MyDto.java rename to jackson-simple/src/main/java/com/baeldung/jackson/jsonproperty/MyDto.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/jsonproperty/MyDtoFieldNameChanged.java b/jackson-simple/src/main/java/com/baeldung/jackson/jsonproperty/MyDtoFieldNameChanged.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/jsonproperty/MyDtoFieldNameChanged.java rename to jackson-simple/src/main/java/com/baeldung/jackson/jsonproperty/MyDtoFieldNameChanged.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/objectmapper/CustomCarDeserializer.java b/jackson-simple/src/main/java/com/baeldung/jackson/objectmapper/CustomCarDeserializer.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/objectmapper/CustomCarDeserializer.java rename to jackson-simple/src/main/java/com/baeldung/jackson/objectmapper/CustomCarDeserializer.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/objectmapper/CustomCarSerializer.java b/jackson-simple/src/main/java/com/baeldung/jackson/objectmapper/CustomCarSerializer.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/objectmapper/CustomCarSerializer.java rename to jackson-simple/src/main/java/com/baeldung/jackson/objectmapper/CustomCarSerializer.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/objectmapper/dto/Car.java b/jackson-simple/src/main/java/com/baeldung/jackson/objectmapper/dto/Car.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/objectmapper/dto/Car.java rename to jackson-simple/src/main/java/com/baeldung/jackson/objectmapper/dto/Car.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/objectmapper/dto/Request.java b/jackson-simple/src/main/java/com/baeldung/jackson/objectmapper/dto/Request.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/objectmapper/dto/Request.java rename to jackson-simple/src/main/java/com/baeldung/jackson/objectmapper/dto/Request.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/unknownproperties/MyDto.java b/jackson-simple/src/main/java/com/baeldung/jackson/unknownproperties/MyDto.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/unknownproperties/MyDto.java rename to jackson-simple/src/main/java/com/baeldung/jackson/unknownproperties/MyDto.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/unknownproperties/MyDtoIgnoreType.java b/jackson-simple/src/main/java/com/baeldung/jackson/unknownproperties/MyDtoIgnoreType.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/unknownproperties/MyDtoIgnoreType.java rename to jackson-simple/src/main/java/com/baeldung/jackson/unknownproperties/MyDtoIgnoreType.java diff --git a/jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/unknownproperties/MyDtoIgnoreUnknown.java b/jackson-simple/src/main/java/com/baeldung/jackson/unknownproperties/MyDtoIgnoreUnknown.java similarity index 100% rename from jackson-modules/jackson-simple/src/main/java/com/baeldung/jackson/unknownproperties/MyDtoIgnoreUnknown.java rename to jackson-simple/src/main/java/com/baeldung/jackson/unknownproperties/MyDtoIgnoreUnknown.java diff --git a/jackson-modules/jackson-simple/src/main/resources/logback.xml b/jackson-simple/src/main/resources/logback.xml similarity index 100% rename from jackson-modules/jackson-simple/src/main/resources/logback.xml rename to jackson-simple/src/main/resources/logback.xml diff --git a/jackson-modules/jackson-simple/src/test/java/com/baeldung/jackson/annotation/JacksonAnnotationUnitTest.java b/jackson-simple/src/test/java/com/baeldung/jackson/annotation/JacksonAnnotationUnitTest.java similarity index 100% rename from jackson-modules/jackson-simple/src/test/java/com/baeldung/jackson/annotation/JacksonAnnotationUnitTest.java rename to jackson-simple/src/test/java/com/baeldung/jackson/annotation/JacksonAnnotationUnitTest.java diff --git a/jackson-modules/jackson-simple/src/test/java/com/baeldung/jackson/ignore/IgnoreFieldsWithFilterUnitTest.java b/jackson-simple/src/test/java/com/baeldung/jackson/ignore/IgnoreFieldsWithFilterUnitTest.java similarity index 100% rename from jackson-modules/jackson-simple/src/test/java/com/baeldung/jackson/ignore/IgnoreFieldsWithFilterUnitTest.java rename to jackson-simple/src/test/java/com/baeldung/jackson/ignore/IgnoreFieldsWithFilterUnitTest.java diff --git a/jackson-modules/jackson-simple/src/test/java/com/baeldung/jackson/ignore/JacksonSerializationIgnoreUnitTest.java b/jackson-simple/src/test/java/com/baeldung/jackson/ignore/JacksonSerializationIgnoreUnitTest.java similarity index 100% rename from jackson-modules/jackson-simple/src/test/java/com/baeldung/jackson/ignore/JacksonSerializationIgnoreUnitTest.java rename to jackson-simple/src/test/java/com/baeldung/jackson/ignore/JacksonSerializationIgnoreUnitTest.java diff --git a/jackson-modules/jackson-simple/src/test/java/com/baeldung/jackson/ignorenullfields/IgnoreNullFieldsUnitTest.java b/jackson-simple/src/test/java/com/baeldung/jackson/ignorenullfields/IgnoreNullFieldsUnitTest.java similarity index 100% rename from jackson-modules/jackson-simple/src/test/java/com/baeldung/jackson/ignorenullfields/IgnoreNullFieldsUnitTest.java rename to jackson-simple/src/test/java/com/baeldung/jackson/ignorenullfields/IgnoreNullFieldsUnitTest.java diff --git a/jackson-modules/jackson-simple/src/test/java/com/baeldung/jackson/jsonproperty/JsonPropertyUnitTest.java b/jackson-simple/src/test/java/com/baeldung/jackson/jsonproperty/JsonPropertyUnitTest.java similarity index 100% rename from jackson-modules/jackson-simple/src/test/java/com/baeldung/jackson/jsonproperty/JsonPropertyUnitTest.java rename to jackson-simple/src/test/java/com/baeldung/jackson/jsonproperty/JsonPropertyUnitTest.java diff --git a/jackson-modules/jackson-simple/src/test/java/com/baeldung/jackson/objectmapper/JavaReadWriteJsonExampleUnitTest.java b/jackson-simple/src/test/java/com/baeldung/jackson/objectmapper/JavaReadWriteJsonExampleUnitTest.java similarity index 100% rename from jackson-modules/jackson-simple/src/test/java/com/baeldung/jackson/objectmapper/JavaReadWriteJsonExampleUnitTest.java rename to jackson-simple/src/test/java/com/baeldung/jackson/objectmapper/JavaReadWriteJsonExampleUnitTest.java diff --git a/jackson-modules/jackson-simple/src/test/java/com/baeldung/jackson/objectmapper/SerializationDeserializationFeatureUnitTest.java b/jackson-simple/src/test/java/com/baeldung/jackson/objectmapper/SerializationDeserializationFeatureUnitTest.java similarity index 100% rename from jackson-modules/jackson-simple/src/test/java/com/baeldung/jackson/objectmapper/SerializationDeserializationFeatureUnitTest.java rename to jackson-simple/src/test/java/com/baeldung/jackson/objectmapper/SerializationDeserializationFeatureUnitTest.java diff --git a/jackson-modules/jackson-simple/src/test/java/com/baeldung/jackson/unknownproperties/UnknownPropertiesUnitTest.java b/jackson-simple/src/test/java/com/baeldung/jackson/unknownproperties/UnknownPropertiesUnitTest.java similarity index 100% rename from jackson-modules/jackson-simple/src/test/java/com/baeldung/jackson/unknownproperties/UnknownPropertiesUnitTest.java rename to jackson-simple/src/test/java/com/baeldung/jackson/unknownproperties/UnknownPropertiesUnitTest.java diff --git a/jackson-modules/jackson-simple/src/test/resources/json_car.json b/jackson-simple/src/test/resources/json_car.json similarity index 100% rename from jackson-modules/jackson-simple/src/test/resources/json_car.json rename to jackson-simple/src/test/resources/json_car.json diff --git a/java-ee-8-security-api/README.md b/java-ee-8-security-api/README.md index b01a073e35..17142f8102 100644 --- a/java-ee-8-security-api/README.md +++ b/java-ee-8-security-api/README.md @@ -4,4 +4,4 @@ This module contains articles about the Security API in Java EE 8. ### Relevant articles - - [Java EE 8 Security API](https://www.baeldung.com/java-ee-8-security) + - [Jakarta EE 8 Security API](https://www.baeldung.com/java-ee-8-security) diff --git a/java-numbers-2/README.md b/java-numbers-2/README.md index e200c4aa03..2d0d5443b1 100644 --- a/java-numbers-2/README.md +++ b/java-numbers-2/README.md @@ -15,4 +15,5 @@ This module contains articles about numbers in Java. - [Binary Numbers in Java](https://www.baeldung.com/java-binary-numbers) - [Generating Random Numbers in a Range in Java](https://www.baeldung.com/java-generating-random-numbers) - [Listing Numbers Within a Range in Java](https://www.baeldung.com/java-listing-numbers-within-a-range) +- [Fibonacci Series in Java](https://www.baeldung.com/java-fibonacci) - More articles: [[<-- prev]](/../java-numbers) diff --git a/java-numbers-3/README.md b/java-numbers-3/README.md new file mode 100644 index 0000000000..08e8dae8ef --- /dev/null +++ b/java-numbers-3/README.md @@ -0,0 +1,4 @@ +### Relevant Articles: + +- [Generating Random Numbers](https://www.baeldung.com/java-generating-random-numbers) +- [Convert Double to Long in Java](https://www.baeldung.com/java-convert-double-long) diff --git a/java-numbers-3/pom.xml b/java-numbers-3/pom.xml index e3c64064c7..bf5fe9b0e7 100644 --- a/java-numbers-3/pom.xml +++ b/java-numbers-3/pom.xml @@ -17,7 +17,7 @@ it.unimi.dsi dsiutils - 2.6.0 + ${dsiutils.version} @@ -31,4 +31,8 @@ + + 2.6.0 + + diff --git a/javax-servlets/README.md b/javax-servlets/README.md index 085cc04f87..7dbe1a02ad 100644 --- a/javax-servlets/README.md +++ b/javax-servlets/README.md @@ -9,6 +9,6 @@ This module contains articles about Servlets. - [Uploading Files with Servlets and JSP](https://www.baeldung.com/upload-file-servlet) - [Example of Downloading File in a Servlet](https://www.baeldung.com/servlet-download-file) - [Returning a JSON Response from a Servlet](https://www.baeldung.com/servlet-json-response) -- [Java EE Servlet Exception Handling](https://www.baeldung.com/servlet-exceptions) +- [Jakarta EE Servlet Exception Handling](https://www.baeldung.com/servlet-exceptions) - [Context and Servlet Initialization Parameters](https://www.baeldung.com/context-servlet-initialization-param) - [The Difference between getRequestURI and getPathInfo in HttpServletRequest](https://www.baeldung.com/http-servlet-request-requesturi-pathinfo) diff --git a/jee-7-security/README.md b/jee-7-security/README.md index ced2beec46..0d95d81474 100644 --- a/jee-7-security/README.md +++ b/jee-7-security/README.md @@ -3,4 +3,4 @@ This module contains articles about security in JEE 7. ### Relevant Articles: -- [Securing Java EE with Spring Security](https://www.baeldung.com/java-ee-spring-security) +- [Securing Jakarta EE with Spring Security](https://www.baeldung.com/java-ee-spring-security) diff --git a/jee-7/README.md b/jee-7/README.md index 2c45fe2c67..adaee67d74 100644 --- a/jee-7/README.md +++ b/jee-7/README.md @@ -3,7 +3,7 @@ This module contains articles about JEE 7. ### Relevant Articles: -- [Scheduling in Java EE](https://www.baeldung.com/scheduling-in-java-enterprise-edition) +- [Scheduling in Jakarta EE](https://www.baeldung.com/scheduling-in-java-enterprise-edition) - [JSON Processing in Java EE 7](https://www.baeldung.com/jee7-json) - [Converters, Listeners and Validators in Java EE 7](https://www.baeldung.com/java-ee7-converter-listener-validator) - [Introduction to JAX-WS](https://www.baeldung.com/jax-ws) diff --git a/jee-7/src/test/java/com/baeldung/batch/understanding/SimpleBatchLetUnitTest.java b/jee-7/src/test/java/com/baeldung/batch/understanding/SimpleBatchLetUnitTest.java index ade492b1b9..3babf9b5aa 100644 --- a/jee-7/src/test/java/com/baeldung/batch/understanding/SimpleBatchLetUnitTest.java +++ b/jee-7/src/test/java/com/baeldung/batch/understanding/SimpleBatchLetUnitTest.java @@ -1,13 +1,17 @@ package com.baeldung.batch.understanding; -import static org.junit.jupiter.api.Assertions.*; -import java.util.Properties; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + import javax.batch.operations.JobOperator; import javax.batch.runtime.BatchRuntime; import javax.batch.runtime.BatchStatus; import javax.batch.runtime.JobExecution; -import org.junit.jupiter.api.Test; +import java.util.Properties; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@Disabled("Should be fixed in BAEL-3812") class SimpleBatchLetUnitTest { @Test public void givenBatchLet_thenBatch_CompleteWithSuccess() throws Exception { diff --git a/jee-7/src/test/java/com/baeldung/batch/understanding/SimpleErrorChunkUnitTest.java b/jee-7/src/test/java/com/baeldung/batch/understanding/SimpleErrorChunkUnitTest.java index ded31b6345..c53561a0c0 100644 --- a/jee-7/src/test/java/com/baeldung/batch/understanding/SimpleErrorChunkUnitTest.java +++ b/jee-7/src/test/java/com/baeldung/batch/understanding/SimpleErrorChunkUnitTest.java @@ -1,21 +1,19 @@ package com.baeldung.batch.understanding; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; -import java.util.List; -import java.util.Map; -import java.util.Properties; import javax.batch.operations.JobOperator; import javax.batch.runtime.BatchRuntime; import javax.batch.runtime.BatchStatus; import javax.batch.runtime.JobExecution; -import javax.batch.runtime.Metric.MetricType; import javax.batch.runtime.StepExecution; +import java.util.List; +import java.util.Properties; -import org.junit.jupiter.api.Test; +import static org.junit.Assert.assertEquals; +@Disabled("Should be fixed in BAEL-3812") class SimpleErrorChunkUnitTest { @Test diff --git a/jee-kotlin/README.md b/jee-kotlin/README.md index aa3aa58b4e..e8975a7f62 100644 --- a/jee-kotlin/README.md +++ b/jee-kotlin/README.md @@ -3,4 +3,4 @@ This module contains articles about Java EE with Kotlin. ### Relevant Articles: -- [Java EE Application with Kotlin](https://www.baeldung.com/java-ee-kotlin-app) +- [Jakarta EE Application with Kotlin](https://www.baeldung.com/java-ee-kotlin-app) diff --git a/jhipster/jhipster-uaa/quotes/pom.xml b/jhipster/jhipster-uaa/quotes/pom.xml index 81ab23471f..aacc6f8e36 100644 --- a/jhipster/jhipster-uaa/quotes/pom.xml +++ b/jhipster/jhipster-uaa/quotes/pom.xml @@ -232,7 +232,7 @@ org.zalando problem-spring-web - 0.24.0-RC.0 + ${zalando.version} org.springframework.security.oauth @@ -910,5 +910,6 @@ ${project.basedir}/src/test/ + 0.24.0-RC.0 diff --git a/json-2/README.md b/json-2/README.md index e7c3043339..b0f49f0e48 100644 --- a/json-2/README.md +++ b/json-2/README.md @@ -3,3 +3,4 @@ This module contains articles about JSON. ### Relevant Articles: +- [Introduction to Jsoniter](https://www.baeldung.com/java-jsoniter) diff --git a/jta/README.md b/jta/README.md index 0351177a0d..202019118d 100644 --- a/jta/README.md +++ b/jta/README.md @@ -3,4 +3,4 @@ This module contains articles about the Java Transaction API (JTA). ### Relevant Articles: -- [Guide to Java EE JTA](https://www.baeldung.com/jee-jta) +- [Guide to Jakarta EE JTA](https://www.baeldung.com/jee-jta) diff --git a/kotlin-libraries-2/README.md b/kotlin-libraries-2/README.md index 4064ef67d8..f725048acd 100644 --- a/kotlin-libraries-2/README.md +++ b/kotlin-libraries-2/README.md @@ -8,4 +8,7 @@ This module contains articles about Kotlin Libraries. - [Introduction to RxKotlin](https://www.baeldung.com/rxkotlin) - [MockK: A Mocking Library for Kotlin](https://www.baeldung.com/kotlin-mockk) - [Kotlin Immutable Collections](https://www.baeldung.com/kotlin-immutable-collections) +- [Dependency Injection for Kotlin with Injekt](https://www.baeldung.com/kotlin-dependency-injection-with-injekt) +- [Fuel HTTP Library with Kotlin](https://www.baeldung.com/kotlin-fuel) +- [Introduction to Kovenant Library for Kotlin](https://www.baeldung.com/kotlin-kovenant) - More articles: [[<-- prev]](/kotlin-libraries) diff --git a/kotlin-libraries-2/pom.xml b/kotlin-libraries-2/pom.xml index 518142403e..254f2c6907 100644 --- a/kotlin-libraries-2/pom.xml +++ b/kotlin-libraries-2/pom.xml @@ -21,7 +21,7 @@ io.reactivex.rxjava2 rxkotlin - 2.3.0 + ${rxkotlin.version} junit @@ -39,6 +39,37 @@ kotlinx-collections-immutable ${kotlinx-collections-immutable.version} + + uy.kohesive.injekt + injekt-core + ${injekt-core.version} + + + com.github.kittinunf.fuel + fuel + ${fuel.version} + + + com.github.kittinunf.fuel + fuel-gson + ${fuel.version} + + + com.github.kittinunf.fuel + fuel-rxjava + ${fuel.version} + + + com.github.kittinunf.fuel + fuel-coroutines + ${fuel.version} + + + nl.komponents.kovenant + kovenant + ${kovenant.version} + pom + io.mockk @@ -49,9 +80,13 @@ + 1.16.1 + 1.15.0 + 3.3.0 27.1-jre 1.9.3 0.1 + 2.3.0 diff --git a/core-kotlin/src/main/kotlin/com/baeldung/fuel/Interceptors.kt b/kotlin-libraries-2/src/main/kotlin/com/baeldung/fuel/Interceptors.kt similarity index 100% rename from core-kotlin/src/main/kotlin/com/baeldung/fuel/Interceptors.kt rename to kotlin-libraries-2/src/main/kotlin/com/baeldung/fuel/Interceptors.kt diff --git a/core-kotlin/src/main/kotlin/com/baeldung/fuel/Post.kt b/kotlin-libraries-2/src/main/kotlin/com/baeldung/fuel/Post.kt similarity index 100% rename from core-kotlin/src/main/kotlin/com/baeldung/fuel/Post.kt rename to kotlin-libraries-2/src/main/kotlin/com/baeldung/fuel/Post.kt diff --git a/core-kotlin/src/main/kotlin/com/baeldung/fuel/PostRoutingAPI.kt b/kotlin-libraries-2/src/main/kotlin/com/baeldung/fuel/PostRoutingAPI.kt similarity index 100% rename from core-kotlin/src/main/kotlin/com/baeldung/fuel/PostRoutingAPI.kt rename to kotlin-libraries-2/src/main/kotlin/com/baeldung/fuel/PostRoutingAPI.kt diff --git a/core-kotlin/src/main/kotlin/com/baeldung/injekt/DelegateInjectionApplication.kt b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/DelegateInjectionApplication.kt similarity index 100% rename from core-kotlin/src/main/kotlin/com/baeldung/injekt/DelegateInjectionApplication.kt rename to kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/DelegateInjectionApplication.kt diff --git a/core-kotlin/src/main/kotlin/com/baeldung/injekt/KeyedApplication.kt b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/KeyedApplication.kt similarity index 80% rename from core-kotlin/src/main/kotlin/com/baeldung/injekt/KeyedApplication.kt rename to kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/KeyedApplication.kt index 744459b7fe..4205678981 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/injekt/KeyedApplication.kt +++ b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/KeyedApplication.kt @@ -1,8 +1,12 @@ package com.baeldung.injekt import org.slf4j.LoggerFactory -import uy.kohesive.injekt.* -import uy.kohesive.injekt.api.* +import uy.kohesive.injekt.Injekt +import uy.kohesive.injekt.InjektMain +import uy.kohesive.injekt.api.InjektRegistrar +import uy.kohesive.injekt.api.addPerKeyFactory +import uy.kohesive.injekt.api.addSingletonFactory +import uy.kohesive.injekt.api.get class KeyedApplication { companion object : InjektMain() { diff --git a/core-kotlin/src/main/kotlin/com/baeldung/injekt/ModularApplication.kt b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/ModularApplication.kt similarity index 94% rename from core-kotlin/src/main/kotlin/com/baeldung/injekt/ModularApplication.kt rename to kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/ModularApplication.kt index e802f3f6d5..96a0c9556a 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/injekt/ModularApplication.kt +++ b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/ModularApplication.kt @@ -1,7 +1,8 @@ package com.baeldung.injekt import org.slf4j.LoggerFactory -import uy.kohesive.injekt.* +import uy.kohesive.injekt.Injekt +import uy.kohesive.injekt.InjektMain import uy.kohesive.injekt.api.* class ModularApplication { diff --git a/core-kotlin/src/main/kotlin/com/baeldung/injekt/PerThreadApplication.kt b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/PerThreadApplication.kt similarity index 84% rename from core-kotlin/src/main/kotlin/com/baeldung/injekt/PerThreadApplication.kt rename to kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/PerThreadApplication.kt index a42f314349..f3167bc223 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/injekt/PerThreadApplication.kt +++ b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/PerThreadApplication.kt @@ -1,8 +1,12 @@ package com.baeldung.injekt import org.slf4j.LoggerFactory -import uy.kohesive.injekt.* -import uy.kohesive.injekt.api.* +import uy.kohesive.injekt.Injekt +import uy.kohesive.injekt.InjektMain +import uy.kohesive.injekt.api.InjektRegistrar +import uy.kohesive.injekt.api.addPerThreadFactory +import uy.kohesive.injekt.api.addSingletonFactory +import uy.kohesive.injekt.api.get import java.util.* import java.util.concurrent.Executors import java.util.concurrent.TimeUnit diff --git a/core-kotlin/src/main/kotlin/com/baeldung/injekt/SimpleApplication.kt b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/SimpleApplication.kt similarity index 75% rename from core-kotlin/src/main/kotlin/com/baeldung/injekt/SimpleApplication.kt rename to kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/SimpleApplication.kt index 2b07cd059f..5c2dc28ba5 100644 --- a/core-kotlin/src/main/kotlin/com/baeldung/injekt/SimpleApplication.kt +++ b/kotlin-libraries-2/src/main/kotlin/com/baeldung/injekt/SimpleApplication.kt @@ -1,8 +1,12 @@ package com.baeldung.injekt import org.slf4j.LoggerFactory -import uy.kohesive.injekt.* -import uy.kohesive.injekt.api.* +import uy.kohesive.injekt.Injekt +import uy.kohesive.injekt.InjektMain +import uy.kohesive.injekt.api.InjektRegistrar +import uy.kohesive.injekt.api.addSingleton +import uy.kohesive.injekt.api.addSingletonFactory +import uy.kohesive.injekt.api.get class SimpleApplication { companion object : InjektMain() { diff --git a/core-kotlin/src/test/kotlin/com/baeldung/fuel/FuelHttpUnitTest.kt b/kotlin-libraries-2/src/test/kotlin/com/baeldung/fuel/FuelHttpUnitTest.kt similarity index 100% rename from core-kotlin/src/test/kotlin/com/baeldung/fuel/FuelHttpUnitTest.kt rename to kotlin-libraries-2/src/test/kotlin/com/baeldung/fuel/FuelHttpUnitTest.kt diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/KovenantTest.kt b/kotlin-libraries-2/src/test/kotlin/com/baeldung/kovenant/KovenantTest.kt similarity index 99% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/KovenantTest.kt rename to kotlin-libraries-2/src/test/kotlin/com/baeldung/kovenant/KovenantTest.kt index 469118f0f6..046b7380f7 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/KovenantTest.kt +++ b/kotlin-libraries-2/src/test/kotlin/com/baeldung/kovenant/KovenantTest.kt @@ -1,4 +1,4 @@ -package com.baeldung.kotlin +package com.baeldung.kovenant import nl.komponents.kovenant.* import nl.komponents.kovenant.Kovenant.deferred @@ -12,6 +12,7 @@ import java.util.* import java.util.concurrent.TimeUnit class KovenantTest { + @Before fun setupTestMode() { Kovenant.testMode { error -> diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/KovenantTimeoutTest.kt b/kotlin-libraries-2/src/test/kotlin/com/baeldung/kovenant/KovenantTimeoutTest.kt similarity index 96% rename from core-kotlin/src/test/kotlin/com/baeldung/kotlin/KovenantTimeoutTest.kt rename to kotlin-libraries-2/src/test/kotlin/com/baeldung/kovenant/KovenantTimeoutTest.kt index e37d2cc2fa..d98f9c538f 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/KovenantTimeoutTest.kt +++ b/kotlin-libraries-2/src/test/kotlin/com/baeldung/kovenant/KovenantTimeoutTest.kt @@ -1,4 +1,4 @@ -package com.baeldung.kotlin +package com.baeldung.kovenant import nl.komponents.kovenant.Promise import nl.komponents.kovenant.any diff --git a/kotlin-libraries/README.md b/kotlin-libraries/README.md index 99a57c8293..570bf9b1e5 100644 --- a/kotlin-libraries/README.md +++ b/kotlin-libraries/README.md @@ -10,7 +10,6 @@ This module contains articles about Kotlin Libraries. - [Writing Specifications with Kotlin and Spek](https://www.baeldung.com/kotlin-spek) - [Processing JSON with Kotlin and Klaxson](https://www.baeldung.com/kotlin-json-klaxson) - [Guide to the Kotlin Exposed Framework](https://www.baeldung.com/kotlin-exposed-persistence) -- [Working with Dates in Kotlin](https://www.baeldung.com/kotlin-dates) - [Introduction to Arrow in Kotlin](https://www.baeldung.com/kotlin-arrow) - [Kotlin with Ktor](https://www.baeldung.com/kotlin-ktor) - [REST API With Kotlin and Kovert](https://www.baeldung.com/kotlin-kovert) diff --git a/kotlin-quasar/pom.xml b/kotlin-quasar/pom.xml index f5fbce6ed7..ec37fa8059 100644 --- a/kotlin-quasar/pom.xml +++ b/kotlin-quasar/pom.xml @@ -48,7 +48,7 @@ junit junit - 4.12 + ${junit.version} @@ -148,6 +148,7 @@ 3.1.1 2.22.1 1.3.2 + 4.12 diff --git a/libraries-2/README.md b/libraries-2/README.md index 95c454edbb..eb45a3e426 100644 --- a/libraries-2/README.md +++ b/libraries-2/README.md @@ -18,7 +18,7 @@ Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-m - [Key Value Store with Chronicle Map](https://www.baeldung.com/java-chronicle-map) - [Guide to MapDB](https://www.baeldung.com/mapdb) - [A Guide to Apache Mesos](https://www.baeldung.com/apache-mesos) -- [JasperReports with Spring](https://www.baeldung.com/spring-jasper)] +- [JasperReports with Spring](https://www.baeldung.com/spring-jasper) - [Jetty ReactiveStreams HTTP Client](https://www.baeldung.com/jetty-reactivestreams-http-client) - More articles [[<-- prev]](/libraries) diff --git a/libraries-2/src/test/java/com/baeldung/handlebars/BuiltinHelperUnitTest.java b/libraries-2/src/test/java/com/baeldung/handlebars/BuiltinHelperUnitTest.java index aa29e4c441..357bb7df89 100644 --- a/libraries-2/src/test/java/com/baeldung/handlebars/BuiltinHelperUnitTest.java +++ b/libraries-2/src/test/java/com/baeldung/handlebars/BuiltinHelperUnitTest.java @@ -1,15 +1,14 @@ package com.baeldung.handlebars; -import static org.assertj.core.api.Assertions.assertThat; - import com.github.jknack.handlebars.Handlebars; import com.github.jknack.handlebars.Template; import com.github.jknack.handlebars.io.ClassPathTemplateLoader; import com.github.jknack.handlebars.io.TemplateLoader; +import org.junit.Test; + import java.io.IOException; -import org.junit.Ignore; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; /** * Showcases the built-in template helpers. @@ -20,7 +19,6 @@ public class BuiltinHelperUnitTest { private TemplateLoader templateLoader = new ClassPathTemplateLoader("/handlebars", ".html"); - @Ignore @Test public void whenUsedWith_ThenContextChanges() throws IOException { Handlebars handlebars = new Handlebars(templateLoader); @@ -30,10 +28,9 @@ public class BuiltinHelperUnitTest { String templateString = template.apply(person); - assertThat(templateString).isEqualTo("\n

I live in World

\n"); + assertThat(templateString).contains("

I live in World

"); } - @Ignore @Test public void whenUsedWithMustacheStyle_ThenContextChanges() throws IOException { Handlebars handlebars = new Handlebars(templateLoader); @@ -43,10 +40,9 @@ public class BuiltinHelperUnitTest { String templateString = template.apply(person); - assertThat(templateString).isEqualTo("\n

I live in World

\n"); + assertThat(templateString).contains("

I live in World

"); } - @Ignore @Test public void whenUsedEach_ThenIterates() throws IOException { Handlebars handlebars = new Handlebars(templateLoader); @@ -59,11 +55,10 @@ public class BuiltinHelperUnitTest { String templateString = template.apply(person); - assertThat(templateString).isEqualTo("\nJava is my friend.\n" - + "\nSpring is my friend.\n"); + assertThat(templateString) + .contains("Java is my friend.", "Spring is my friend."); } - @Ignore @Test public void whenUsedEachMustacheStyle_ThenIterates() throws IOException { Handlebars handlebars = new Handlebars(templateLoader); @@ -76,11 +71,10 @@ public class BuiltinHelperUnitTest { String templateString = template.apply(person); - assertThat(templateString).isEqualTo("\nJava is my friend.\n" - + "\nSpring is my friend.\n"); + assertThat(templateString) + .contains("Java is my friend.", "Spring is my friend."); } - @Ignore @Test public void whenUsedIf_ThenPutsCondition() throws IOException { Handlebars handlebars = new Handlebars(templateLoader); @@ -90,10 +84,9 @@ public class BuiltinHelperUnitTest { String templateString = template.apply(person); - assertThat(templateString).isEqualTo("\n

Baeldung is busy.

\n"); + assertThat(templateString).contains("

Baeldung is busy.

"); } - @Ignore @Test public void whenUsedIfMustacheStyle_ThenPutsCondition() throws IOException { Handlebars handlebars = new Handlebars(templateLoader); @@ -103,7 +96,7 @@ public class BuiltinHelperUnitTest { String templateString = template.apply(person); - assertThat(templateString).isEqualTo("\n

Baeldung is busy.

\n"); + assertThat(templateString).contains("

Baeldung is busy.

"); } private Person getPerson(String name) { diff --git a/libraries-2/src/test/java/com/baeldung/handlebars/ReusingTemplatesUnitTest.java b/libraries-2/src/test/java/com/baeldung/handlebars/ReusingTemplatesUnitTest.java index 56449f59e4..376e44e4bd 100644 --- a/libraries-2/src/test/java/com/baeldung/handlebars/ReusingTemplatesUnitTest.java +++ b/libraries-2/src/test/java/com/baeldung/handlebars/ReusingTemplatesUnitTest.java @@ -1,15 +1,14 @@ package com.baeldung.handlebars; -import static org.assertj.core.api.Assertions.assertThat; - import com.github.jknack.handlebars.Handlebars; import com.github.jknack.handlebars.Template; import com.github.jknack.handlebars.io.ClassPathTemplateLoader; import com.github.jknack.handlebars.io.TemplateLoader; +import org.junit.Test; + import java.io.IOException; -import org.junit.Ignore; -import org.junit.Test; +import static org.assertj.core.api.Assertions.assertThat; /** * Showcases reusing the existing templates. @@ -20,7 +19,6 @@ public class ReusingTemplatesUnitTest { private TemplateLoader templateLoader = new ClassPathTemplateLoader("/handlebars", ".html"); - @Ignore @Test public void whenOtherTemplateIsReferenced_ThenCanReuse() throws IOException { Handlebars handlebars = new Handlebars(templateLoader); @@ -30,10 +28,10 @@ public class ReusingTemplatesUnitTest { String templateString = template.apply(person); - assertThat(templateString).isEqualTo("

Hi Baeldung!

\n

This is the page Baeldung

"); + assertThat(templateString) + .contains("

Hi Baeldung!

", "

This is the page Baeldung

"); } - @Ignore @Test public void whenBlockIsDefined_ThenCanOverrideWithPartial() throws IOException { Handlebars handlebars = new Handlebars(templateLoader); @@ -43,11 +41,11 @@ public class ReusingTemplatesUnitTest { String templateString = template.apply(person); - assertThat(templateString).isEqualTo("\n\n" - + "\n" - + "\n This is the intro\n\n" - + "\n Hi there!\n\n" - + "\n" - + ""); + assertThat(templateString).contains("", + "", + "This is the intro", + "Hi there!", + "", + ""); } } diff --git a/libraries-3/README.md b/libraries-3/README.md index a9d48bb389..942f108afd 100644 --- a/libraries-3/README.md +++ b/libraries-3/README.md @@ -9,3 +9,5 @@ Remember, for advanced libraries like [Jackson](/jackson) and [JUnit](/testing-m ### Relevant Articles: - [Parsing Command-Line Parameters with JCommander](https://www.baeldung.com/jcommander-parsing-command-line-parameters) +- [Guide to the Cactoos Library](https://www.baeldung.com/java-cactoos) +- [Parsing Command-Line Parameters with Airline](https://www.baeldung.com/java-airline) diff --git a/libraries-3/pom.xml b/libraries-3/pom.xml index 6942aa736d..66b48733f2 100644 --- a/libraries-3/pom.xml +++ b/libraries-3/pom.xml @@ -8,8 +8,9 @@ com.baeldung - parent-modules - 1.0.0-SNAPSHOT + parent-boot-2 + 0.0.1-SNAPSHOT + ../parent-boot-2 @@ -23,16 +24,74 @@ lombok ${lombok.version}
+ + org.springframework.boot + spring-boot-starter-web + + + + net.sourceforge.barbecue + barbecue + ${barbecue.version} + + + + net.sf.barcode4j + barcode4j + ${barcode4j.version} + + + + com.google.zxing + core + ${zxing.version} + + + com.google.zxing + javase + ${zxing.version} + + + + com.github.kenglxn.qrgen + javase + ${qrgen.version} + + + com.github.rvesse + airline + ${airline.version} + org.cactoos cactoos ${cactoos.version} + + org.cache2k + cache2k-base-bom + ${cache2k.version} + pom + + + + jitpack.io + https://jitpack.io + + + 1.78 1.18.6 + 1.5-beta1 + 2.1 + 3.3.0 + 2.6.0 + 0.43 + 2.7.2 + 1.2.3.Final - \ No newline at end of file + diff --git a/libraries-3/src/main/java/com/baeldung/airline/CommandLine.java b/libraries-3/src/main/java/com/baeldung/airline/CommandLine.java new file mode 100644 index 0000000000..b4c3fc9b9e --- /dev/null +++ b/libraries-3/src/main/java/com/baeldung/airline/CommandLine.java @@ -0,0 +1,17 @@ +package com.baeldung.airline; + +import com.github.rvesse.airline.annotations.Cli; +import com.github.rvesse.airline.help.Help; + +@Cli(name = "baeldung-cli", +description = "Baeldung Airline Tutorial", +defaultCommand = Help.class, +commands = { DatabaseSetupCommand.class, LoggingCommand.class, Help.class }) +public class CommandLine { + + public static void main(String[] args) { + com.github.rvesse.airline.Cli cli = new com.github.rvesse.airline.Cli<>(CommandLine.class); + Runnable cmd = cli.parse(args); + cmd.run(); + } +} diff --git a/libraries-3/src/main/java/com/baeldung/airline/DatabaseSetupCommand.java b/libraries-3/src/main/java/com/baeldung/airline/DatabaseSetupCommand.java new file mode 100644 index 0000000000..bf67fa33b6 --- /dev/null +++ b/libraries-3/src/main/java/com/baeldung/airline/DatabaseSetupCommand.java @@ -0,0 +1,77 @@ +package com.baeldung.airline; + +import java.util.ArrayList; +import java.util.List; + +import javax.inject.Inject; + +import com.github.rvesse.airline.HelpOption; +import com.github.rvesse.airline.annotations.Command; +import com.github.rvesse.airline.annotations.Option; +import com.github.rvesse.airline.annotations.OptionType; +import com.github.rvesse.airline.annotations.restrictions.AllowedRawValues; +import com.github.rvesse.airline.annotations.restrictions.MutuallyExclusiveWith; +import com.github.rvesse.airline.annotations.restrictions.Pattern; +import com.github.rvesse.airline.annotations.restrictions.RequiredOnlyIf; + +@Command(name = "setup-db", description = "Setup our database") +public class DatabaseSetupCommand implements Runnable { + @Inject + private HelpOption help; + + @Option(type = OptionType.COMMAND, + name = {"-d", "--database"}, + description = "Type of RDBMS.", + title = "RDBMS type: mysql|postgresql|mongodb") + @AllowedRawValues(allowedValues = { "mysql", "postgres", "mongodb" }) + protected String rdbmsMode = "mysql"; + + @Option(type = OptionType.COMMAND, + name = {"--rdbms:url", "--url"}, + description = "URL to use for connection to RDBMS.", + title = "RDBMS URL") + @MutuallyExclusiveWith(tag="mode") + @Pattern(pattern="^(http://.*):(d*)(.*)u=(.*)&p=(.*)") + protected String rdbmsUrl = ""; + + @Option(type = OptionType.COMMAND, + name = {"--rdbms:host", "--host"}, + description = "Host to use for connection to RDBMS.", + title = "RDBMS host") + @MutuallyExclusiveWith(tag="mode") + protected String rdbmsHost = ""; + + @RequiredOnlyIf(names={"--rdbms:host", "--host"}) + @Option(type = OptionType.COMMAND, + name = {"--rdbms:user", "-u", "--user"}, + description = "User for login to RDBMS.", + title = "RDBMS user") + protected String rdbmsUser; + + @RequiredOnlyIf(names={"--rdbms:host", "--host"}) + @Option(type = OptionType.COMMAND, + name = {"--rdbms:password", "--password"}, + description = "Password for login to RDBMS.", + title = "RDBMS password") + protected String rdbmsPassword; + + @Option(type = OptionType.COMMAND, + name = {"--driver", "--jars"}, + description = "List of drivers", + title = "--driver --driver ") + protected List jars = new ArrayList<>(); + + @Override + public void run() { + //skipping store our choices... + if (!help.showHelpIfRequested()) { + if(!"".equals(rdbmsHost)) { + System.out.println("Connecting to database host: " + rdbmsHost); + System.out.println("Credential: " + rdbmsUser + " / " + rdbmsPassword); + } else { + System.out.println("Connecting to database url: " + rdbmsUrl); + } + System.out.println(jars.toString()); + } + } +} diff --git a/libraries-3/src/main/java/com/baeldung/airline/LoggingCommand.java b/libraries-3/src/main/java/com/baeldung/airline/LoggingCommand.java new file mode 100644 index 0000000000..4a269f87fd --- /dev/null +++ b/libraries-3/src/main/java/com/baeldung/airline/LoggingCommand.java @@ -0,0 +1,24 @@ +package com.baeldung.airline; + +import javax.inject.Inject; + +import com.github.rvesse.airline.HelpOption; +import com.github.rvesse.airline.annotations.Command; +import com.github.rvesse.airline.annotations.Option; + +@Command(name = "setup-log", description = "Setup our log") +public class LoggingCommand implements Runnable { + + @Inject + private HelpOption help; + + @Option(name = { "-v", "--verbose" }, description = "Set log verbosity on/off") + private boolean verbose = false; + + @Override + public void run() { + //skipping store user choice + if (!help.showHelpIfRequested()) + System.out.println("Verbosity: " + verbose); + } +} diff --git a/libraries-3/src/main/java/com/baeldung/barcodes/BarcodesController.java b/libraries-3/src/main/java/com/baeldung/barcodes/BarcodesController.java new file mode 100644 index 0000000000..171d703621 --- /dev/null +++ b/libraries-3/src/main/java/com/baeldung/barcodes/BarcodesController.java @@ -0,0 +1,99 @@ +package com.baeldung.barcodes; + +import com.baeldung.barcodes.generators.BarbecueBarcodeGenerator; +import com.baeldung.barcodes.generators.Barcode4jBarcodeGenerator; +import com.baeldung.barcodes.generators.QRGenBarcodeGenerator; +import com.baeldung.barcodes.generators.ZxingBarcodeGenerator; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import java.awt.image.BufferedImage; + +@RestController +@RequestMapping("/barcodes") +public class BarcodesController { + + //Barbecue library + + @GetMapping(value = "/barbecue/upca/{barcode}", produces = MediaType.IMAGE_PNG_VALUE) + public ResponseEntity barbecueUPCABarcode(@PathVariable("barcode") String barcode) throws Exception { + return okResponse(BarbecueBarcodeGenerator.generateUPCABarcodeImage(barcode)); + } + + @GetMapping(value = "/barbecue/ean13/{barcode}", produces = MediaType.IMAGE_PNG_VALUE) + public ResponseEntity barbecueEAN13Barcode(@PathVariable("barcode") String barcode) throws Exception { + return okResponse(BarbecueBarcodeGenerator.generateEAN13BarcodeImage(barcode)); + } + + @PostMapping(value = "/barbecue/code128", produces = MediaType.IMAGE_PNG_VALUE) + public ResponseEntity barbecueCode128Barcode(@RequestBody String barcode) throws Exception { + return okResponse(BarbecueBarcodeGenerator.generateCode128BarcodeImage(barcode)); + } + + @PostMapping(value = "/barbecue/pdf417", produces = MediaType.IMAGE_PNG_VALUE) + public ResponseEntity barbecuePDF417Barcode(@RequestBody String barcode) throws Exception { + return okResponse(BarbecueBarcodeGenerator.generatePDF417BarcodeImage(barcode)); + } + + //Barcode4j library + + @GetMapping(value = "/barcode4j/upca/{barcode}", produces = MediaType.IMAGE_PNG_VALUE) + public ResponseEntity barcode4jUPCABarcode(@PathVariable("barcode") String barcode) { + return okResponse(Barcode4jBarcodeGenerator.generateUPCABarcodeImage(barcode)); + } + + @GetMapping(value = "/barcode4j/ean13/{barcode}", produces = MediaType.IMAGE_PNG_VALUE) + public ResponseEntity barcode4jEAN13Barcode(@PathVariable("barcode") String barcode) { + return okResponse(Barcode4jBarcodeGenerator.generateEAN13BarcodeImage(barcode)); + } + + @PostMapping(value = "/barcode4j/code128", produces = MediaType.IMAGE_PNG_VALUE) + public ResponseEntity barcode4jCode128Barcode(@RequestBody String barcode) { + return okResponse(Barcode4jBarcodeGenerator.generateCode128BarcodeImage(barcode)); + } + + @PostMapping(value = "/barcode4j/pdf417", produces = MediaType.IMAGE_PNG_VALUE) + public ResponseEntity barcode4jPDF417Barcode(@RequestBody String barcode) { + return okResponse(Barcode4jBarcodeGenerator.generatePDF417BarcodeImage(barcode)); + } + + //Zxing library + + @GetMapping(value = "/zxing/upca/{barcode}", produces = MediaType.IMAGE_PNG_VALUE) + public ResponseEntity zxingUPCABarcode(@PathVariable("barcode") String barcode) throws Exception { + return okResponse(ZxingBarcodeGenerator.generateUPCABarcodeImage(barcode)); + } + + @GetMapping(value = "/zxing/ean13/{barcode}", produces = MediaType.IMAGE_PNG_VALUE) + public ResponseEntity zxingEAN13Barcode(@PathVariable("barcode") String barcode) throws Exception { + return okResponse(ZxingBarcodeGenerator.generateEAN13BarcodeImage(barcode)); + } + + @PostMapping(value = "/zxing/code128", produces = MediaType.IMAGE_PNG_VALUE) + public ResponseEntity zxingCode128Barcode(@RequestBody String barcode) throws Exception { + return okResponse(ZxingBarcodeGenerator.generateCode128BarcodeImage(barcode)); + } + + @PostMapping(value = "/zxing/pdf417", produces = MediaType.IMAGE_PNG_VALUE) + public ResponseEntity zxingPDF417Barcode(@RequestBody String barcode) throws Exception { + return okResponse(ZxingBarcodeGenerator.generatePDF417BarcodeImage(barcode)); + } + + @PostMapping(value = "/zxing/qrcode", produces = MediaType.IMAGE_PNG_VALUE) + public ResponseEntity zxingQRCode(@RequestBody String barcode) throws Exception { + return okResponse(ZxingBarcodeGenerator.generateQRCodeImage(barcode)); + } + + //QRGen + + @PostMapping(value = "/qrgen/qrcode", produces = MediaType.IMAGE_PNG_VALUE) + public ResponseEntity qrgenQRCode(@RequestBody String barcode) throws Exception { + return okResponse(QRGenBarcodeGenerator.generateQRCodeImage(barcode)); + } + + private ResponseEntity okResponse(BufferedImage image) { + return new ResponseEntity<>(image, HttpStatus.OK); + } +} diff --git a/libraries-3/src/main/java/com/baeldung/barcodes/SpringBootApp.java b/libraries-3/src/main/java/com/baeldung/barcodes/SpringBootApp.java new file mode 100644 index 0000000000..991b3b11ce --- /dev/null +++ b/libraries-3/src/main/java/com/baeldung/barcodes/SpringBootApp.java @@ -0,0 +1,23 @@ +package com.baeldung.barcodes; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; +import org.springframework.http.converter.BufferedImageHttpMessageConverter; +import org.springframework.http.converter.HttpMessageConverter; + +import java.awt.image.BufferedImage; + +@SpringBootApplication +public class SpringBootApp { + + public static void main(String[] args) { + SpringApplication.run(SpringBootApp.class, args); + } + + @Bean + public HttpMessageConverter createImageHttpMessageConverter() { + return new BufferedImageHttpMessageConverter(); + } + +} diff --git a/libraries-3/src/main/java/com/baeldung/barcodes/generators/BarbecueBarcodeGenerator.java b/libraries-3/src/main/java/com/baeldung/barcodes/generators/BarbecueBarcodeGenerator.java new file mode 100644 index 0000000000..353f824d98 --- /dev/null +++ b/libraries-3/src/main/java/com/baeldung/barcodes/generators/BarbecueBarcodeGenerator.java @@ -0,0 +1,43 @@ +package com.baeldung.barcodes.generators; + +import net.sourceforge.barbecue.Barcode; +import net.sourceforge.barbecue.BarcodeFactory; +import net.sourceforge.barbecue.BarcodeImageHandler; + +import java.awt.*; +import java.awt.image.BufferedImage; + +public class BarbecueBarcodeGenerator { + + private static final Font BARCODE_TEXT_FONT = new Font(Font.SANS_SERIF, Font.PLAIN, 14); + + public static BufferedImage generateUPCABarcodeImage(String barcodeText) throws Exception { + Barcode barcode = BarcodeFactory.createUPCA(barcodeText); //checksum is automatically added + barcode.setFont(BARCODE_TEXT_FONT); + barcode.setResolution(400); + + return BarcodeImageHandler.getImage(barcode); + } + + public static BufferedImage generateEAN13BarcodeImage(String barcodeText) throws Exception { + Barcode barcode = BarcodeFactory.createEAN13(barcodeText); //checksum is automatically added + barcode.setFont(BARCODE_TEXT_FONT); + + return BarcodeImageHandler.getImage(barcode); + } + + public static BufferedImage generateCode128BarcodeImage(String barcodeText) throws Exception { + Barcode barcode = BarcodeFactory.createCode128(barcodeText); + barcode.setFont(BARCODE_TEXT_FONT); + + return BarcodeImageHandler.getImage(barcode); + } + + public static BufferedImage generatePDF417BarcodeImage(String barcodeText) throws Exception { + Barcode barcode = BarcodeFactory.createPDF417(barcodeText); + barcode.setFont(BARCODE_TEXT_FONT); + + return BarcodeImageHandler.getImage(barcode); + } + +} diff --git a/libraries-3/src/main/java/com/baeldung/barcodes/generators/Barcode4jBarcodeGenerator.java b/libraries-3/src/main/java/com/baeldung/barcodes/generators/Barcode4jBarcodeGenerator.java new file mode 100644 index 0000000000..a2fee044e5 --- /dev/null +++ b/libraries-3/src/main/java/com/baeldung/barcodes/generators/Barcode4jBarcodeGenerator.java @@ -0,0 +1,46 @@ +package com.baeldung.barcodes.generators; + +import org.krysalis.barcode4j.impl.code128.Code128Bean; +import org.krysalis.barcode4j.impl.pdf417.PDF417Bean; +import org.krysalis.barcode4j.impl.upcean.EAN13Bean; +import org.krysalis.barcode4j.impl.upcean.UPCABean; +import org.krysalis.barcode4j.output.bitmap.BitmapCanvasProvider; + +import java.awt.image.BufferedImage; + +public class Barcode4jBarcodeGenerator { + + public static BufferedImage generateUPCABarcodeImage(String barcodeText) { + UPCABean barcodeGenerator = new UPCABean(); + BitmapCanvasProvider canvas = new BitmapCanvasProvider(160, BufferedImage.TYPE_BYTE_BINARY, false, 0); + + barcodeGenerator.generateBarcode(canvas, barcodeText); + return canvas.getBufferedImage(); + } + + public static BufferedImage generateEAN13BarcodeImage(String barcodeText) { + EAN13Bean barcodeGenerator = new EAN13Bean(); + BitmapCanvasProvider canvas = new BitmapCanvasProvider(160, BufferedImage.TYPE_BYTE_BINARY, false, 0); + + barcodeGenerator.generateBarcode(canvas, barcodeText); + return canvas.getBufferedImage(); + } + + public static BufferedImage generateCode128BarcodeImage(String barcodeText) { + Code128Bean barcodeGenerator = new Code128Bean(); + BitmapCanvasProvider canvas = new BitmapCanvasProvider(160, BufferedImage.TYPE_BYTE_BINARY, false, 0); + + barcodeGenerator.generateBarcode(canvas, barcodeText); + return canvas.getBufferedImage(); + } + + public static BufferedImage generatePDF417BarcodeImage(String barcodeText) { + PDF417Bean barcodeGenerator = new PDF417Bean(); + BitmapCanvasProvider canvas = new BitmapCanvasProvider(160, BufferedImage.TYPE_BYTE_BINARY, false, 0); + barcodeGenerator.setColumns(10); + + barcodeGenerator.generateBarcode(canvas, barcodeText); + return canvas.getBufferedImage(); + } + +} diff --git a/libraries-3/src/main/java/com/baeldung/barcodes/generators/QRGenBarcodeGenerator.java b/libraries-3/src/main/java/com/baeldung/barcodes/generators/QRGenBarcodeGenerator.java new file mode 100644 index 0000000000..46d17ac500 --- /dev/null +++ b/libraries-3/src/main/java/com/baeldung/barcodes/generators/QRGenBarcodeGenerator.java @@ -0,0 +1,21 @@ +package com.baeldung.barcodes.generators; + +import net.glxn.qrgen.javase.QRCode; + +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; + +public class QRGenBarcodeGenerator { + + public static BufferedImage generateQRCodeImage(String barcodeText) throws Exception { + ByteArrayOutputStream stream = QRCode + .from(barcodeText) + .withSize(250, 250) + .stream(); + ByteArrayInputStream bis = new ByteArrayInputStream(stream.toByteArray()); + + return ImageIO.read(bis); + } +} diff --git a/libraries-3/src/main/java/com/baeldung/barcodes/generators/ZxingBarcodeGenerator.java b/libraries-3/src/main/java/com/baeldung/barcodes/generators/ZxingBarcodeGenerator.java new file mode 100644 index 0000000000..e9aa2975da --- /dev/null +++ b/libraries-3/src/main/java/com/baeldung/barcodes/generators/ZxingBarcodeGenerator.java @@ -0,0 +1,51 @@ +package com.baeldung.barcodes.generators; + +import com.google.zxing.BarcodeFormat; +import com.google.zxing.client.j2se.MatrixToImageWriter; +import com.google.zxing.common.BitMatrix; +import com.google.zxing.oned.Code128Writer; +import com.google.zxing.oned.EAN13Writer; +import com.google.zxing.oned.UPCAWriter; +import com.google.zxing.pdf417.PDF417Writer; +import com.google.zxing.qrcode.QRCodeWriter; + +import java.awt.image.BufferedImage; + +public class ZxingBarcodeGenerator { + + public static BufferedImage generateUPCABarcodeImage(String barcodeText) throws Exception { + UPCAWriter barcodeWriter = new UPCAWriter(); + BitMatrix bitMatrix = barcodeWriter.encode(barcodeText, BarcodeFormat.UPC_A, 300, 150); + + return MatrixToImageWriter.toBufferedImage(bitMatrix); + } + + public static BufferedImage generateEAN13BarcodeImage(String barcodeText) throws Exception { + EAN13Writer barcodeWriter = new EAN13Writer(); + BitMatrix bitMatrix = barcodeWriter.encode(barcodeText, BarcodeFormat.EAN_13, 300, 150); + + return MatrixToImageWriter.toBufferedImage(bitMatrix); + } + + public static BufferedImage generateCode128BarcodeImage(String barcodeText) throws Exception { + Code128Writer barcodeWriter = new Code128Writer(); + BitMatrix bitMatrix = barcodeWriter.encode(barcodeText, BarcodeFormat.CODE_128, 300, 150); + + return MatrixToImageWriter.toBufferedImage(bitMatrix); + } + + public static BufferedImage generatePDF417BarcodeImage(String barcodeText) throws Exception { + PDF417Writer barcodeWriter = new PDF417Writer(); + BitMatrix bitMatrix = barcodeWriter.encode(barcodeText, BarcodeFormat.PDF_417, 700, 700); + + return MatrixToImageWriter.toBufferedImage(bitMatrix); + } + + public static BufferedImage generateQRCodeImage(String barcodeText) throws Exception { + QRCodeWriter barcodeWriter = new QRCodeWriter(); + BitMatrix bitMatrix = barcodeWriter.encode(barcodeText, BarcodeFormat.QR_CODE, 200, 200); + + return MatrixToImageWriter.toBufferedImage(bitMatrix); + } + +} \ No newline at end of file diff --git a/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelper.java b/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelper.java new file mode 100644 index 0000000000..dc984e5f0b --- /dev/null +++ b/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelper.java @@ -0,0 +1,41 @@ +package com.baeldung.cache2k; + +import java.util.Objects; + +import org.cache2k.Cache; +import org.cache2k.Cache2kBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ProductHelper { + + final Logger LOGGER = LoggerFactory.getLogger(ProductHelper.class); + + private Cache cachedDiscounts; + + public ProductHelper() { + cachedDiscounts = Cache2kBuilder.of(String.class, Integer.class) + .name("discount") + .eternal(true) + .entryCapacity(100) + .build(); + + initDiscountCache("Sports", 20); + } + + public void initDiscountCache(String productType, Integer value) { + cachedDiscounts.put(productType, value); + } + + public Integer getDiscount(String productType) { + Integer discount = cachedDiscounts.get(productType); + if (Objects.isNull(discount)) { + LOGGER.info("Discount for {} not found.", productType); + discount = 0; + } else { + LOGGER.info("Discount for {} found.", productType); + } + return discount; + } + +} diff --git a/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperUsingLoader.java b/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperUsingLoader.java new file mode 100644 index 0000000000..787a78cd36 --- /dev/null +++ b/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperUsingLoader.java @@ -0,0 +1,41 @@ +package com.baeldung.cache2k; + +import java.util.Objects; +import java.util.concurrent.TimeUnit; + +import org.cache2k.Cache; +import org.cache2k.Cache2kBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ProductHelperUsingLoader { + + final Logger LOGGER = LoggerFactory.getLogger(ProductHelperUsingLoader.class); + + private Cache cachedDiscounts; + + public ProductHelperUsingLoader() { + cachedDiscounts = Cache2kBuilder.of(String.class, Integer.class) + .name("discount-loader") + .eternal(false) + .expireAfterWrite(10, TimeUnit.MILLISECONDS) + .entryCapacity(100) + .loader((key) -> { + LOGGER.info("Calculating discount for {}.", key); + return "Sports".equalsIgnoreCase(key) ? 20 : 10; + }) + .build(); + } + + public Integer getDiscount(String productType) { + Integer discount = cachedDiscounts.get(productType); + if (Objects.isNull(discount)) { + LOGGER.info("Discount for {} not found.", productType); + discount = 0; + } else { + LOGGER.info("Discount for {} found.", productType); + } + return discount; + } + +} diff --git a/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperWithEventListener.java b/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperWithEventListener.java new file mode 100644 index 0000000000..5b9eb28c68 --- /dev/null +++ b/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperWithEventListener.java @@ -0,0 +1,49 @@ +package com.baeldung.cache2k; + +import java.util.Objects; +import java.util.concurrent.TimeUnit; + +import org.cache2k.Cache; +import org.cache2k.Cache2kBuilder; +import org.cache2k.CacheEntry; +import org.cache2k.event.CacheEntryCreatedListener; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ProductHelperWithEventListener { + + final Logger LOGGER = LoggerFactory.getLogger(ProductHelperWithEventListener.class); + + private Cache cachedDiscounts; + + public ProductHelperWithEventListener() { + cachedDiscounts = Cache2kBuilder.of(String.class, Integer.class) + .name("discount-listener") + .eternal(false) + .expireAfterWrite(10, TimeUnit.MILLISECONDS) + .entryCapacity(100) + .loader((key) -> { + LOGGER.info("Calculating discount for {}.", key); + return "Sports".equalsIgnoreCase(key) ? 20 : 10; + }) + .addListener(new CacheEntryCreatedListener() { + @Override + public void onEntryCreated(Cache cache, CacheEntry entry) { + LOGGER.info("Entry created: [{}, {}].", entry.getKey(), entry.getValue()); + } + }) + .build(); + } + + public Integer getDiscount(String productType) { + Integer discount = cachedDiscounts.get(productType); + if (Objects.isNull(discount)) { + LOGGER.info("Discount for {} not found.", productType); + discount = 0; + } else { + LOGGER.info("Discount for {} found.", productType); + } + return discount; + } + +} diff --git a/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperWithExpiry.java b/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperWithExpiry.java new file mode 100644 index 0000000000..b0bf8f90de --- /dev/null +++ b/libraries-3/src/main/java/com/baeldung/cache2k/ProductHelperWithExpiry.java @@ -0,0 +1,43 @@ +package com.baeldung.cache2k; + +import java.util.Objects; +import java.util.concurrent.TimeUnit; + +import org.cache2k.Cache; +import org.cache2k.Cache2kBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ProductHelperWithExpiry { + + final Logger LOGGER = LoggerFactory.getLogger(ProductHelperWithExpiry.class); + + private Cache cachedDiscounts; + + public ProductHelperWithExpiry() { + cachedDiscounts = Cache2kBuilder.of(String.class, Integer.class) + .name("discount-expiry") + .eternal(false) + .expireAfterWrite(5, TimeUnit.MILLISECONDS) + .entryCapacity(100) + .build(); + + initDiscountCache("Sports", 20); + } + + public void initDiscountCache(String productType, Integer value) { + cachedDiscounts.put(productType, value); + } + + public Integer getDiscount(String productType) { + Integer discount = cachedDiscounts.get(productType); + if (Objects.isNull(discount)) { + LOGGER.info("Discount for {} not found.", productType); + discount = 0; + } else { + LOGGER.info("Discount for {} found.", productType); + } + return discount; + } + +} diff --git a/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperUnitTest.java b/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperUnitTest.java new file mode 100644 index 0000000000..69da2591dd --- /dev/null +++ b/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperUnitTest.java @@ -0,0 +1,17 @@ +package com.baeldung.cache2k; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class ProductHelperUnitTest { + + ProductHelper productHelper = new ProductHelper(); + + @Test + public void whenInvokedGetDiscount_thenGetItFromCache() { + assertTrue(productHelper.getDiscount("Sports") == 20); + assertTrue(productHelper.getDiscount("Electronics") == 0); + } + +} diff --git a/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperUsingLoaderUnitTest.java b/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperUsingLoaderUnitTest.java new file mode 100644 index 0000000000..2656e75cab --- /dev/null +++ b/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperUsingLoaderUnitTest.java @@ -0,0 +1,17 @@ +package com.baeldung.cache2k; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class ProductHelperUsingLoaderUnitTest { + + ProductHelperUsingLoader productHelper = new ProductHelperUsingLoader(); + + @Test + public void whenInvokedGetDiscount_thenPopulateCache() { + assertTrue(productHelper.getDiscount("Sports") == 20); + assertTrue(productHelper.getDiscount("Electronics") == 10); + } + +} diff --git a/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperWithEventListenerUnitTest.java b/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperWithEventListenerUnitTest.java new file mode 100644 index 0000000000..7bf08232f4 --- /dev/null +++ b/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperWithEventListenerUnitTest.java @@ -0,0 +1,16 @@ +package com.baeldung.cache2k; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class ProductHelperWithEventListenerUnitTest { + + ProductHelperWithEventListener productHelper = new ProductHelperWithEventListener(); + + @Test + public void whenEntryAddedInCache_thenEventListenerCalled() { + assertTrue(productHelper.getDiscount("Sports") == 20); + } + +} diff --git a/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperWithExpiryUnitTest.java b/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperWithExpiryUnitTest.java new file mode 100644 index 0000000000..65feba2c70 --- /dev/null +++ b/libraries-3/src/test/java/com/baeldung/cache2k/ProductHelperWithExpiryUnitTest.java @@ -0,0 +1,18 @@ +package com.baeldung.cache2k; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +public class ProductHelperWithExpiryUnitTest { + + ProductHelperWithExpiry productHelper = new ProductHelperWithExpiry(); + + @Test + public void whenInvokedGetDiscountForExpiredProduct_thenNoDiscount() throws InterruptedException { + assertTrue(productHelper.getDiscount("Sports") == 20); + Thread.sleep(20); + assertTrue(productHelper.getDiscount("Sports") == 0); + } + +} diff --git a/libraries-data-io/src/test/java/com/baeldung/libraries/snakeyaml/MultiLineStringsUnitTest.java b/libraries-data-io/src/test/java/com/baeldung/libraries/snakeyaml/MultiLineStringsUnitTest.java new file mode 100644 index 0000000000..836ac86339 --- /dev/null +++ b/libraries-data-io/src/test/java/com/baeldung/libraries/snakeyaml/MultiLineStringsUnitTest.java @@ -0,0 +1,90 @@ +package com.baeldung.libraries.snakeyaml; + +import org.junit.Before; +import org.junit.Test; +import org.yaml.snakeyaml.Yaml; + +import java.io.File; +import java.io.InputStream; +import java.util.Map; + +import static org.junit.Assert.assertEquals; + +public class MultiLineStringsUnitTest { + + private Yaml yaml; + + @Before + public void setup() { + yaml = new Yaml(); + } + + @Test + public void whenLiteral_ThenLineBreaksArePresent() { + String key = parseYamlKey("literal.yaml", "key"); + assertEquals("Line1\nLine2\nLine3", key); + } + + @Test + public void whenLiteral_ThenEndingBreaksAreReducedToOne() { + String key = parseYamlKey("literal2.yaml", "key"); + assertEquals("\n\nLine1\n\nLine2\n\nLine3\n", key); + } + + @Test + public void whenFolded_ThenLineBreaksAreReplaced() { + String key = parseYamlKey("folded.yaml", "key"); + assertEquals("Line1 Line2 Line3", key); + } + + @Test + public void whenFolded_ThenEmptyLinesAreReducedToOne() { + String key = parseYamlKey("folded2.yaml", "key"); + assertEquals("Line1 Line2\n\nLine3\n", key); + } + + @Test + public void whenLiteralKeep_ThenLastEmptyLinesArePresent() { + String key = parseYamlKey("literal_keep.yaml", "key"); + assertEquals("Line1\nLine2\nLine3\n\n", key); + } + + @Test + public void whenLiteralStrip_ThenLastEmptyLinesAreRemoved() { + String key = parseYamlKey("literal_strip.yaml", "key"); + assertEquals("Line1\nLine2\nLine3", key); + } + + @Test + public void whenFoldedKeep_ThenLastEmptyLinesArePresent() { + String key = parseYamlKey("folded_keep.yaml", "key"); + assertEquals("Line1 Line2 Line3\n\n\n", key); + } + + @Test + public void whenFoldedStrip_ThenLastEmptyLinesAreRemoved() { + String key = parseYamlKey("folded_strip.yaml", "key"); + assertEquals("Line1 Line2 Line3", key); + } + + @Test + public void whenDoubleQuotes_ThenExplicitBreaksArePreserved() { + String key = parseYamlKey("plain_double_quotes.yaml", "key"); + assertEquals("Line1\nLine2\nLine3", key); + } + + @Test + public void whenSingleQuotes_ThenExplicitBreaksAreIgnored() { + String key = parseYamlKey("plain_single_quotes.yaml", "key"); + assertEquals("Line1\\nLine2\nLine3", key); + } + + String parseYamlKey(String fileName, String key) { + InputStream inputStream = this.getClass() + .getClassLoader() + .getResourceAsStream("yaml" + File.separator + "multiline" + File.separator + fileName); + Map parsed = yaml.load(inputStream); + return parsed.get(key); + } + +} diff --git a/libraries-data-io/src/test/resources/yaml/multiline/folded.yaml b/libraries-data-io/src/test/resources/yaml/multiline/folded.yaml new file mode 100644 index 0000000000..c5fa743a08 --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/folded.yaml @@ -0,0 +1,4 @@ +key: > + Line1 + Line2 + Line3 \ No newline at end of file diff --git a/libraries-data-io/src/test/resources/yaml/multiline/folded2.yaml b/libraries-data-io/src/test/resources/yaml/multiline/folded2.yaml new file mode 100644 index 0000000000..735abf9b2f --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/folded2.yaml @@ -0,0 +1,8 @@ +key: > + Line1 + Line2 + + + Line3 + + diff --git a/libraries-data-io/src/test/resources/yaml/multiline/folded_keep.yaml b/libraries-data-io/src/test/resources/yaml/multiline/folded_keep.yaml new file mode 100644 index 0000000000..555291fd26 --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/folded_keep.yaml @@ -0,0 +1,6 @@ +key: >+ + Line1 + Line2 + Line3 + + diff --git a/libraries-data-io/src/test/resources/yaml/multiline/folded_strip.yaml b/libraries-data-io/src/test/resources/yaml/multiline/folded_strip.yaml new file mode 100644 index 0000000000..0a3a246dc2 --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/folded_strip.yaml @@ -0,0 +1,7 @@ +key: >- + Line1 + Line2 + Line3 + + + diff --git a/libraries-data-io/src/test/resources/yaml/multiline/literal.yaml b/libraries-data-io/src/test/resources/yaml/multiline/literal.yaml new file mode 100644 index 0000000000..7e02501a33 --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/literal.yaml @@ -0,0 +1,4 @@ +key: | + Line1 + Line2 + Line3 \ No newline at end of file diff --git a/libraries-data-io/src/test/resources/yaml/multiline/literal2.yaml b/libraries-data-io/src/test/resources/yaml/multiline/literal2.yaml new file mode 100644 index 0000000000..7c7fed0163 --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/literal2.yaml @@ -0,0 +1,10 @@ +key: | + + + Line1 + + Line2 + + Line3 + + diff --git a/libraries-data-io/src/test/resources/yaml/multiline/literal_keep.yaml b/libraries-data-io/src/test/resources/yaml/multiline/literal_keep.yaml new file mode 100644 index 0000000000..37f22684dd --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/literal_keep.yaml @@ -0,0 +1,5 @@ +key: |+ + Line1 + Line2 + Line3 + diff --git a/libraries-data-io/src/test/resources/yaml/multiline/literal_strip.yaml b/libraries-data-io/src/test/resources/yaml/multiline/literal_strip.yaml new file mode 100644 index 0000000000..0791e13d5d --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/literal_strip.yaml @@ -0,0 +1,5 @@ +key: |- + Line1 + Line2 + Line3 + diff --git a/libraries-data-io/src/test/resources/yaml/multiline/plain_double_quotes.yaml b/libraries-data-io/src/test/resources/yaml/multiline/plain_double_quotes.yaml new file mode 100644 index 0000000000..ccab040a27 --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/plain_double_quotes.yaml @@ -0,0 +1 @@ +key: "Line1\nLine2\nLine3" \ No newline at end of file diff --git a/libraries-data-io/src/test/resources/yaml/multiline/plain_single_quotes.yaml b/libraries-data-io/src/test/resources/yaml/multiline/plain_single_quotes.yaml new file mode 100644 index 0000000000..acbf35a462 --- /dev/null +++ b/libraries-data-io/src/test/resources/yaml/multiline/plain_single_quotes.yaml @@ -0,0 +1,3 @@ +key: 'Line1\nLine2 + + Line3' \ No newline at end of file diff --git a/libraries-http/README.md b/libraries-http/README.md index f5afb2d277..1f065a9d4a 100644 --- a/libraries-http/README.md +++ b/libraries-http/README.md @@ -12,3 +12,5 @@ This module contains articles about HTTP libraries. - [Introduction to Retrofit](https://www.baeldung.com/retrofit) - [A Guide to Unirest](https://www.baeldung.com/unirest) - [Creating REST Microservices with Javalin](https://www.baeldung.com/javalin-rest-microservices) +- [A Quick Guide to Timeouts in OkHttp](https://www.baeldung.com/okhttp-timeouts) +- [A Quick Guide to Post Requests with OkHttp](https://www.baeldung.com/okhttp-post) diff --git a/libraries-security/README.md b/libraries-security/README.md index 819bc866cf..580ebdeab0 100644 --- a/libraries-security/README.md +++ b/libraries-security/README.md @@ -9,4 +9,4 @@ This module contains articles about security libraries. - [Guide to Google Tink](https://www.baeldung.com/google-tink) - [Introduction to BouncyCastle with Java](https://www.baeldung.com/java-bouncy-castle) - [Intro to Jasypt](https://www.baeldung.com/jasypt) -- [Digital Signature in Java](https://www.baeldung.com/java-digital-signature) +- [Digital Signatures in Java](https://www.baeldung.com/java-digital-signature) diff --git a/logging-modules/logback/README.md b/logging-modules/logback/README.md index 58dc8ce541..05a4ab9308 100644 --- a/logging-modules/logback/README.md +++ b/logging-modules/logback/README.md @@ -2,3 +2,4 @@ - [Get Log Output in JSON](https://www.baeldung.com/java-log-json-output) - [SLF4J Warning: Class Path Contains Multiple SLF4J Bindings](https://www.baeldung.com/slf4j-classpath-multiple-bindings) +- [Sending Emails with Logback](https://www.baeldung.com/logback-send-email) diff --git a/maven-all/maven-custom-plugin/README.md b/maven-all/maven-custom-plugin/README.md new file mode 100644 index 0000000000..55d147c337 --- /dev/null +++ b/maven-all/maven-custom-plugin/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [How to Create a Maven Plugin](https://www.baeldung.com/maven-plugin) diff --git a/maven-all/maven/proxy/README.md b/maven-all/maven/proxy/README.md new file mode 100644 index 0000000000..9ae1fd6ad5 --- /dev/null +++ b/maven-all/maven/proxy/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [Using Maven Behind a Proxy](https://www.baeldung.com/maven-behind-proxy) diff --git a/maven-all/profiles/pom.xml b/maven-all/profiles/pom.xml index 01b191c7d6..4ae6d1ee40 100644 --- a/maven-all/profiles/pom.xml +++ b/maven-all/profiles/pom.xml @@ -73,7 +73,7 @@ org.apache.maven.plugins maven-help-plugin - 3.2.0 + ${help.plugin.version} show-profiles @@ -87,4 +87,8 @@ + + 3.2.0 + + \ No newline at end of file diff --git a/maven-all/versions-maven-plugin/original/pom.xml b/maven-all/versions-maven-plugin/original/pom.xml index c6c1657b25..54140aec9b 100644 --- a/maven-all/versions-maven-plugin/original/pom.xml +++ b/maven-all/versions-maven-plugin/original/pom.xml @@ -46,7 +46,7 @@ org.codehaus.mojo versions-maven-plugin - 2.7 + ${versions.plugin.version} org.apache.commons:commons-collections4 @@ -76,6 +76,7 @@ 4.0 3.0 1.9.1 + 2.7 \ No newline at end of file diff --git a/netflix-modules/genie/pom.xml b/netflix-modules/genie/pom.xml index 835bbf2b50..2c7c04b26b 100644 --- a/netflix-modules/genie/pom.xml +++ b/netflix-modules/genie/pom.xml @@ -3,7 +3,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 genie - 1.0.0-SNAPSHOT Genie jar Sample project for Netflix Genie diff --git a/netflix-modules/pom.xml b/netflix-modules/pom.xml index 5a082e8f1a..9ed22498d8 100644 --- a/netflix-modules/pom.xml +++ b/netflix-modules/pom.xml @@ -3,7 +3,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 netflix-modules - 1.0.0-SNAPSHOT Netflix Modules pom Module for Netflix projects diff --git a/ninja/README.md b/ninja/README.md new file mode 100644 index 0000000000..554d088c1b --- /dev/null +++ b/ninja/README.md @@ -0,0 +1,3 @@ +### Relevant Articles + +- [Introduction to Ninja Framework](https://www.baeldung.com/ninja-framework-intro) diff --git a/ninja/pom.xml b/ninja/pom.xml index b66225f693..afb1d509b8 100644 --- a/ninja/pom.xml +++ b/ninja/pom.xml @@ -16,6 +16,12 @@ 3.3.4 2.1.3 1.4.186 + 3.2 + 1.8 + 1.8 + 1.3.1 + 2.8.2 + 2.2 @@ -23,16 +29,16 @@ org.apache.maven.plugins maven-compiler-plugin - 3.2 + ${compiler.plugin.version} - 1.8 - 1.8 + ${source.version} + ${target.version} org.apache.maven.plugins maven-enforcer-plugin - 1.3.1 + ${enforcer.plugin.version} enforce-banned-dependencies @@ -95,7 +101,7 @@ org.apache.maven.plugins maven-deploy-plugin - 2.8.2 + ${deploy.plugin.version} true @@ -103,7 +109,7 @@ org.apache.maven.plugins maven-shade-plugin - 2.2 + ${shade.plugin.version} true diff --git a/oauth2-framework-impl/README.md b/oauth2-framework-impl/README.md index ea9686b451..ae28c1b511 100644 --- a/oauth2-framework-impl/README.md +++ b/oauth2-framework-impl/README.md @@ -4,4 +4,4 @@ This module contains articles about the implementation of OAuth2 with Java EE. ### Relevant Articles -- [Implementing The OAuth 2.0 Authorization Framework Using Java EE](https://www.baeldung.com/java-ee-oauth2-implementation) +- [Implementing The OAuth 2.0 Authorization Framework Using Jakarta EE](https://www.baeldung.com/java-ee-oauth2-implementation) diff --git a/open-liberty/pom.xml b/open-liberty/pom.xml new file mode 100644 index 0000000000..d6588ce49a --- /dev/null +++ b/open-liberty/pom.xml @@ -0,0 +1,130 @@ + + + 4.0.0 + + com.baeldung + open-liberty + 1.0-SNAPSHOT + war + + + + jakarta.platform + jakarta.jakartaee-web-api + ${version.jakarta.jakartaee-web-api} + provided + + + org.eclipse.microprofile + microprofile + ${version.microprofile} + pom + provided + + + org.apache.derby + derby + ${version.derby} + + + + + junit + junit + ${version.junit} + test + + + org.eclipse + yasson + ${version.yasson} + test + + + org.apache.cxf + cxf-rt-rs-client + ${version.cxf-rt-rs-client} + test + + + org.glassfish + javax.json + ${version.javax.json} + test + + + org.apache.cxf + cxf-rt-rs-mp-client + ${version.cxf-rt-rs-mp-client} + test + + + + + ${project.artifactId} + + + + io.openliberty.tools + liberty-maven-plugin + ${version.liberty-maven-plugin} + + + org.apache.maven.plugins + maven-dependency-plugin + ${version.maven-dependency-plugin} + + + copy-derby-dependency + package + + copy-dependencies + + + derby + ${project.build.directory}/liberty/wlp/usr/shared/resources/ + + ${testServerHttpPort} + + + + + + + org.apache.maven.plugins + maven-war-plugin + ${version.maven-war-plugin} + + + + + + + 1.8 + 1.8 + UTF-8 + UTF-8 + false + + + 8.0.0 + 3.2 + 10.14.2.0 + 3.1 + 2.10 + 3.2.3 + 4.12 + 1.0.5 + 3.2.6 + 1.0.4 + 3.3.1 + + + openliberty + 9080 + 9443 + 7070 + + \ No newline at end of file diff --git a/open-liberty/src/main/java/com/baeldung/openliberty/person/dao/PersonDao.java b/open-liberty/src/main/java/com/baeldung/openliberty/person/dao/PersonDao.java new file mode 100644 index 0000000000..e2d408d8b0 --- /dev/null +++ b/open-liberty/src/main/java/com/baeldung/openliberty/person/dao/PersonDao.java @@ -0,0 +1,24 @@ +package com.baeldung.openliberty.person.dao; + +import javax.enterprise.context.RequestScoped; +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; + +import com.baeldung.openliberty.person.model.Person; + +@RequestScoped +public class PersonDao { + + @PersistenceContext(name = "jpa-unit") + private EntityManager em; + + public Person createPerson(Person person) { + em.persist(person); + return person; + } + + public Person readPerson(int personId) { + return em.find(Person.class, personId); + } + +} \ No newline at end of file diff --git a/open-liberty/src/main/java/com/baeldung/openliberty/person/model/Person.java b/open-liberty/src/main/java/com/baeldung/openliberty/person/model/Person.java new file mode 100644 index 0000000000..79e8c16911 --- /dev/null +++ b/open-liberty/src/main/java/com/baeldung/openliberty/person/model/Person.java @@ -0,0 +1,58 @@ +package com.baeldung.openliberty.person.model; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.validation.constraints.Email; +import javax.validation.constraints.NotBlank; + +@Entity +public class Person { + + @GeneratedValue(strategy = GenerationType.AUTO) + @Id + private int id; + + private String username; + private String email; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public Person(int id, @NotBlank String username, @Email String email) { + super(); + this.id = id; + this.username = username; + this.email = email; + } + + public Person() { + super(); + } + + public String toString() { + return this.id + ":" +this.username; + } +} diff --git a/open-liberty/src/main/java/com/baeldung/openliberty/person/resource/PersonResource.java b/open-liberty/src/main/java/com/baeldung/openliberty/person/resource/PersonResource.java new file mode 100644 index 0000000000..0fb86860b8 --- /dev/null +++ b/open-liberty/src/main/java/com/baeldung/openliberty/person/resource/PersonResource.java @@ -0,0 +1,52 @@ +package com.baeldung.openliberty.person.resource; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import javax.enterprise.context.RequestScoped; +import javax.inject.Inject; +import javax.transaction.Transactional; +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +import com.baeldung.openliberty.person.dao.PersonDao; +import com.baeldung.openliberty.person.model.Person; + +@RequestScoped +@Path("persons") +public class PersonResource { + + @Inject + private PersonDao personDao; + + @GET + @Produces(MediaType.APPLICATION_JSON) + public List getAllPersons() { + return Arrays.asList(new Person(1, "normanlewis", "normanlewis@email.com")); + } + + @POST + @Consumes(MediaType.APPLICATION_JSON) + @Transactional + public Response addPerson(Person person) { + personDao.createPerson(person); + String respMessage = "Person #" + person.getId() + " created successfully."; + return Response.status(Response.Status.CREATED).entity(respMessage).build(); + } + + @GET + @Path("{id}") + @Produces(MediaType.APPLICATION_JSON) + @Transactional + public Person getPerson(@PathParam("id") int id) { + Person person = personDao.readPerson(id); + return person; + } +} diff --git a/open-liberty/src/main/java/com/baeldung/openliberty/rest/ApiApplication.java b/open-liberty/src/main/java/com/baeldung/openliberty/rest/ApiApplication.java new file mode 100644 index 0000000000..176eaccaed --- /dev/null +++ b/open-liberty/src/main/java/com/baeldung/openliberty/rest/ApiApplication.java @@ -0,0 +1,9 @@ +package com.baeldung.openliberty.rest; + +import javax.ws.rs.ApplicationPath; +import javax.ws.rs.core.Application; + +@ApplicationPath("/api") +public class ApiApplication extends Application { + +} diff --git a/open-liberty/src/main/java/com/baeldung/openliberty/rest/consumes/RestConsumer.java b/open-liberty/src/main/java/com/baeldung/openliberty/rest/consumes/RestConsumer.java new file mode 100644 index 0000000000..8073c408dd --- /dev/null +++ b/open-liberty/src/main/java/com/baeldung/openliberty/rest/consumes/RestConsumer.java @@ -0,0 +1,18 @@ +package com.baeldung.openliberty.rest.consumes; + +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.core.Response; + +public class RestConsumer { + + public static String consumeWithJsonb(String targetUrl) { + Client client = ClientBuilder.newClient(); + Response response = client.target(targetUrl).request().get(); + String result = response.readEntity(String.class); + response.close(); + client.close(); + return result; + } + +} diff --git a/open-liberty/src/main/java/com/baeldung/openliberty/servlet/AppServlet.java b/open-liberty/src/main/java/com/baeldung/openliberty/servlet/AppServlet.java new file mode 100644 index 0000000000..d8c8d159c4 --- /dev/null +++ b/open-liberty/src/main/java/com/baeldung/openliberty/servlet/AppServlet.java @@ -0,0 +1,27 @@ +package com.baeldung.openliberty.servlet; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +@WebServlet(urlPatterns="/app") +public class AppServlet extends HttpServlet { + + private static final long serialVersionUID = 1L; + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + String htmlOutput = "

Hello! Welcome to Open Liberty

"; + response.getWriter().append(htmlOutput); + } + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + doGet(request, response); + } +} \ No newline at end of file diff --git a/open-liberty/src/main/liberty/config/server.xml b/open-liberty/src/main/liberty/config/server.xml new file mode 100644 index 0000000000..bc99905058 --- /dev/null +++ b/open-liberty/src/main/liberty/config/server.xml @@ -0,0 +1,28 @@ + + + mpHealth-2.0 + servlet-4.0 + jaxrs-2.1 + jsonp-1.1 + jsonb-1.0 + cdi-2.0 + jpa-2.2 + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/open-liberty/src/main/resources/META-INF/persistence.xml b/open-liberty/src/main/resources/META-INF/persistence.xml new file mode 100644 index 0000000000..ca8ad1a5c9 --- /dev/null +++ b/open-liberty/src/main/resources/META-INF/persistence.xml @@ -0,0 +1,14 @@ + + + + jdbc/jpadatasource + + + + + + \ No newline at end of file diff --git a/open-liberty/src/test/java/com/baeldung/openliberty/RestClientTest.java b/open-liberty/src/test/java/com/baeldung/openliberty/RestClientTest.java new file mode 100644 index 0000000000..4978483ca0 --- /dev/null +++ b/open-liberty/src/test/java/com/baeldung/openliberty/RestClientTest.java @@ -0,0 +1,40 @@ +package com.baeldung.openliberty; + +import static org.junit.Assert.assertEquals; + +import javax.json.bind.JsonbBuilder; + +import org.junit.BeforeClass; +import org.junit.Test; + +import com.baeldung.openliberty.person.model.Person; +import com.baeldung.openliberty.rest.consumes.RestConsumer; + +public class RestClientTest { + + private static String BASE_URL; + + private final String API_PERSON = "api/persons"; + + @BeforeClass + public static void oneTimeSetup() { + BASE_URL = "http://localhost:9080/"; + } + + @Test + public void testSuite() { + //run the test only when liberty server is started + //this.whenConsumeWithJsonb_thenGetPerson(); + } + + public void whenConsumeWithJsonb_thenGetPerson() { + String url = BASE_URL + API_PERSON + "/1"; + String result = RestConsumer.consumeWithJsonb(url); + + Person person = JsonbBuilder.create().fromJson(result, Person.class); + assertEquals(1, person.getId()); + assertEquals("normanlewis", person.getUsername()); + assertEquals("normanlewis@email.com", person.getEmail()); + } + +} diff --git a/osgi/pom.xml b/osgi/pom.xml index ed708e8004..afc980c8bd 100644 --- a/osgi/pom.xml +++ b/osgi/pom.xml @@ -11,7 +11,6 @@ com.baeldung parent-modules 1.0.0-SNAPSHOT - .. diff --git a/parent-boot-2/pom.xml b/parent-boot-2/pom.xml index 881a0f1d67..43911a26ad 100644 --- a/parent-boot-2/pom.xml +++ b/parent-boot-2/pom.xml @@ -79,7 +79,7 @@ 3.3.0 1.0.22.RELEASE - 2.1.9.RELEASE + 2.2.2.RELEASE diff --git a/parent-java/pom.xml b/parent-java/pom.xml index 47965fc36d..e4ec2255c6 100644 --- a/parent-java/pom.xml +++ b/parent-java/pom.xml @@ -27,11 +27,22 @@ commons-io ${commons.io.version} + + org.openjdk.jmh + jmh-core + ${jmh.version} + + + org.openjdk.jmh + jmh-generator-annprocess + ${jmh.version} + 23.0 2.6 + 1.19 diff --git a/parent-kotlin/pom.xml b/parent-kotlin/pom.xml index a180343378..abc871ca91 100644 --- a/parent-kotlin/pom.xml +++ b/parent-kotlin/pom.xml @@ -16,7 +16,7 @@ jcenter - http://jcenter.bintray.com + https://jcenter.bintray.com kotlin-ktor @@ -45,7 +45,7 @@ org.springframework.boot spring-boot-dependencies - 2.2.0.M4 + ${boot.dependencies.version} pom import @@ -215,6 +215,7 @@ 0.9.5 3.12.0 1.3.2 + 2.2.0.M4 diff --git a/parent-spring-4/pom.xml b/parent-spring-4/pom.xml index 671ca7db6b..3749c5016e 100644 --- a/parent-spring-4/pom.xml +++ b/parent-spring-4/pom.xml @@ -51,7 +51,7 @@
- 4.3.25.RELEASE + 4.3.26.RELEASE 1.6.1 diff --git a/patterns/design-patterns-architectural/pom.xml b/patterns/design-patterns-architectural/pom.xml index 81cc55aa21..d1945a1d0a 100644 --- a/patterns/design-patterns-architectural/pom.xml +++ b/patterns/design-patterns-architectural/pom.xml @@ -11,7 +11,6 @@ com.baeldung patterns 1.0.0-SNAPSHOT - .. @@ -22,11 +21,6 @@ test - - javax - javaee-api - ${javaee.version} - org.hibernate hibernate-core @@ -41,11 +35,7 @@ - UTF-8 - 1.8 - 1.8 3.9.1 - 8.0 5.2.16.Final 6.0.6 diff --git a/patterns/design-patterns-behavioral-2/pom.xml b/patterns/design-patterns-behavioral-2/pom.xml index 4cbe6e32b9..3a6d21353e 100644 --- a/patterns/design-patterns-behavioral-2/pom.xml +++ b/patterns/design-patterns-behavioral-2/pom.xml @@ -11,7 +11,6 @@ com.baeldung patterns 1.0.0-SNAPSHOT - .. @@ -24,9 +23,6 @@ - UTF-8 - 1.8 - 1.8 3.12.2 diff --git a/patterns/design-patterns-behavioral/pom.xml b/patterns/design-patterns-behavioral/pom.xml index c4ae00435e..aceaabf582 100644 --- a/patterns/design-patterns-behavioral/pom.xml +++ b/patterns/design-patterns-behavioral/pom.xml @@ -11,7 +11,6 @@ com.baeldung patterns 1.0.0-SNAPSHOT - .. @@ -41,9 +40,6 @@ - UTF-8 - 1.8 - 1.8 16.0.2 3.9.1 diff --git a/patterns/design-patterns-cloud/pom.xml b/patterns/design-patterns-cloud/pom.xml index 51f6a42f76..34defb7eac 100644 --- a/patterns/design-patterns-cloud/pom.xml +++ b/patterns/design-patterns-cloud/pom.xml @@ -9,47 +9,4 @@ design-patterns-cloud pom - - - junit - junit - ${junit.version} - test - - - org.mockito - mockito-core - ${mockito-core.version} - test - - - io.github.resilience4j - resilience4j-retry - ${resilience4j.version} - test - - - org.slf4j - slf4j-api - ${slf4j.version} - test - - - org.slf4j - slf4j-simple - ${slf4j.version} - test - - - - - UTF-8 - 1.8 - 1.8 - 4.12 - 2.27.0 - 1.7.26 - 0.16.0 - - diff --git a/patterns/design-patterns-creational/pom.xml b/patterns/design-patterns-creational/pom.xml index aa20c1c085..7c2742ade4 100644 --- a/patterns/design-patterns-creational/pom.xml +++ b/patterns/design-patterns-creational/pom.xml @@ -11,7 +11,6 @@ com.baeldung patterns 1.0.0-SNAPSHOT - .. @@ -36,10 +35,6 @@ - UTF-8 - 1.8 - 1.8 - 2.4.1 3.0.2 3.9.1 diff --git a/patterns/design-patterns-functional/pom.xml b/patterns/design-patterns-functional/pom.xml index ec37ad1e8d..e5166dc61e 100644 --- a/patterns/design-patterns-functional/pom.xml +++ b/patterns/design-patterns-functional/pom.xml @@ -11,13 +11,6 @@ com.baeldung patterns 1.0.0-SNAPSHOT - .. - - UTF-8 - 1.8 - 1.8 - - diff --git a/patterns/design-patterns-structural/pom.xml b/patterns/design-patterns-structural/pom.xml index 97e0b9b38b..c37b6845be 100644 --- a/patterns/design-patterns-structural/pom.xml +++ b/patterns/design-patterns-structural/pom.xml @@ -11,7 +11,6 @@ com.baeldung patterns 1.0.0-SNAPSHOT - .. @@ -22,10 +21,4 @@ - - UTF-8 - 1.8 - 1.8 - - diff --git a/patterns/dip/pom.xml b/patterns/dip/pom.xml index 37c980f2e3..7217c4fdcc 100644 --- a/patterns/dip/pom.xml +++ b/patterns/dip/pom.xml @@ -12,16 +12,9 @@ com.baeldung patterns 1.0.0-SNAPSHOT - .. - - junit - junit - ${junit.version} - test - org.assertj assertj-core @@ -31,9 +24,6 @@ - UTF-8 - 11 - 11 3.12.1 diff --git a/patterns/front-controller/pom.xml b/patterns/front-controller/pom.xml index 1de3b82fcd..dc10250946 100644 --- a/patterns/front-controller/pom.xml +++ b/patterns/front-controller/pom.xml @@ -10,7 +10,6 @@ com.baeldung patterns 1.0.0-SNAPSHOT - .. diff --git a/patterns/intercepting-filter/pom.xml b/patterns/intercepting-filter/pom.xml index 435c1e13cf..7f2f57b5e1 100644 --- a/patterns/intercepting-filter/pom.xml +++ b/patterns/intercepting-filter/pom.xml @@ -10,7 +10,6 @@ com.baeldung patterns 1.0.0-SNAPSHOT - .. @@ -27,15 +26,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - ${java.version} - ${java.version} - - org.apache.maven.plugins maven-war-plugin diff --git a/patterns/pom.xml b/patterns/pom.xml index 8a510769a9..4c17055231 100644 --- a/patterns/pom.xml +++ b/patterns/pom.xml @@ -10,21 +10,20 @@ com.baeldung parent-modules 1.0.0-SNAPSHOT - .. - front-controller - intercepting-filter design-patterns-architectural design-patterns-behavioral design-patterns-behavioral-2 + design-patterns-cloud design-patterns-creational design-patterns-functional design-patterns-structural - solid dip - design-patterns-cloud + front-controller + intercepting-filter + solid diff --git a/patterns/solid/pom.xml b/patterns/solid/pom.xml index 1b0e35339d..ad76ea89fd 100644 --- a/patterns/solid/pom.xml +++ b/patterns/solid/pom.xml @@ -11,7 +11,6 @@ com.baeldung patterns 1.0.0-SNAPSHOT - .. diff --git a/performance-tests/pom.xml b/performance-tests/pom.xml index 94588c99d4..c8cebd8a11 100644 --- a/performance-tests/pom.xml +++ b/performance-tests/pom.xml @@ -38,7 +38,7 @@ org.mapstruct mapstruct-processor - 1.2.0.Final + ${mapstruct-jdk8.version} provided @@ -93,6 +93,15 @@ Name of the benchmark Uber-JAR to generate. --> benchmarks + 3.1 + 2.2 + 2.5.1 + 2.4 + 2.9.1 + 2.6 + 3.3 + 2.2.1 + 2.17 @@ -100,7 +109,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.1 + ${compiler.plugin.version} ${javac.target} ${javac.target} @@ -117,7 +126,7 @@ org.apache.maven.plugins maven-shade-plugin - 2.2 + ${shade.plugin.version} package @@ -162,31 +171,31 @@ maven-install-plugin - 2.5.1 + ${install.version} maven-jar-plugin - 2.4 + ${jar.plugin.version} maven-javadoc-plugin - 2.9.1 + ${javadoc.plugin.version} maven-resources-plugin - 2.6 + ${resources.plugin.version} maven-site-plugin - 3.3 + ${site.plugin.version} maven-source-plugin - 2.2.1 + ${source.plugin.version} maven-surefire-plugin - 2.17 + ${surefire.plugin.version} diff --git a/performance-tests/src/main/java/com/baeldung/performancetests/MappingFrameworksPerformance.java b/performance-tests/src/main/java/com/baeldung/performancetests/MappingFrameworksPerformance.java index 1c9e4c5dc4..66251eb078 100644 --- a/performance-tests/src/main/java/com/baeldung/performancetests/MappingFrameworksPerformance.java +++ b/performance-tests/src/main/java/com/baeldung/performancetests/MappingFrameworksPerformance.java @@ -1,4 +1,4 @@ -package com.baeldung.performancetests.benchmark; +package com.baeldung.performancetests; import com.baeldung.performancetests.dozer.DozerConverter; import com.baeldung.performancetests.jmapper.JMapperConverter; diff --git a/persistence-modules/activejdbc/pom.xml b/persistence-modules/activejdbc/pom.xml index 47643cd639..84ce1c2b48 100644 --- a/persistence-modules/activejdbc/pom.xml +++ b/persistence-modules/activejdbc/pom.xml @@ -10,9 +10,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ @@ -41,16 +40,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - ${java.version} - ${java.version} - UTF-8 - - org.javalite activejdbc-instrumentation diff --git a/persistence-modules/apache-cayenne/pom.xml b/persistence-modules/apache-cayenne/pom.xml index 7c94c5ba39..d728e18b33 100644 --- a/persistence-modules/apache-cayenne/pom.xml +++ b/persistence-modules/apache-cayenne/pom.xml @@ -10,9 +10,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ diff --git a/persistence-modules/core-java-persistence/pom.xml b/persistence-modules/core-java-persistence/pom.xml index 80c4053743..1224523ac7 100644 --- a/persistence-modules/core-java-persistence/pom.xml +++ b/persistence-modules/core-java-persistence/pom.xml @@ -10,9 +10,8 @@ com.baeldung - parent-java - 0.0.1-SNAPSHOT - ../../parent-java + persistence-modules + 1.0.0-SNAPSHOT @@ -60,19 +59,8 @@ - - core-java-persistence - - - src/main/resources - true - - - - 42.2.5.jre7 - 8.0.15 3.10.0 2.4.0 3.2.0 diff --git a/persistence-modules/deltaspike/pom.xml b/persistence-modules/deltaspike/pom.xml index 141412654f..871bacd18b 100644 --- a/persistence-modules/deltaspike/pom.xml +++ b/persistence-modules/deltaspike/pom.xml @@ -11,9 +11,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ diff --git a/persistence-modules/elasticsearch/pom.xml b/persistence-modules/elasticsearch/pom.xml index 878dd5847b..654d43d622 100644 --- a/persistence-modules/elasticsearch/pom.xml +++ b/persistence-modules/elasticsearch/pom.xml @@ -9,9 +9,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ diff --git a/persistence-modules/hbase/README.md b/persistence-modules/hbase/README.md index df2683b27a..ea76c4ec4b 100644 --- a/persistence-modules/hbase/README.md +++ b/persistence-modules/hbase/README.md @@ -1,3 +1,3 @@ ### Relevant articles -- [HBase with Java](http://www.baeldung.com/hbase) +- [HBase with Java](https://www.baeldung.com/hbase) diff --git a/persistence-modules/hbase/pom.xml b/persistence-modules/hbase/pom.xml index 9403239fb2..f54f2d8985 100644 --- a/persistence-modules/hbase/pom.xml +++ b/persistence-modules/hbase/pom.xml @@ -7,9 +7,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ diff --git a/persistence-modules/hbase/src/main/java/org/baeldung/hbase/HBaseClientOperations.java b/persistence-modules/hbase/src/main/java/com/baeldung/hbase/HBaseClientOperations.java similarity index 99% rename from persistence-modules/hbase/src/main/java/org/baeldung/hbase/HBaseClientOperations.java rename to persistence-modules/hbase/src/main/java/com/baeldung/hbase/HBaseClientOperations.java index c78eacc834..f889e2eb56 100644 --- a/persistence-modules/hbase/src/main/java/org/baeldung/hbase/HBaseClientOperations.java +++ b/persistence-modules/hbase/src/main/java/com/baeldung/hbase/HBaseClientOperations.java @@ -1,4 +1,4 @@ -package org.baeldung.hbase; +package com.baeldung.hbase; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HColumnDescriptor; diff --git a/persistence-modules/hbase/src/main/java/org/baeldung/hbase/HbaseClientExample.java b/persistence-modules/hbase/src/main/java/com/baeldung/hbase/HbaseClientExample.java similarity index 97% rename from persistence-modules/hbase/src/main/java/org/baeldung/hbase/HbaseClientExample.java rename to persistence-modules/hbase/src/main/java/com/baeldung/hbase/HbaseClientExample.java index 07cb7df480..5546f15e36 100644 --- a/persistence-modules/hbase/src/main/java/org/baeldung/hbase/HbaseClientExample.java +++ b/persistence-modules/hbase/src/main/java/com/baeldung/hbase/HbaseClientExample.java @@ -1,4 +1,4 @@ -package org.baeldung.hbase; +package com.baeldung.hbase; import com.google.protobuf.ServiceException; diff --git a/persistence-modules/hibernate-mapping/pom.xml b/persistence-modules/hibernate-mapping/pom.xml index a0a2a047e3..ac7952fa2b 100644 --- a/persistence-modules/hibernate-mapping/pom.xml +++ b/persistence-modules/hibernate-mapping/pom.xml @@ -4,14 +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 hibernate-mapping - 1.0.0-SNAPSHOT hibernate-mapping com.baeldung persistence-modules 1.0.0-SNAPSHOT - .. @@ -55,21 +53,11 @@ - - hibernate-mapping - - - src/main/resources - true - - - - 5.3.10.Final 3.8.0 6.0.16.Final - 3.0.1-b11 + 3.0.1-b11 1.0.3 1.3 diff --git a/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/fetchMode/Customer.java b/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/fetchMode/Customer.java index 5997602205..5589601da8 100644 --- a/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/fetchMode/Customer.java +++ b/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/fetchMode/Customer.java @@ -1,4 +1,4 @@ -package com.baeldung.fetchMode; +package com.baeldung.hibernate.fetchMode; import org.hibernate.annotations.Fetch; import org.hibernate.annotations.FetchMode; diff --git a/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/fetchMode/Order.java b/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/fetchMode/Order.java index c031972830..aa9c517321 100644 --- a/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/fetchMode/Order.java +++ b/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/fetchMode/Order.java @@ -1,4 +1,4 @@ -package com.baeldung.fetchMode; +package com.baeldung.hibernate.fetchMode; import javax.persistence.*; diff --git a/persistence-modules/hibernate-ogm/pom.xml b/persistence-modules/hibernate-ogm/pom.xml index bb15881788..8f42c28eee 100644 --- a/persistence-modules/hibernate-ogm/pom.xml +++ b/persistence-modules/hibernate-ogm/pom.xml @@ -8,9 +8,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ @@ -33,12 +32,6 @@ ${narayana-jta.version} - - junit - junit - ${junit.version} - test - org.easytesting fest-assert @@ -47,16 +40,6 @@ - - hibernate-ogm - - - src/main/resources - true - - - - 5.4.0.Final 1.4 diff --git a/persistence-modules/hibernate5-2/README.md b/persistence-modules/hibernate5-2/README.md index c41b5307d0..330708f6d3 100644 --- a/persistence-modules/hibernate5-2/README.md +++ b/persistence-modules/hibernate5-2/README.md @@ -6,4 +6,6 @@ This module contains articles about Hibernate 5. - [Hibernate Error “Not all named parameters have been set”](https://www.baeldung.com/hibernate-error-named-parameters-not-set) - [FetchMode in Spring Data JPA](https://www.baeldung.com/spring-data-jpa-fetchmode) - [JPA/Hibernate Persistence Context](https://www.baeldung.com/jpa-hibernate-persistence-context) +- [FetchMode in Hibernate](https://www.baeldung.com/hibernate-fetchmode) +- [Various Logging Levels in Hibernate](https://www.baeldung.com/hibernate-logging-levels) - [[<-- Prev]](/hibernate5) diff --git a/persistence-modules/hibernate5-2/pom.xml b/persistence-modules/hibernate5-2/pom.xml index dfee4bb81e..15d42b3244 100644 --- a/persistence-modules/hibernate5-2/pom.xml +++ b/persistence-modules/hibernate5-2/pom.xml @@ -10,16 +10,15 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ org.hibernate hibernate-core - 5.4.7.Final + ${hibernate-core.version} org.springframework.boot @@ -51,19 +50,25 @@ com.h2database h2 - 1.4.200 + ${h2.version} org.apache.commons commons-lang3 - 3.8.1 + ${commons.lang3.version} + 5.4.7.Final + 1.4.200 + 3.8.1 true 2.1.7.RELEASE + 5.4.7.Final + 1.4.200 + 3.8.1 diff --git a/persistence-modules/hibernate5/pom.xml b/persistence-modules/hibernate5/pom.xml index ec06136f9c..ffeff5ee4a 100644 --- a/persistence-modules/hibernate5/pom.xml +++ b/persistence-modules/hibernate5/pom.xml @@ -9,9 +9,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ @@ -41,11 +40,6 @@ geodb ${geodb.version} - - org.hibernate - hibernate-c3p0 - ${hibernate.version} - mysql mysql-connector-java @@ -66,44 +60,14 @@ jackson-databind ${jackson.version} - - net.bytebuddy - byte-buddy - ${byte-buddy.version} - - - org.hibernate - hibernate-jpamodelgen - ${hibernate.version} - - - org.openjdk.jmh - jmh-core - ${openjdk-jmh.version} - org.openjdk.jmh jmh-generator-annprocess ${openjdk-jmh.version} - - javax.xml.bind - jaxb-api - ${jaxb-api.version} - - - hibernate5 - - - src/test/resources - true - - - - geodb-repo @@ -119,8 +83,6 @@ 3.8.0 1.21 0.9 - 1.9.5 - 2.3.0 diff --git a/persistence-modules/influxdb/pom.xml b/persistence-modules/influxdb/pom.xml index 7531ad8217..23ae64dca1 100644 --- a/persistence-modules/influxdb/pom.xml +++ b/persistence-modules/influxdb/pom.xml @@ -10,9 +10,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ diff --git a/persistence-modules/java-cassandra/pom.xml b/persistence-modules/java-cassandra/pom.xml index 6628a393fa..54879fb321 100644 --- a/persistence-modules/java-cassandra/pom.xml +++ b/persistence-modules/java-cassandra/pom.xml @@ -3,14 +3,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 java-cassandra - 1.0.0-SNAPSHOT java-cassandra com.baeldung - parent-java - 0.0.1-SNAPSHOT - ../../parent-java + persistence-modules + 1.0.0-SNAPSHOT @@ -40,26 +38,13 @@ java-driver-query-builder ${datastax-cassandra.version} - - - io.netty - netty-handler - ${io-netty.version} - - - - java-cassandra - - 3.1.2 3.1.1.0 4.1.0 - 4.1.34.Final - 18.0 diff --git a/persistence-modules/java-cockroachdb/pom.xml b/persistence-modules/java-cockroachdb/pom.xml index 750cbfce4c..e8c6365ca3 100644 --- a/persistence-modules/java-cockroachdb/pom.xml +++ b/persistence-modules/java-cockroachdb/pom.xml @@ -8,9 +8,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ diff --git a/persistence-modules/java-jdbi/pom.xml b/persistence-modules/java-jdbi/pom.xml index 0d978dc164..eb0de45593 100644 --- a/persistence-modules/java-jdbi/pom.xml +++ b/persistence-modules/java-jdbi/pom.xml @@ -8,9 +8,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ diff --git a/persistence-modules/java-jpa-2/pom.xml b/persistence-modules/java-jpa-2/pom.xml index cc9e69fcaa..f79f6f1633 100644 --- a/persistence-modules/java-jpa-2/pom.xml +++ b/persistence-modules/java-jpa-2/pom.xml @@ -7,9 +7,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../pom.xml @@ -63,7 +62,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.5.1 + ${maven-compiler-plugin.version} -proc:none @@ -71,7 +70,7 @@ org.bsc.maven maven-processor-plugin - 3.3.3 + ${maven-processor-plugin.version} process @@ -91,7 +90,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.0.0 + ${build-helper-maven-plugin.version} add-source @@ -116,6 +115,9 @@ 42.2.5 2.2 3.11.1 + 3.5.1 + 3.3.3 + 3.0.0 \ No newline at end of file diff --git a/persistence-modules/java-jpa/pom.xml b/persistence-modules/java-jpa/pom.xml index a979cf7e65..762c541d96 100644 --- a/persistence-modules/java-jpa/pom.xml +++ b/persistence-modules/java-jpa/pom.xml @@ -8,9 +8,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../pom.xml diff --git a/persistence-modules/java-mongodb/pom.xml b/persistence-modules/java-mongodb/pom.xml index 1e59bd9064..d62240927a 100644 --- a/persistence-modules/java-mongodb/pom.xml +++ b/persistence-modules/java-mongodb/pom.xml @@ -9,9 +9,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ @@ -35,8 +34,6 @@ - 1.8 - 1.8 3.10.1 1.11 1.5.3 diff --git a/persistence-modules/java-mongodb/src/test/java/com/baeldung/aggregation/AggregationLiveTest.java b/persistence-modules/java-mongodb/src/test/java/com/baeldung/aggregation/AggregationLiveTest.java new file mode 100644 index 0000000000..62ab13563a --- /dev/null +++ b/persistence-modules/java-mongodb/src/test/java/com/baeldung/aggregation/AggregationLiveTest.java @@ -0,0 +1,111 @@ +package com.baeldung.aggregation; + +import static com.mongodb.client.model.Aggregates.count; +import static com.mongodb.client.model.Aggregates.group; +import static com.mongodb.client.model.Aggregates.limit; +import static com.mongodb.client.model.Aggregates.match; +import static com.mongodb.client.model.Aggregates.out; +import static com.mongodb.client.model.Aggregates.project; +import static com.mongodb.client.model.Aggregates.sort; +import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.Arrays; + +import org.bson.Document; +import org.bson.conversions.Bson; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +import com.mongodb.client.MongoClient; +import com.mongodb.client.MongoClients; +import com.mongodb.client.MongoCollection; +import com.mongodb.client.MongoDatabase; +import com.mongodb.client.model.Accumulators; +import com.mongodb.client.model.Filters; +import com.mongodb.client.model.Projections; +import com.mongodb.client.model.Sorts; + +public class AggregationLiveTest { + + private static final String DATABASE = "world"; + private static final String COLLECTION = "countries"; + private static final String DATASET_JSON = "/countrydata.json"; + private static MongoClient mongoClient; + private static MongoDatabase database; + private static MongoCollection collection; + + @BeforeClass + public static void setUpDB() throws IOException { + mongoClient = MongoClients.create(); + database = mongoClient.getDatabase(DATABASE); + collection = database.getCollection(COLLECTION); + + collection.drop(); + + InputStream is = AggregationLiveTest.class.getResourceAsStream(DATASET_JSON); + BufferedReader reader = new BufferedReader(new InputStreamReader(is)); + reader.lines() + .forEach(line -> collection.insertOne(Document.parse(line))); + reader.close(); + } + + @Test + public void givenCountryCollection_whenEnglishSpeakingCountriesCounted_thenNinetyOne() { + Document englishSpeakingCountries = collection.aggregate(Arrays.asList(match(Filters.eq("languages.name", "English")), count())) + .first(); + + assertEquals(91, englishSpeakingCountries.get("count")); + } + + @Test + public void givenCountryCollection_whenAreaSortedDescending_thenSuccess() { + + collection.aggregate(Arrays.asList(sort(Sorts.descending("area")), limit(7), out("largest_seven"))) + .toCollection(); + + MongoCollection largestSeven = database.getCollection("largest_seven"); + + assertEquals(7, largestSeven.countDocuments()); + + Document usa = largestSeven.find(Filters.eq("alpha3Code", "USA")) + .first(); + + assertNotNull(usa); + } + + @Test + public void givenCountryCollection_whenCountedRegionWise_thenMaxInAfrica() { + Document maxCountriedRegion = collection.aggregate(Arrays.asList(group("$region", Accumulators.sum("tally", 1)), sort(Sorts.descending("tally")))) + .first(); + assertTrue(maxCountriedRegion.containsValue("Africa")); + } + + @Test + public void givenCountryCollection_whenNeighborsCalculated_thenMaxIsFifteenInChina() { + Bson borderingCountriesCollection = project(Projections.fields(Projections.excludeId(), Projections.include("name"), Projections.computed("borderingCountries", Projections.computed("$size", "$borders")))); + + int maxValue = collection.aggregate(Arrays.asList(borderingCountriesCollection, group(null, Accumulators.max("max", "$borderingCountries")))) + .first() + .getInteger("max"); + + assertEquals(15, maxValue); + + Document maxNeighboredCountry = collection.aggregate(Arrays.asList(borderingCountriesCollection, match(Filters.eq("borderingCountries", maxValue)))) + .first(); + assertTrue(maxNeighboredCountry.containsValue("China")); + + } + + @AfterClass + public static void cleanUp() { + mongoClient.close(); + } + +} diff --git a/persistence-modules/java-mongodb/src/test/resources/countrydata.json b/persistence-modules/java-mongodb/src/test/resources/countrydata.json new file mode 100644 index 0000000000..81213c31e7 --- /dev/null +++ b/persistence-modules/java-mongodb/src/test/resources/countrydata.json @@ -0,0 +1,250 @@ +{"name":"Afghanistan","topLevelDomain":[".af"],"alpha2Code":"AF","alpha3Code":"AFG","callingCodes":["93"],"capital":"Kabul","altSpellings":["AF","Afġānistān"],"region":"Asia","subregion":"Southern Asia","population":27657145,"latlng":[33.0,65.0],"demonym":"Afghan","area":652230.0,"gini":27.8,"timezones":["UTC+04:30"],"borders":["IRN","PAK","TKM","UZB","TJK","CHN"],"nativeName":"افغانستان","numericCode":"004","currencies":[{"code":"AFN","name":"Afghan afghani","symbol":"؋"}],"languages":[{"iso639_1":"ps","iso639_2":"pus","name":"Pashto","nativeName":"پښتو"},{"iso639_1":"uz","iso639_2":"uzb","name":"Uzbek","nativeName":"Oʻzbek"},{"iso639_1":"tk","iso639_2":"tuk","name":"Turkmen","nativeName":"Türkmen"}],"translations":{"de":"Afghanistan","es":"Afganistán","fr":"Afghanistan","ja":"アフガニスタン","it":"Afghanistan","br":"Afeganistão","pt":"Afeganistão","nl":"Afghanistan","hr":"Afganistan","fa":"افغانستان"},"flag":"https://restcountries.eu/data/afg.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Association for Regional Cooperation","otherAcronyms":[],"otherNames":[]}],"cioc":"AFG"} +{"name":"Åland Islands","topLevelDomain":[".ax"],"alpha2Code":"AX","alpha3Code":"ALA","callingCodes":["358"],"capital":"Mariehamn","altSpellings":["AX","Aaland","Aland","Ahvenanmaa"],"region":"Europe","subregion":"Northern Europe","population":28875,"latlng":[60.116667,19.9],"demonym":"Ålandish","area":1580.0,"gini":null,"timezones":["UTC+02:00"],"borders":[],"nativeName":"Åland","numericCode":"248","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"sv","iso639_2":"swe","name":"Swedish","nativeName":"svenska"}],"translations":{"de":"Åland","es":"Alandia","fr":"Åland","ja":"オーランド諸島","it":"Isole Aland","br":"Ilhas de Aland","pt":"Ilhas de Aland","nl":"Ålandeilanden","hr":"Ålandski otoci","fa":"جزایر الند"},"flag":"https://restcountries.eu/data/ala.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":""} +{"name":"Albania","topLevelDomain":[".al"],"alpha2Code":"AL","alpha3Code":"ALB","callingCodes":["355"],"capital":"Tirana","altSpellings":["AL","Shqipëri","Shqipëria","Shqipnia"],"region":"Europe","subregion":"Southern Europe","population":2886026,"latlng":[41.0,20.0],"demonym":"Albanian","area":28748.0,"gini":34.5,"timezones":["UTC+01:00"],"borders":["MNE","GRC","MKD","KOS"],"nativeName":"Shqipëria","numericCode":"008","currencies":[{"code":"ALL","name":"Albanian lek","symbol":"L"}],"languages":[{"iso639_1":"sq","iso639_2":"sqi","name":"Albanian","nativeName":"Shqip"}],"translations":{"de":"Albanien","es":"Albania","fr":"Albanie","ja":"アルバニア","it":"Albania","br":"Albânia","pt":"Albânia","nl":"Albanië","hr":"Albanija","fa":"آلبانی"},"flag":"https://restcountries.eu/data/alb.svg","regionalBlocs":[{"acronym":"CEFTA","name":"Central European Free Trade Agreement","otherAcronyms":[],"otherNames":[]}],"cioc":"ALB"} +{"name":"Algeria","topLevelDomain":[".dz"],"alpha2Code":"DZ","alpha3Code":"DZA","callingCodes":["213"],"capital":"Algiers","altSpellings":["DZ","Dzayer","Algérie"],"region":"Africa","subregion":"Northern Africa","population":40400000,"latlng":[28.0,3.0],"demonym":"Algerian","area":2381741.0,"gini":35.3,"timezones":["UTC+01:00"],"borders":["TUN","LBY","NER","ESH","MRT","MLI","MAR"],"nativeName":"الجزائر","numericCode":"012","currencies":[{"code":"DZD","name":"Algerian dinar","symbol":"د.ج"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Algerien","es":"Argelia","fr":"Algérie","ja":"アルジェリア","it":"Algeria","br":"Argélia","pt":"Argélia","nl":"Algerije","hr":"Alžir","fa":"الجزایر"},"flag":"https://restcountries.eu/data/dza.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"ALG"} +{"name":"American Samoa","topLevelDomain":[".as"],"alpha2Code":"AS","alpha3Code":"ASM","callingCodes":["1684"],"capital":"Pago Pago","altSpellings":["AS","Amerika Sāmoa","Amelika Sāmoa","Sāmoa Amelika"],"region":"Oceania","subregion":"Polynesia","population":57100,"latlng":[-14.33333333,-170.0],"demonym":"American Samoan","area":199.0,"gini":null,"timezones":["UTC-11:00"],"borders":[],"nativeName":"American Samoa","numericCode":"016","currencies":[{"code":"USD","name":"United State Dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"sm","iso639_2":"smo","name":"Samoan","nativeName":"gagana fa'a Samoa"}],"translations":{"de":"Amerikanisch-Samoa","es":"Samoa Americana","fr":"Samoa américaines","ja":"アメリカ領サモア","it":"Samoa Americane","br":"Samoa Americana","pt":"Samoa Americana","nl":"Amerikaans Samoa","hr":"Američka Samoa","fa":"ساموآی آمریکا"},"flag":"https://restcountries.eu/data/asm.svg","regionalBlocs":[],"cioc":"ASA"} +{"name":"Andorra","topLevelDomain":[".ad"],"alpha2Code":"AD","alpha3Code":"AND","callingCodes":["376"],"capital":"Andorra la Vella","altSpellings":["AD","Principality of Andorra","Principat d'Andorra"],"region":"Europe","subregion":"Southern Europe","population":78014,"latlng":[42.5,1.5],"demonym":"Andorran","area":468.0,"gini":null,"timezones":["UTC+01:00"],"borders":["FRA","ESP"],"nativeName":"Andorra","numericCode":"020","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"ca","iso639_2":"cat","name":"Catalan","nativeName":"català"}],"translations":{"de":"Andorra","es":"Andorra","fr":"Andorre","ja":"アンドラ","it":"Andorra","br":"Andorra","pt":"Andorra","nl":"Andorra","hr":"Andora","fa":"آندورا"},"flag":"https://restcountries.eu/data/and.svg","regionalBlocs":[],"cioc":"AND"} +{"name":"Angola","topLevelDomain":[".ao"],"alpha2Code":"AO","alpha3Code":"AGO","callingCodes":["244"],"capital":"Luanda","altSpellings":["AO","República de Angola","ʁɛpublika de an'ɡɔla"],"region":"Africa","subregion":"Middle Africa","population":25868000,"latlng":[-12.5,18.5],"demonym":"Angolan","area":1246700.0,"gini":58.6,"timezones":["UTC+01:00"],"borders":["COG","COD","ZMB","NAM"],"nativeName":"Angola","numericCode":"024","currencies":[{"code":"AOA","name":"Angolan kwanza","symbol":"Kz"}],"languages":[{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"Angola","es":"Angola","fr":"Angola","ja":"アンゴラ","it":"Angola","br":"Angola","pt":"Angola","nl":"Angola","hr":"Angola","fa":"آنگولا"},"flag":"https://restcountries.eu/data/ago.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"ANG"} +{"name":"Anguilla","topLevelDomain":[".ai"],"alpha2Code":"AI","alpha3Code":"AIA","callingCodes":["1264"],"capital":"The Valley","altSpellings":["AI"],"region":"Americas","subregion":"Caribbean","population":13452,"latlng":[18.25,-63.16666666],"demonym":"Anguillian","area":91.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Anguilla","numericCode":"660","currencies":[{"code":"XCD","name":"East Caribbean dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Anguilla","es":"Anguilla","fr":"Anguilla","ja":"アンギラ","it":"Anguilla","br":"Anguila","pt":"Anguila","nl":"Anguilla","hr":"Angvila","fa":"آنگویلا"},"flag":"https://restcountries.eu/data/aia.svg","regionalBlocs":[],"cioc":""} +{"name":"Antarctica","topLevelDomain":[".aq"],"alpha2Code":"AQ","alpha3Code":"ATA","callingCodes":["672"],"capital":"","altSpellings":[],"region":"Polar","subregion":"","population":1000,"latlng":[-74.65,4.48],"demonym":"","area":1.4E7,"gini":null,"timezones":["UTC-03:00","UTC+03:00","UTC+05:00","UTC+06:00","UTC+07:00","UTC+08:00","UTC+10:00","UTC+12:00"],"borders":[],"nativeName":"Antarctica","numericCode":"010","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"},{"code":"GBP","name":"British pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Antarktika","es":"Antártida","fr":"Antarctique","ja":"南極大陸","it":"Antartide","br":"Antártida","pt":"Antárctida","nl":"Antarctica","hr":"Antarktika","fa":"جنوبگان"},"flag":"https://restcountries.eu/data/ata.svg","regionalBlocs":[],"cioc":""} +{"name":"Antigua and Barbuda","topLevelDomain":[".ag"],"alpha2Code":"AG","alpha3Code":"ATG","callingCodes":["1268"],"capital":"Saint John's","altSpellings":["AG"],"region":"Americas","subregion":"Caribbean","population":86295,"latlng":[17.05,-61.8],"demonym":"Antiguan, Barbudan","area":442.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Antigua and Barbuda","numericCode":"028","currencies":[{"code":"XCD","name":"East Caribbean dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Antigua und Barbuda","es":"Antigua y Barbuda","fr":"Antigua-et-Barbuda","ja":"アンティグア・バーブーダ","it":"Antigua e Barbuda","br":"Antígua e Barbuda","pt":"Antígua e Barbuda","nl":"Antigua en Barbuda","hr":"Antigva i Barbuda","fa":"آنتیگوا و باربودا"},"flag":"https://restcountries.eu/data/atg.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"ANT"} +{"name":"Argentina","topLevelDomain":[".ar"],"alpha2Code":"AR","alpha3Code":"ARG","callingCodes":["54"],"capital":"Buenos Aires","altSpellings":["AR","Argentine Republic","República Argentina"],"region":"Americas","subregion":"South America","population":43590400,"latlng":[-34.0,-64.0],"demonym":"Argentinean","area":2780400.0,"gini":44.5,"timezones":["UTC-03:00"],"borders":["BOL","BRA","CHL","PRY","URY"],"nativeName":"Argentina","numericCode":"032","currencies":[{"code":"ARS","name":"Argentine peso","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"},{"iso639_1":"gn","iso639_2":"grn","name":"Guaraní","nativeName":"Avañe'ẽ"}],"translations":{"de":"Argentinien","es":"Argentina","fr":"Argentine","ja":"アルゼンチン","it":"Argentina","br":"Argentina","pt":"Argentina","nl":"Argentinië","hr":"Argentina","fa":"آرژانتین"},"flag":"https://restcountries.eu/data/arg.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"ARG"} +{"name":"Armenia","topLevelDomain":[".am"],"alpha2Code":"AM","alpha3Code":"ARM","callingCodes":["374"],"capital":"Yerevan","altSpellings":["AM","Hayastan","Republic of Armenia","Հայաստանի Հանրապետություն"],"region":"Asia","subregion":"Western Asia","population":2994400,"latlng":[40.0,45.0],"demonym":"Armenian","area":29743.0,"gini":30.9,"timezones":["UTC+04:00"],"borders":["AZE","GEO","IRN","TUR"],"nativeName":"Հայաստան","numericCode":"051","currencies":[{"code":"AMD","name":"Armenian dram","symbol":null}],"languages":[{"iso639_1":"hy","iso639_2":"hye","name":"Armenian","nativeName":"Հայերեն"},{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Armenien","es":"Armenia","fr":"Arménie","ja":"アルメニア","it":"Armenia","br":"Armênia","pt":"Arménia","nl":"Armenië","hr":"Armenija","fa":"ارمنستان"},"flag":"https://restcountries.eu/data/arm.svg","regionalBlocs":[{"acronym":"EEU","name":"Eurasian Economic Union","otherAcronyms":["EAEU"],"otherNames":[]}],"cioc":"ARM"} +{"name":"Aruba","topLevelDomain":[".aw"],"alpha2Code":"AW","alpha3Code":"ABW","callingCodes":["297"],"capital":"Oranjestad","altSpellings":["AW"],"region":"Americas","subregion":"Caribbean","population":107394,"latlng":[12.5,-69.96666666],"demonym":"Aruban","area":180.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Aruba","numericCode":"533","currencies":[{"code":"AWG","name":"Aruban florin","symbol":"ƒ"}],"languages":[{"iso639_1":"nl","iso639_2":"nld","name":"Dutch","nativeName":"Nederlands"},{"iso639_1":"pa","iso639_2":"pan","name":"(Eastern) Punjabi","nativeName":"ਪੰਜਾਬੀ"}],"translations":{"de":"Aruba","es":"Aruba","fr":"Aruba","ja":"アルバ","it":"Aruba","br":"Aruba","pt":"Aruba","nl":"Aruba","hr":"Aruba","fa":"آروبا"},"flag":"https://restcountries.eu/data/abw.svg","regionalBlocs":[],"cioc":"ARU"} +{"name":"Australia","topLevelDomain":[".au"],"alpha2Code":"AU","alpha3Code":"AUS","callingCodes":["61"],"capital":"Canberra","altSpellings":["AU"],"region":"Oceania","subregion":"Australia and New Zealand","population":24117360,"latlng":[-27.0,133.0],"demonym":"Australian","area":7692024.0,"gini":30.5,"timezones":["UTC+05:00","UTC+06:30","UTC+07:00","UTC+08:00","UTC+09:30","UTC+10:00","UTC+10:30","UTC+11:30"],"borders":[],"nativeName":"Australia","numericCode":"036","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Australien","es":"Australia","fr":"Australie","ja":"オーストラリア","it":"Australia","br":"Austrália","pt":"Austrália","nl":"Australië","hr":"Australija","fa":"استرالیا"},"flag":"https://restcountries.eu/data/aus.svg","regionalBlocs":[],"cioc":"AUS"} +{"name":"Austria","topLevelDomain":[".at"],"alpha2Code":"AT","alpha3Code":"AUT","callingCodes":["43"],"capital":"Vienna","altSpellings":["AT","Österreich","Osterreich","Oesterreich"],"region":"Europe","subregion":"Western Europe","population":8725931,"latlng":[47.33333333,13.33333333],"demonym":"Austrian","area":83871.0,"gini":26.0,"timezones":["UTC+01:00"],"borders":["CZE","DEU","HUN","ITA","LIE","SVK","SVN","CHE"],"nativeName":"Österreich","numericCode":"040","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"de","iso639_2":"deu","name":"German","nativeName":"Deutsch"}],"translations":{"de":"Österreich","es":"Austria","fr":"Autriche","ja":"オーストリア","it":"Austria","br":"áustria","pt":"áustria","nl":"Oostenrijk","hr":"Austrija","fa":"اتریش"},"flag":"https://restcountries.eu/data/aut.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"AUT"} +{"name":"Azerbaijan","topLevelDomain":[".az"],"alpha2Code":"AZ","alpha3Code":"AZE","callingCodes":["994"],"capital":"Baku","altSpellings":["AZ","Republic of Azerbaijan","Azərbaycan Respublikası"],"region":"Asia","subregion":"Western Asia","population":9730500,"latlng":[40.5,47.5],"demonym":"Azerbaijani","area":86600.0,"gini":33.7,"timezones":["UTC+04:00"],"borders":["ARM","GEO","IRN","RUS","TUR"],"nativeName":"Azərbaycan","numericCode":"031","currencies":[{"code":"AZN","name":"Azerbaijani manat","symbol":null}],"languages":[{"iso639_1":"az","iso639_2":"aze","name":"Azerbaijani","nativeName":"azərbaycan dili"}],"translations":{"de":"Aserbaidschan","es":"Azerbaiyán","fr":"Azerbaïdjan","ja":"アゼルバイジャン","it":"Azerbaijan","br":"Azerbaijão","pt":"Azerbaijão","nl":"Azerbeidzjan","hr":"Azerbajdžan","fa":"آذربایجان"},"flag":"https://restcountries.eu/data/aze.svg","regionalBlocs":[],"cioc":"AZE"} +{"name":"Bahamas","topLevelDomain":[".bs"],"alpha2Code":"BS","alpha3Code":"BHS","callingCodes":["1242"],"capital":"Nassau","altSpellings":["BS","Commonwealth of the Bahamas"],"region":"Americas","subregion":"Caribbean","population":378040,"latlng":[24.25,-76.0],"demonym":"Bahamian","area":13943.0,"gini":null,"timezones":["UTC-05:00"],"borders":[],"nativeName":"Bahamas","numericCode":"044","currencies":[{"code":"BSD","name":"Bahamian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Bahamas","es":"Bahamas","fr":"Bahamas","ja":"バハマ","it":"Bahamas","br":"Bahamas","pt":"Baamas","nl":"Bahama’s","hr":"Bahami","fa":"باهاما"},"flag":"https://restcountries.eu/data/bhs.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"BAH"} +{"name":"Bahrain","topLevelDomain":[".bh"],"alpha2Code":"BH","alpha3Code":"BHR","callingCodes":["973"],"capital":"Manama","altSpellings":["BH","Kingdom of Bahrain","Mamlakat al-Baḥrayn"],"region":"Asia","subregion":"Western Asia","population":1404900,"latlng":[26.0,50.55],"demonym":"Bahraini","area":765.0,"gini":null,"timezones":["UTC+03:00"],"borders":[],"nativeName":"‏البحرين","numericCode":"048","currencies":[{"code":"BHD","name":"Bahraini dinar","symbol":".د.ب"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Bahrain","es":"Bahrein","fr":"Bahreïn","ja":"バーレーン","it":"Bahrein","br":"Bahrein","pt":"Barém","nl":"Bahrein","hr":"Bahrein","fa":"بحرین"},"flag":"https://restcountries.eu/data/bhr.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"BRN"} +{"name":"Bangladesh","topLevelDomain":[".bd"],"alpha2Code":"BD","alpha3Code":"BGD","callingCodes":["880"],"capital":"Dhaka","altSpellings":["BD","People's Republic of Bangladesh","Gônôprôjatôntri Bangladesh"],"region":"Asia","subregion":"Southern Asia","population":161006790,"latlng":[24.0,90.0],"demonym":"Bangladeshi","area":147570.0,"gini":32.1,"timezones":["UTC+06:00"],"borders":["MMR","IND"],"nativeName":"Bangladesh","numericCode":"050","currencies":[{"code":"BDT","name":"Bangladeshi taka","symbol":"৳"}],"languages":[{"iso639_1":"bn","iso639_2":"ben","name":"Bengali","nativeName":"বাংলা"}],"translations":{"de":"Bangladesch","es":"Bangladesh","fr":"Bangladesh","ja":"バングラデシュ","it":"Bangladesh","br":"Bangladesh","pt":"Bangladeche","nl":"Bangladesh","hr":"Bangladeš","fa":"بنگلادش"},"flag":"https://restcountries.eu/data/bgd.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Association for Regional Cooperation","otherAcronyms":[],"otherNames":[]}],"cioc":"BAN"} +{"name":"Barbados","topLevelDomain":[".bb"],"alpha2Code":"BB","alpha3Code":"BRB","callingCodes":["1246"],"capital":"Bridgetown","altSpellings":["BB"],"region":"Americas","subregion":"Caribbean","population":285000,"latlng":[13.16666666,-59.53333333],"demonym":"Barbadian","area":430.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Barbados","numericCode":"052","currencies":[{"code":"BBD","name":"Barbadian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Barbados","es":"Barbados","fr":"Barbade","ja":"バルバドス","it":"Barbados","br":"Barbados","pt":"Barbados","nl":"Barbados","hr":"Barbados","fa":"باربادوس"},"flag":"https://restcountries.eu/data/brb.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"BAR"} +{"name":"Belarus","topLevelDomain":[".by"],"alpha2Code":"BY","alpha3Code":"BLR","callingCodes":["375"],"capital":"Minsk","altSpellings":["BY","Bielaruś","Republic of Belarus","Белоруссия","Республика Беларусь","Belorussiya","Respublika Belarus’"],"region":"Europe","subregion":"Eastern Europe","population":9498700,"latlng":[53.0,28.0],"demonym":"Belarusian","area":207600.0,"gini":26.5,"timezones":["UTC+03:00"],"borders":["LVA","LTU","POL","RUS","UKR"],"nativeName":"Белару́сь","numericCode":"112","currencies":[{"code":"BYN","name":"New Belarusian ruble","symbol":"Br"},{"code":"BYR","name":"Old Belarusian ruble","symbol":"Br"}],"languages":[{"iso639_1":"be","iso639_2":"bel","name":"Belarusian","nativeName":"беларуская мова"},{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Weißrussland","es":"Bielorrusia","fr":"Biélorussie","ja":"ベラルーシ","it":"Bielorussia","br":"Bielorrússia","pt":"Bielorrússia","nl":"Wit-Rusland","hr":"Bjelorusija","fa":"بلاروس"},"flag":"https://restcountries.eu/data/blr.svg","regionalBlocs":[{"acronym":"EEU","name":"Eurasian Economic Union","otherAcronyms":["EAEU"],"otherNames":[]}],"cioc":"BLR"} +{"name":"Belgium","topLevelDomain":[".be"],"alpha2Code":"BE","alpha3Code":"BEL","callingCodes":["32"],"capital":"Brussels","altSpellings":["BE","België","Belgie","Belgien","Belgique","Kingdom of Belgium","Koninkrijk België","Royaume de Belgique","Königreich Belgien"],"region":"Europe","subregion":"Western Europe","population":11319511,"latlng":[50.83333333,4.0],"demonym":"Belgian","area":30528.0,"gini":33.0,"timezones":["UTC+01:00"],"borders":["FRA","DEU","LUX","NLD"],"nativeName":"België","numericCode":"056","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"nl","iso639_2":"nld","name":"Dutch","nativeName":"Nederlands"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"de","iso639_2":"deu","name":"German","nativeName":"Deutsch"}],"translations":{"de":"Belgien","es":"Bélgica","fr":"Belgique","ja":"ベルギー","it":"Belgio","br":"Bélgica","pt":"Bélgica","nl":"België","hr":"Belgija","fa":"بلژیک"},"flag":"https://restcountries.eu/data/bel.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"BEL"} +{"name":"Belize","topLevelDomain":[".bz"],"alpha2Code":"BZ","alpha3Code":"BLZ","callingCodes":["501"],"capital":"Belmopan","altSpellings":["BZ"],"region":"Americas","subregion":"Central America","population":370300,"latlng":[17.25,-88.75],"demonym":"Belizean","area":22966.0,"gini":53.1,"timezones":["UTC-06:00"],"borders":["GTM","MEX"],"nativeName":"Belize","numericCode":"084","currencies":[{"code":"BZD","name":"Belize dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Belize","es":"Belice","fr":"Belize","ja":"ベリーズ","it":"Belize","br":"Belize","pt":"Belize","nl":"Belize","hr":"Belize","fa":"بلیز"},"flag":"https://restcountries.eu/data/blz.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]},{"acronym":"CAIS","name":"Central American Integration System","otherAcronyms":["SICA"],"otherNames":["Sistema de la Integración Centroamericana,"]}],"cioc":"BIZ"} +{"name":"Benin","topLevelDomain":[".bj"],"alpha2Code":"BJ","alpha3Code":"BEN","callingCodes":["229"],"capital":"Porto-Novo","altSpellings":["BJ","Republic of Benin","République du Bénin"],"region":"Africa","subregion":"Western Africa","population":10653654,"latlng":[9.5,2.25],"demonym":"Beninese","area":112622.0,"gini":38.6,"timezones":["UTC+01:00"],"borders":["BFA","NER","NGA","TGO"],"nativeName":"Bénin","numericCode":"204","currencies":[{"code":"XOF","name":"West African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Benin","es":"Benín","fr":"Bénin","ja":"ベナン","it":"Benin","br":"Benin","pt":"Benim","nl":"Benin","hr":"Benin","fa":"بنین"},"flag":"https://restcountries.eu/data/ben.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"BEN"} +{"name":"Bermuda","topLevelDomain":[".bm"],"alpha2Code":"BM","alpha3Code":"BMU","callingCodes":["1441"],"capital":"Hamilton","altSpellings":["BM","The Islands of Bermuda","The Bermudas","Somers Isles"],"region":"Americas","subregion":"Northern America","population":61954,"latlng":[32.33333333,-64.75],"demonym":"Bermudian","area":54.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Bermuda","numericCode":"060","currencies":[{"code":"BMD","name":"Bermudian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Bermuda","es":"Bermudas","fr":"Bermudes","ja":"バミューダ","it":"Bermuda","br":"Bermudas","pt":"Bermudas","nl":"Bermuda","hr":"Bermudi","fa":"برمودا"},"flag":"https://restcountries.eu/data/bmu.svg","regionalBlocs":[],"cioc":"BER"} +{"name":"Bhutan","topLevelDomain":[".bt"],"alpha2Code":"BT","alpha3Code":"BTN","callingCodes":["975"],"capital":"Thimphu","altSpellings":["BT","Kingdom of Bhutan"],"region":"Asia","subregion":"Southern Asia","population":775620,"latlng":[27.5,90.5],"demonym":"Bhutanese","area":38394.0,"gini":38.1,"timezones":["UTC+06:00"],"borders":["CHN","IND"],"nativeName":"ʼbrug-yul","numericCode":"064","currencies":[{"code":"BTN","name":"Bhutanese ngultrum","symbol":"Nu."},{"code":"INR","name":"Indian rupee","symbol":"₹"}],"languages":[{"iso639_1":"dz","iso639_2":"dzo","name":"Dzongkha","nativeName":"རྫོང་ཁ"}],"translations":{"de":"Bhutan","es":"Bután","fr":"Bhoutan","ja":"ブータン","it":"Bhutan","br":"Butão","pt":"Butão","nl":"Bhutan","hr":"Butan","fa":"بوتان"},"flag":"https://restcountries.eu/data/btn.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Association for Regional Cooperation","otherAcronyms":[],"otherNames":[]}],"cioc":"BHU"} +{"name":"Bolivia (Plurinational State of)","topLevelDomain":[".bo"],"alpha2Code":"BO","alpha3Code":"BOL","callingCodes":["591"],"capital":"Sucre","altSpellings":["BO","Buliwya","Wuliwya","Plurinational State of Bolivia","Estado Plurinacional de Bolivia","Buliwya Mamallaqta","Wuliwya Suyu","Tetã Volívia"],"region":"Americas","subregion":"South America","population":10985059,"latlng":[-17.0,-65.0],"demonym":"Bolivian","area":1098581.0,"gini":56.3,"timezones":["UTC-04:00"],"borders":["ARG","BRA","CHL","PRY","PER"],"nativeName":"Bolivia","numericCode":"068","currencies":[{"code":"BOB","name":"Bolivian boliviano","symbol":"Bs."}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"},{"iso639_1":"ay","iso639_2":"aym","name":"Aymara","nativeName":"aymar aru"},{"iso639_1":"qu","iso639_2":"que","name":"Quechua","nativeName":"Runa Simi"}],"translations":{"de":"Bolivien","es":"Bolivia","fr":"Bolivie","ja":"ボリビア多民族国","it":"Bolivia","br":"Bolívia","pt":"Bolívia","nl":"Bolivia","hr":"Bolivija","fa":"بولیوی"},"flag":"https://restcountries.eu/data/bol.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"BOL"} +{"name":"Bonaire, Sint Eustatius and Saba","topLevelDomain":[".an",".nl"],"alpha2Code":"BQ","alpha3Code":"BES","callingCodes":["5997"],"capital":"Kralendijk","altSpellings":["BQ","Boneiru"],"region":"Americas","subregion":"Caribbean","population":17408,"latlng":[12.15,-68.266667],"demonym":"Dutch","area":294.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Bonaire","numericCode":"535","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"nl","iso639_2":"nld","name":"Dutch","nativeName":"Nederlands"}],"translations":{"de":"Bonaire, Sint Eustatius und Saba","es":null,"fr":"Bonaire, Saint-Eustache et Saba","ja":null,"it":"Bonaire, Saint-Eustache e Saba","br":"Bonaire","pt":"Bonaire","nl":null,"hr":null,"fa":"بونیر"},"flag":"https://restcountries.eu/data/bes.svg","regionalBlocs":[],"cioc":null} +{"name":"Bosnia and Herzegovina","topLevelDomain":[".ba"],"alpha2Code":"BA","alpha3Code":"BIH","callingCodes":["387"],"capital":"Sarajevo","altSpellings":["BA","Bosnia-Herzegovina","Босна и Херцеговина"],"region":"Europe","subregion":"Southern Europe","population":3531159,"latlng":[44.0,18.0],"demonym":"Bosnian, Herzegovinian","area":51209.0,"gini":36.2,"timezones":["UTC+01:00"],"borders":["HRV","MNE","SRB"],"nativeName":"Bosna i Hercegovina","numericCode":"070","currencies":[{"code":"BAM","name":"Bosnia and Herzegovina convertible mark","symbol":null}],"languages":[{"iso639_1":"bs","iso639_2":"bos","name":"Bosnian","nativeName":"bosanski jezik"},{"iso639_1":"hr","iso639_2":"hrv","name":"Croatian","nativeName":"hrvatski jezik"},{"iso639_1":"sr","iso639_2":"srp","name":"Serbian","nativeName":"српски језик"}],"translations":{"de":"Bosnien und Herzegowina","es":"Bosnia y Herzegovina","fr":"Bosnie-Herzégovine","ja":"ボスニア・ヘルツェゴビナ","it":"Bosnia ed Erzegovina","br":"Bósnia e Herzegovina","pt":"Bósnia e Herzegovina","nl":"Bosnië en Herzegovina","hr":"Bosna i Hercegovina","fa":"بوسنی و هرزگوین"},"flag":"https://restcountries.eu/data/bih.svg","regionalBlocs":[{"acronym":"CEFTA","name":"Central European Free Trade Agreement","otherAcronyms":[],"otherNames":[]}],"cioc":"BIH"} +{"name":"Botswana","topLevelDomain":[".bw"],"alpha2Code":"BW","alpha3Code":"BWA","callingCodes":["267"],"capital":"Gaborone","altSpellings":["BW","Republic of Botswana","Lefatshe la Botswana"],"region":"Africa","subregion":"Southern Africa","population":2141206,"latlng":[-22.0,24.0],"demonym":"Motswana","area":582000.0,"gini":61.0,"timezones":["UTC+02:00"],"borders":["NAM","ZAF","ZMB","ZWE"],"nativeName":"Botswana","numericCode":"072","currencies":[{"code":"BWP","name":"Botswana pula","symbol":"P"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"tn","iso639_2":"tsn","name":"Tswana","nativeName":"Setswana"}],"translations":{"de":"Botswana","es":"Botswana","fr":"Botswana","ja":"ボツワナ","it":"Botswana","br":"Botsuana","pt":"Botsuana","nl":"Botswana","hr":"Bocvana","fa":"بوتسوانا"},"flag":"https://restcountries.eu/data/bwa.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"BOT"} +{"name":"Bouvet Island","topLevelDomain":[".bv"],"alpha2Code":"BV","alpha3Code":"BVT","callingCodes":[""],"capital":"","altSpellings":["BV","Bouvetøya","Bouvet-øya"],"region":"","subregion":"","population":0,"latlng":[-54.43333333,3.4],"demonym":"","area":49.0,"gini":null,"timezones":["UTC+01:00"],"borders":[],"nativeName":"Bouvetøya","numericCode":"074","currencies":[{"code":"NOK","name":"Norwegian krone","symbol":"kr"}],"languages":[{"iso639_1":"no","iso639_2":"nor","name":"Norwegian","nativeName":"Norsk"},{"iso639_1":"nb","iso639_2":"nob","name":"Norwegian Bokmål","nativeName":"Norsk bokmål"},{"iso639_1":"nn","iso639_2":"nno","name":"Norwegian Nynorsk","nativeName":"Norsk nynorsk"}],"translations":{"de":"Bouvetinsel","es":"Isla Bouvet","fr":"Île Bouvet","ja":"ブーベ島","it":"Isola Bouvet","br":"Ilha Bouvet","pt":"Ilha Bouvet","nl":"Bouveteiland","hr":"Otok Bouvet","fa":"جزیره بووه"},"flag":"https://restcountries.eu/data/bvt.svg","regionalBlocs":[],"cioc":""} +{"name":"Brazil","topLevelDomain":[".br"],"alpha2Code":"BR","alpha3Code":"BRA","callingCodes":["55"],"capital":"Brasília","altSpellings":["BR","Brasil","Federative Republic of Brazil","República Federativa do Brasil"],"region":"Americas","subregion":"South America","population":206135893,"latlng":[-10.0,-55.0],"demonym":"Brazilian","area":8515767.0,"gini":54.7,"timezones":["UTC-05:00","UTC-04:00","UTC-03:00","UTC-02:00"],"borders":["ARG","BOL","COL","GUF","GUY","PRY","PER","SUR","URY","VEN"],"nativeName":"Brasil","numericCode":"076","currencies":[{"code":"BRL","name":"Brazilian real","symbol":"R$"}],"languages":[{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"Brasilien","es":"Brasil","fr":"Brésil","ja":"ブラジル","it":"Brasile","br":"Brasil","pt":"Brasil","nl":"Brazilië","hr":"Brazil","fa":"برزیل"},"flag":"https://restcountries.eu/data/bra.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"BRA"} +{"name":"British Indian Ocean Territory","topLevelDomain":[".io"],"alpha2Code":"IO","alpha3Code":"IOT","callingCodes":["246"],"capital":"Diego Garcia","altSpellings":["IO"],"region":"Africa","subregion":"Eastern Africa","population":3000,"latlng":[-6.0,71.5],"demonym":"Indian","area":60.0,"gini":null,"timezones":["UTC+06:00"],"borders":[],"nativeName":"British Indian Ocean Territory","numericCode":"086","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Britisches Territorium im Indischen Ozean","es":"Territorio Británico del Océano Índico","fr":"Territoire britannique de l'océan Indien","ja":"イギリス領インド洋地域","it":"Territorio britannico dell'oceano indiano","br":"Território Britânico do Oceano íÍdico","pt":"Território Britânico do Oceano Índico","nl":"Britse Gebieden in de Indische Oceaan","hr":"Britanski Indijskooceanski teritorij","fa":"قلمرو بریتانیا در اقیانوس هند"},"flag":"https://restcountries.eu/data/iot.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":""} +{"name":"United States Minor Outlying Islands","topLevelDomain":[".us"],"alpha2Code":"UM","alpha3Code":"UMI","callingCodes":[""],"capital":"","altSpellings":["UM"],"region":"Americas","subregion":"Northern America","population":300,"latlng":[],"demonym":"American","area":null,"gini":null,"timezones":["UTC-11:00","UTC-10:00","UTC+12:00"],"borders":[],"nativeName":"United States Minor Outlying Islands","numericCode":"581","currencies":[{"code":"USD","name":"United States Dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Kleinere Inselbesitzungen der Vereinigten Staaten","es":"Islas Ultramarinas Menores de Estados Unidos","fr":"Îles mineures éloignées des États-Unis","ja":"合衆国領有小離島","it":"Isole minori esterne degli Stati Uniti d'America","br":"Ilhas Menores Distantes dos Estados Unidos","pt":"Ilhas Menores Distantes dos Estados Unidos","nl":"Kleine afgelegen eilanden van de Verenigde Staten","hr":"Mali udaljeni otoci SAD-a","fa":"جزایر کوچک حاشیه‌ای ایالات متحده آمریکا"},"flag":"https://restcountries.eu/data/umi.svg","regionalBlocs":[],"cioc":""} +{"name":"Virgin Islands (British)","topLevelDomain":[".vg"],"alpha2Code":"VG","alpha3Code":"VGB","callingCodes":["1284"],"capital":"Road Town","altSpellings":["VG"],"region":"Americas","subregion":"Caribbean","population":28514,"latlng":[18.431383,-64.62305],"demonym":"Virgin Islander","area":151.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"British Virgin Islands","numericCode":"092","currencies":[{"code":null,"name":"[D]","symbol":"$"},{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Britische Jungferninseln","es":"Islas Vírgenes del Reino Unido","fr":"Îles Vierges britanniques","ja":"イギリス領ヴァージン諸島","it":"Isole Vergini Britanniche","br":"Ilhas Virgens Britânicas","pt":"Ilhas Virgens Britânicas","nl":"Britse Maagdeneilanden","hr":"Britanski Djevičanski Otoci","fa":"جزایر ویرجین بریتانیا"},"flag":"https://restcountries.eu/data/vgb.svg","regionalBlocs":[],"cioc":"IVB"} +{"name":"Virgin Islands (U.S.)","topLevelDomain":[".vi"],"alpha2Code":"VI","alpha3Code":"VIR","callingCodes":["1 340"],"capital":"Charlotte Amalie","altSpellings":["VI","USVI","American Virgin Islands","U.S. Virgin Islands"],"region":"Americas","subregion":"Caribbean","population":114743,"latlng":[18.34,-64.93],"demonym":"Virgin Islander","area":346.36,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Virgin Islands of the United States","numericCode":"850","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Amerikanische Jungferninseln","es":"Islas Vírgenes de los Estados Unidos","fr":"Îles Vierges des États-Unis","ja":"アメリカ領ヴァージン諸島","it":"Isole Vergini americane","br":"Ilhas Virgens Americanas","pt":"Ilhas Virgens Americanas","nl":"Verenigde Staten Maagdeneilanden","hr":null,"fa":"جزایر ویرجین آمریکا"},"flag":"https://restcountries.eu/data/vir.svg","regionalBlocs":[],"cioc":"ISV"} +{"name":"Brunei Darussalam","topLevelDomain":[".bn"],"alpha2Code":"BN","alpha3Code":"BRN","callingCodes":["673"],"capital":"Bandar Seri Begawan","altSpellings":["BN","Nation of Brunei"," the Abode of Peace"],"region":"Asia","subregion":"South-Eastern Asia","population":411900,"latlng":[4.5,114.66666666],"demonym":"Bruneian","area":5765.0,"gini":null,"timezones":["UTC+08:00"],"borders":["MYS"],"nativeName":"Negara Brunei Darussalam","numericCode":"096","currencies":[{"code":"BND","name":"Brunei dollar","symbol":"$"},{"code":"SGD","name":"Singapore dollar","symbol":"$"}],"languages":[{"iso639_1":"ms","iso639_2":"msa","name":"Malay","nativeName":"bahasa Melayu"}],"translations":{"de":"Brunei","es":"Brunei","fr":"Brunei","ja":"ブルネイ・ダルサラーム","it":"Brunei","br":"Brunei","pt":"Brunei","nl":"Brunei","hr":"Brunej","fa":"برونئی"},"flag":"https://restcountries.eu/data/brn.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"BRU"} +{"name":"Bulgaria","topLevelDomain":[".bg"],"alpha2Code":"BG","alpha3Code":"BGR","callingCodes":["359"],"capital":"Sofia","altSpellings":["BG","Republic of Bulgaria","Република България"],"region":"Europe","subregion":"Eastern Europe","population":7153784,"latlng":[43.0,25.0],"demonym":"Bulgarian","area":110879.0,"gini":28.2,"timezones":["UTC+02:00"],"borders":["GRC","MKD","ROU","SRB","TUR"],"nativeName":"България","numericCode":"100","currencies":[{"code":"BGN","name":"Bulgarian lev","symbol":"лв"}],"languages":[{"iso639_1":"bg","iso639_2":"bul","name":"Bulgarian","nativeName":"български език"}],"translations":{"de":"Bulgarien","es":"Bulgaria","fr":"Bulgarie","ja":"ブルガリア","it":"Bulgaria","br":"Bulgária","pt":"Bulgária","nl":"Bulgarije","hr":"Bugarska","fa":"بلغارستان"},"flag":"https://restcountries.eu/data/bgr.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"BUL"} +{"name":"Burkina Faso","topLevelDomain":[".bf"],"alpha2Code":"BF","alpha3Code":"BFA","callingCodes":["226"],"capital":"Ouagadougou","altSpellings":["BF"],"region":"Africa","subregion":"Western Africa","population":19034397,"latlng":[13.0,-2.0],"demonym":"Burkinabe","area":272967.0,"gini":39.8,"timezones":["UTC"],"borders":["BEN","CIV","GHA","MLI","NER","TGO"],"nativeName":"Burkina Faso","numericCode":"854","currencies":[{"code":"XOF","name":"West African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"ff","iso639_2":"ful","name":"Fula","nativeName":"Fulfulde"}],"translations":{"de":"Burkina Faso","es":"Burkina Faso","fr":"Burkina Faso","ja":"ブルキナファソ","it":"Burkina Faso","br":"Burkina Faso","pt":"Burquina Faso","nl":"Burkina Faso","hr":"Burkina Faso","fa":"بورکینافاسو"},"flag":"https://restcountries.eu/data/bfa.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"BUR"} +{"name":"Burundi","topLevelDomain":[".bi"],"alpha2Code":"BI","alpha3Code":"BDI","callingCodes":["257"],"capital":"Bujumbura","altSpellings":["BI","Republic of Burundi","Republika y'Uburundi","République du Burundi"],"region":"Africa","subregion":"Eastern Africa","population":10114505,"latlng":[-3.5,30.0],"demonym":"Burundian","area":27834.0,"gini":33.3,"timezones":["UTC+02:00"],"borders":["COD","RWA","TZA"],"nativeName":"Burundi","numericCode":"108","currencies":[{"code":"BIF","name":"Burundian franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"rn","iso639_2":"run","name":"Kirundi","nativeName":"Ikirundi"}],"translations":{"de":"Burundi","es":"Burundi","fr":"Burundi","ja":"ブルンジ","it":"Burundi","br":"Burundi","pt":"Burúndi","nl":"Burundi","hr":"Burundi","fa":"بوروندی"},"flag":"https://restcountries.eu/data/bdi.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"BDI"} +{"name":"Cambodia","topLevelDomain":[".kh"],"alpha2Code":"KH","alpha3Code":"KHM","callingCodes":["855"],"capital":"Phnom Penh","altSpellings":["KH","Kingdom of Cambodia"],"region":"Asia","subregion":"South-Eastern Asia","population":15626444,"latlng":[13.0,105.0],"demonym":"Cambodian","area":181035.0,"gini":37.9,"timezones":["UTC+07:00"],"borders":["LAO","THA","VNM"],"nativeName":"Kâmpŭchéa","numericCode":"116","currencies":[{"code":"KHR","name":"Cambodian riel","symbol":"៛"},{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"km","iso639_2":"khm","name":"Khmer","nativeName":"ខ្មែរ"}],"translations":{"de":"Kambodscha","es":"Camboya","fr":"Cambodge","ja":"カンボジア","it":"Cambogia","br":"Camboja","pt":"Camboja","nl":"Cambodja","hr":"Kambodža","fa":"کامبوج"},"flag":"https://restcountries.eu/data/khm.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"CAM"} +{"name":"Cameroon","topLevelDomain":[".cm"],"alpha2Code":"CM","alpha3Code":"CMR","callingCodes":["237"],"capital":"Yaoundé","altSpellings":["CM","Republic of Cameroon","République du Cameroun"],"region":"Africa","subregion":"Middle Africa","population":22709892,"latlng":[6.0,12.0],"demonym":"Cameroonian","area":475442.0,"gini":38.9,"timezones":["UTC+01:00"],"borders":["CAF","TCD","COG","GNQ","GAB","NGA"],"nativeName":"Cameroon","numericCode":"120","currencies":[{"code":"XAF","name":"Central African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Kamerun","es":"Camerún","fr":"Cameroun","ja":"カメルーン","it":"Camerun","br":"Camarões","pt":"Camarões","nl":"Kameroen","hr":"Kamerun","fa":"کامرون"},"flag":"https://restcountries.eu/data/cmr.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"CMR"} +{"name":"Canada","topLevelDomain":[".ca"],"alpha2Code":"CA","alpha3Code":"CAN","callingCodes":["1"],"capital":"Ottawa","altSpellings":["CA"],"region":"Americas","subregion":"Northern America","population":36155487,"latlng":[60.0,-95.0],"demonym":"Canadian","area":9984670.0,"gini":32.6,"timezones":["UTC-08:00","UTC-07:00","UTC-06:00","UTC-05:00","UTC-04:00","UTC-03:30"],"borders":["USA"],"nativeName":"Canada","numericCode":"124","currencies":[{"code":"CAD","name":"Canadian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Kanada","es":"Canadá","fr":"Canada","ja":"カナダ","it":"Canada","br":"Canadá","pt":"Canadá","nl":"Canada","hr":"Kanada","fa":"کانادا"},"flag":"https://restcountries.eu/data/can.svg","regionalBlocs":[{"acronym":"NAFTA","name":"North American Free Trade Agreement","otherAcronyms":[],"otherNames":["Tratado de Libre Comercio de América del Norte","Accord de Libre-échange Nord-Américain"]}],"cioc":"CAN"} +{"name":"Cabo Verde","topLevelDomain":[".cv"],"alpha2Code":"CV","alpha3Code":"CPV","callingCodes":["238"],"capital":"Praia","altSpellings":["CV","Republic of Cabo Verde","República de Cabo Verde"],"region":"Africa","subregion":"Western Africa","population":531239,"latlng":[16.0,-24.0],"demonym":"Cape Verdian","area":4033.0,"gini":50.5,"timezones":["UTC-01:00"],"borders":[],"nativeName":"Cabo Verde","numericCode":"132","currencies":[{"code":"CVE","name":"Cape Verdean escudo","symbol":"Esc"}],"languages":[{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"Kap Verde","es":"Cabo Verde","fr":"Cap Vert","ja":"カーボベルデ","it":"Capo Verde","br":"Cabo Verde","pt":"Cabo Verde","nl":"Kaapverdië","hr":"Zelenortska Republika","fa":"کیپ ورد"},"flag":"https://restcountries.eu/data/cpv.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"CPV"} +{"name":"Cayman Islands","topLevelDomain":[".ky"],"alpha2Code":"KY","alpha3Code":"CYM","callingCodes":["1345"],"capital":"George Town","altSpellings":["KY"],"region":"Americas","subregion":"Caribbean","population":58238,"latlng":[19.5,-80.5],"demonym":"Caymanian","area":264.0,"gini":null,"timezones":["UTC-05:00"],"borders":[],"nativeName":"Cayman Islands","numericCode":"136","currencies":[{"code":"KYD","name":"Cayman Islands dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Kaimaninseln","es":"Islas Caimán","fr":"Îles Caïmans","ja":"ケイマン諸島","it":"Isole Cayman","br":"Ilhas Cayman","pt":"Ilhas Caimão","nl":"Caymaneilanden","hr":"Kajmanski otoci","fa":"جزایر کیمن"},"flag":"https://restcountries.eu/data/cym.svg","regionalBlocs":[],"cioc":"CAY"} +{"name":"Central African Republic","topLevelDomain":[".cf"],"alpha2Code":"CF","alpha3Code":"CAF","callingCodes":["236"],"capital":"Bangui","altSpellings":["CF","Central African Republic","République centrafricaine"],"region":"Africa","subregion":"Middle Africa","population":4998000,"latlng":[7.0,21.0],"demonym":"Central African","area":622984.0,"gini":56.3,"timezones":["UTC+01:00"],"borders":["CMR","TCD","COD","COG","SSD","SDN"],"nativeName":"Ködörösêse tî Bêafrîka","numericCode":"140","currencies":[{"code":"XAF","name":"Central African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"sg","iso639_2":"sag","name":"Sango","nativeName":"yângâ tî sängö"}],"translations":{"de":"Zentralafrikanische Republik","es":"República Centroafricana","fr":"République centrafricaine","ja":"中央アフリカ共和国","it":"Repubblica Centrafricana","br":"República Centro-Africana","pt":"República Centro-Africana","nl":"Centraal-Afrikaanse Republiek","hr":"Srednjoafrička Republika","fa":"جمهوری آفریقای مرکزی"},"flag":"https://restcountries.eu/data/caf.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"CAF"} +{"name":"Chad","topLevelDomain":[".td"],"alpha2Code":"TD","alpha3Code":"TCD","callingCodes":["235"],"capital":"N'Djamena","altSpellings":["TD","Tchad","Republic of Chad","République du Tchad"],"region":"Africa","subregion":"Middle Africa","population":14497000,"latlng":[15.0,19.0],"demonym":"Chadian","area":1284000.0,"gini":39.8,"timezones":["UTC+01:00"],"borders":["CMR","CAF","LBY","NER","NGA","SSD"],"nativeName":"Tchad","numericCode":"148","currencies":[{"code":"XAF","name":"Central African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Tschad","es":"Chad","fr":"Tchad","ja":"チャド","it":"Ciad","br":"Chade","pt":"Chade","nl":"Tsjaad","hr":"Čad","fa":"چاد"},"flag":"https://restcountries.eu/data/tcd.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"CHA"} +{"name":"Chile","topLevelDomain":[".cl"],"alpha2Code":"CL","alpha3Code":"CHL","callingCodes":["56"],"capital":"Santiago","altSpellings":["CL","Republic of Chile","República de Chile"],"region":"Americas","subregion":"South America","population":18191900,"latlng":[-30.0,-71.0],"demonym":"Chilean","area":756102.0,"gini":52.1,"timezones":["UTC-06:00","UTC-04:00"],"borders":["ARG","BOL","PER"],"nativeName":"Chile","numericCode":"152","currencies":[{"code":"CLP","name":"Chilean peso","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Chile","es":"Chile","fr":"Chili","ja":"チリ","it":"Cile","br":"Chile","pt":"Chile","nl":"Chili","hr":"Čile","fa":"شیلی"},"flag":"https://restcountries.eu/data/chl.svg","regionalBlocs":[{"acronym":"PA","name":"Pacific Alliance","otherAcronyms":[],"otherNames":["Alianza del Pacífico"]},{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"CHI"} +{"name":"China","topLevelDomain":[".cn"],"alpha2Code":"CN","alpha3Code":"CHN","callingCodes":["86"],"capital":"Beijing","altSpellings":["CN","Zhōngguó","Zhongguo","Zhonghua","People's Republic of China","中华人民共和国","Zhōnghuá Rénmín Gònghéguó"],"region":"Asia","subregion":"Eastern Asia","population":1377422166,"latlng":[35.0,105.0],"demonym":"Chinese","area":9640011.0,"gini":47.0,"timezones":["UTC+08:00"],"borders":["AFG","BTN","MMR","HKG","IND","KAZ","PRK","KGZ","LAO","MAC","MNG","PAK","RUS","TJK","VNM"],"nativeName":"中国","numericCode":"156","currencies":[{"code":"CNY","name":"Chinese yuan","symbol":"¥"}],"languages":[{"iso639_1":"zh","iso639_2":"zho","name":"Chinese","nativeName":"中文 (Zhōngwén)"}],"translations":{"de":"China","es":"China","fr":"Chine","ja":"中国","it":"Cina","br":"China","pt":"China","nl":"China","hr":"Kina","fa":"چین"},"flag":"https://restcountries.eu/data/chn.svg","regionalBlocs":[],"cioc":"CHN"} +{"name":"Christmas Island","topLevelDomain":[".cx"],"alpha2Code":"CX","alpha3Code":"CXR","callingCodes":["61"],"capital":"Flying Fish Cove","altSpellings":["CX","Territory of Christmas Island"],"region":"Oceania","subregion":"Australia and New Zealand","population":2072,"latlng":[-10.5,105.66666666],"demonym":"Christmas Island","area":135.0,"gini":null,"timezones":["UTC+07:00"],"borders":[],"nativeName":"Christmas Island","numericCode":"162","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Weihnachtsinsel","es":"Isla de Navidad","fr":"Île Christmas","ja":"クリスマス島","it":"Isola di Natale","br":"Ilha Christmas","pt":"Ilha do Natal","nl":"Christmaseiland","hr":"Božićni otok","fa":"جزیره کریسمس"},"flag":"https://restcountries.eu/data/cxr.svg","regionalBlocs":[],"cioc":""} +{"name":"Cocos (Keeling) Islands","topLevelDomain":[".cc"],"alpha2Code":"CC","alpha3Code":"CCK","callingCodes":["61"],"capital":"West Island","altSpellings":["CC","Territory of the Cocos (Keeling) Islands","Keeling Islands"],"region":"Oceania","subregion":"Australia and New Zealand","population":550,"latlng":[-12.5,96.83333333],"demonym":"Cocos Islander","area":14.0,"gini":null,"timezones":["UTC+06:30"],"borders":[],"nativeName":"Cocos (Keeling) Islands","numericCode":"166","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Kokosinseln","es":"Islas Cocos o Islas Keeling","fr":"Îles Cocos","ja":"ココス(キーリング)諸島","it":"Isole Cocos e Keeling","br":"Ilhas Cocos","pt":"Ilhas dos Cocos","nl":"Cocoseilanden","hr":"Kokosovi Otoci","fa":"جزایر کوکوس"},"flag":"https://restcountries.eu/data/cck.svg","regionalBlocs":[],"cioc":""} +{"name":"Colombia","topLevelDomain":[".co"],"alpha2Code":"CO","alpha3Code":"COL","callingCodes":["57"],"capital":"Bogotá","altSpellings":["CO","Republic of Colombia","República de Colombia"],"region":"Americas","subregion":"South America","population":48759958,"latlng":[4.0,-72.0],"demonym":"Colombian","area":1141748.0,"gini":55.9,"timezones":["UTC-05:00"],"borders":["BRA","ECU","PAN","PER","VEN"],"nativeName":"Colombia","numericCode":"170","currencies":[{"code":"COP","name":"Colombian peso","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Kolumbien","es":"Colombia","fr":"Colombie","ja":"コロンビア","it":"Colombia","br":"Colômbia","pt":"Colômbia","nl":"Colombia","hr":"Kolumbija","fa":"کلمبیا"},"flag":"https://restcountries.eu/data/col.svg","regionalBlocs":[{"acronym":"PA","name":"Pacific Alliance","otherAcronyms":[],"otherNames":["Alianza del Pacífico"]},{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"COL"} +{"name":"Comoros","topLevelDomain":[".km"],"alpha2Code":"KM","alpha3Code":"COM","callingCodes":["269"],"capital":"Moroni","altSpellings":["KM","Union of the Comoros","Union des Comores","Udzima wa Komori","al-Ittiḥād al-Qumurī"],"region":"Africa","subregion":"Eastern Africa","population":806153,"latlng":[-12.16666666,44.25],"demonym":"Comoran","area":1862.0,"gini":64.3,"timezones":["UTC+03:00"],"borders":[],"nativeName":"Komori","numericCode":"174","currencies":[{"code":"KMF","name":"Comorian franc","symbol":"Fr"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Union der Komoren","es":"Comoras","fr":"Comores","ja":"コモロ","it":"Comore","br":"Comores","pt":"Comores","nl":"Comoren","hr":"Komori","fa":"کومور"},"flag":"https://restcountries.eu/data/com.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"COM"} +{"name":"Congo","topLevelDomain":[".cg"],"alpha2Code":"CG","alpha3Code":"COG","callingCodes":["242"],"capital":"Brazzaville","altSpellings":["CG","Congo-Brazzaville"],"region":"Africa","subregion":"Middle Africa","population":4741000,"latlng":[-1.0,15.0],"demonym":"Congolese","area":342000.0,"gini":47.3,"timezones":["UTC+01:00"],"borders":["AGO","CMR","CAF","COD","GAB"],"nativeName":"République du Congo","numericCode":"178","currencies":[{"code":"XAF","name":"Central African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"ln","iso639_2":"lin","name":"Lingala","nativeName":"Lingála"}],"translations":{"de":"Kongo","es":"Congo","fr":"Congo","ja":"コンゴ共和国","it":"Congo","br":"Congo","pt":"Congo","nl":"Congo [Republiek]","hr":"Kongo","fa":"کنگو"},"flag":"https://restcountries.eu/data/cog.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"CGO"} +{"name":"Congo (Democratic Republic of the)","topLevelDomain":[".cd"],"alpha2Code":"CD","alpha3Code":"COD","callingCodes":["243"],"capital":"Kinshasa","altSpellings":["CD","DR Congo","Congo-Kinshasa","DRC"],"region":"Africa","subregion":"Middle Africa","population":85026000,"latlng":[0.0,25.0],"demonym":"Congolese","area":2344858.0,"gini":null,"timezones":["UTC+01:00","UTC+02:00"],"borders":["AGO","BDI","CAF","COG","RWA","SSD","TZA","UGA","ZMB"],"nativeName":"République démocratique du Congo","numericCode":"180","currencies":[{"code":"CDF","name":"Congolese franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"ln","iso639_2":"lin","name":"Lingala","nativeName":"Lingála"},{"iso639_1":"kg","iso639_2":"kon","name":"Kongo","nativeName":"Kikongo"},{"iso639_1":"sw","iso639_2":"swa","name":"Swahili","nativeName":"Kiswahili"},{"iso639_1":"lu","iso639_2":"lub","name":"Luba-Katanga","nativeName":"Tshiluba"}],"translations":{"de":"Kongo (Dem. Rep.)","es":"Congo (Rep. Dem.)","fr":"Congo (Rép. dém.)","ja":"コンゴ民主共和国","it":"Congo (Rep. Dem.)","br":"RD Congo","pt":"RD Congo","nl":"Congo [DRC]","hr":"Kongo, Demokratska Republika","fa":"جمهوری کنگو"},"flag":"https://restcountries.eu/data/cod.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"COD"} +{"name":"Cook Islands","topLevelDomain":[".ck"],"alpha2Code":"CK","alpha3Code":"COK","callingCodes":["682"],"capital":"Avarua","altSpellings":["CK","Kūki 'Āirani"],"region":"Oceania","subregion":"Polynesia","population":18100,"latlng":[-21.23333333,-159.76666666],"demonym":"Cook Islander","area":236.0,"gini":null,"timezones":["UTC-10:00"],"borders":[],"nativeName":"Cook Islands","numericCode":"184","currencies":[{"code":"NZD","name":"New Zealand dollar","symbol":"$"},{"code":"CKD","name":"Cook Islands dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Cookinseln","es":"Islas Cook","fr":"Îles Cook","ja":"クック諸島","it":"Isole Cook","br":"Ilhas Cook","pt":"Ilhas Cook","nl":"Cookeilanden","hr":"Cookovo Otočje","fa":"جزایر کوک"},"flag":"https://restcountries.eu/data/cok.svg","regionalBlocs":[],"cioc":"COK"} +{"name":"Costa Rica","topLevelDomain":[".cr"],"alpha2Code":"CR","alpha3Code":"CRI","callingCodes":["506"],"capital":"San José","altSpellings":["CR","Republic of Costa Rica","República de Costa Rica"],"region":"Americas","subregion":"Central America","population":4890379,"latlng":[10.0,-84.0],"demonym":"Costa Rican","area":51100.0,"gini":50.7,"timezones":["UTC-06:00"],"borders":["NIC","PAN"],"nativeName":"Costa Rica","numericCode":"188","currencies":[{"code":"CRC","name":"Costa Rican colón","symbol":"₡"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Costa Rica","es":"Costa Rica","fr":"Costa Rica","ja":"コスタリカ","it":"Costa Rica","br":"Costa Rica","pt":"Costa Rica","nl":"Costa Rica","hr":"Kostarika","fa":"کاستاریکا"},"flag":"https://restcountries.eu/data/cri.svg","regionalBlocs":[{"acronym":"CAIS","name":"Central American Integration System","otherAcronyms":["SICA"],"otherNames":["Sistema de la Integración Centroamericana,"]}],"cioc":"CRC"} +{"name":"Croatia","topLevelDomain":[".hr"],"alpha2Code":"HR","alpha3Code":"HRV","callingCodes":["385"],"capital":"Zagreb","altSpellings":["HR","Hrvatska","Republic of Croatia","Republika Hrvatska"],"region":"Europe","subregion":"Southern Europe","population":4190669,"latlng":[45.16666666,15.5],"demonym":"Croatian","area":56594.0,"gini":33.7,"timezones":["UTC+01:00"],"borders":["BIH","HUN","MNE","SRB","SVN"],"nativeName":"Hrvatska","numericCode":"191","currencies":[{"code":"HRK","name":"Croatian kuna","symbol":"kn"}],"languages":[{"iso639_1":"hr","iso639_2":"hrv","name":"Croatian","nativeName":"hrvatski jezik"}],"translations":{"de":"Kroatien","es":"Croacia","fr":"Croatie","ja":"クロアチア","it":"Croazia","br":"Croácia","pt":"Croácia","nl":"Kroatië","hr":"Hrvatska","fa":"کرواسی"},"flag":"https://restcountries.eu/data/hrv.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"CRO"} +{"name":"Cuba","topLevelDomain":[".cu"],"alpha2Code":"CU","alpha3Code":"CUB","callingCodes":["53"],"capital":"Havana","altSpellings":["CU","Republic of Cuba","República de Cuba"],"region":"Americas","subregion":"Caribbean","population":11239004,"latlng":[21.5,-80.0],"demonym":"Cuban","area":109884.0,"gini":null,"timezones":["UTC-05:00"],"borders":[],"nativeName":"Cuba","numericCode":"192","currencies":[{"code":"CUC","name":"Cuban convertible peso","symbol":"$"},{"code":"CUP","name":"Cuban peso","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Kuba","es":"Cuba","fr":"Cuba","ja":"キューバ","it":"Cuba","br":"Cuba","pt":"Cuba","nl":"Cuba","hr":"Kuba","fa":"کوبا"},"flag":"https://restcountries.eu/data/cub.svg","regionalBlocs":[],"cioc":"CUB"} +{"name":"Curaçao","topLevelDomain":[".cw"],"alpha2Code":"CW","alpha3Code":"CUW","callingCodes":["599"],"capital":"Willemstad","altSpellings":["CW","Curacao","Kòrsou","Country of Curaçao","Land Curaçao","Pais Kòrsou"],"region":"Americas","subregion":"Caribbean","population":154843,"latlng":[12.116667,-68.933333],"demonym":"Dutch","area":444.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Curaçao","numericCode":"531","currencies":[{"code":"ANG","name":"Netherlands Antillean guilder","symbol":"ƒ"}],"languages":[{"iso639_1":"nl","iso639_2":"nld","name":"Dutch","nativeName":"Nederlands"},{"iso639_1":"pa","iso639_2":"pan","name":"(Eastern) Punjabi","nativeName":"ਪੰਜਾਬੀ"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Curaçao","es":null,"fr":"Curaçao","ja":null,"it":"Curaçao","br":"Curaçao","pt":"Curaçao","nl":"Curaçao","hr":null,"fa":"کوراسائو"},"flag":"https://restcountries.eu/data/cuw.svg","regionalBlocs":[],"cioc":""} +{"name":"Cyprus","topLevelDomain":[".cy"],"alpha2Code":"CY","alpha3Code":"CYP","callingCodes":["357"],"capital":"Nicosia","altSpellings":["CY","Kýpros","Kıbrıs","Republic of Cyprus","Κυπριακή Δημοκρατία","Kıbrıs Cumhuriyeti"],"region":"Europe","subregion":"Southern Europe","population":847000,"latlng":[35.0,33.0],"demonym":"Cypriot","area":9251.0,"gini":null,"timezones":["UTC+02:00"],"borders":["GBR"],"nativeName":"Κύπρος","numericCode":"196","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"el","iso639_2":"ell","name":"Greek (modern)","nativeName":"ελληνικά"},{"iso639_1":"tr","iso639_2":"tur","name":"Turkish","nativeName":"Türkçe"},{"iso639_1":"hy","iso639_2":"hye","name":"Armenian","nativeName":"Հայերեն"}],"translations":{"de":"Zypern","es":"Chipre","fr":"Chypre","ja":"キプロス","it":"Cipro","br":"Chipre","pt":"Chipre","nl":"Cyprus","hr":"Cipar","fa":"قبرس"},"flag":"https://restcountries.eu/data/cyp.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"CYP"} +{"name":"Czech Republic","topLevelDomain":[".cz"],"alpha2Code":"CZ","alpha3Code":"CZE","callingCodes":["420"],"capital":"Prague","altSpellings":["CZ","Česká republika","Česko"],"region":"Europe","subregion":"Eastern Europe","population":10558524,"latlng":[49.75,15.5],"demonym":"Czech","area":78865.0,"gini":26.0,"timezones":["UTC+01:00"],"borders":["AUT","DEU","POL","SVK"],"nativeName":"Česká republika","numericCode":"203","currencies":[{"code":"CZK","name":"Czech koruna","symbol":"Kč"}],"languages":[{"iso639_1":"cs","iso639_2":"ces","name":"Czech","nativeName":"čeština"},{"iso639_1":"sk","iso639_2":"slk","name":"Slovak","nativeName":"slovenčina"}],"translations":{"de":"Tschechische Republik","es":"República Checa","fr":"République tchèque","ja":"チェコ","it":"Repubblica Ceca","br":"República Tcheca","pt":"República Checa","nl":"Tsjechië","hr":"Češka","fa":"جمهوری چک"},"flag":"https://restcountries.eu/data/cze.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"CZE"} +{"name":"Denmark","topLevelDomain":[".dk"],"alpha2Code":"DK","alpha3Code":"DNK","callingCodes":["45"],"capital":"Copenhagen","altSpellings":["DK","Danmark","Kingdom of Denmark","Kongeriget Danmark"],"region":"Europe","subregion":"Northern Europe","population":5717014,"latlng":[56.0,10.0],"demonym":"Danish","area":43094.0,"gini":24.0,"timezones":["UTC-04:00","UTC-03:00","UTC-01:00","UTC","UTC+01:00"],"borders":["DEU"],"nativeName":"Danmark","numericCode":"208","currencies":[{"code":"DKK","name":"Danish krone","symbol":"kr"}],"languages":[{"iso639_1":"da","iso639_2":"dan","name":"Danish","nativeName":"dansk"}],"translations":{"de":"Dänemark","es":"Dinamarca","fr":"Danemark","ja":"デンマーク","it":"Danimarca","br":"Dinamarca","pt":"Dinamarca","nl":"Denemarken","hr":"Danska","fa":"دانمارک"},"flag":"https://restcountries.eu/data/dnk.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"DEN"} +{"name":"Djibouti","topLevelDomain":[".dj"],"alpha2Code":"DJ","alpha3Code":"DJI","callingCodes":["253"],"capital":"Djibouti","altSpellings":["DJ","Jabuuti","Gabuuti","Republic of Djibouti","République de Djibouti","Gabuutih Ummuuno","Jamhuuriyadda Jabuuti"],"region":"Africa","subregion":"Eastern Africa","population":900000,"latlng":[11.5,43.0],"demonym":"Djibouti","area":23200.0,"gini":40.0,"timezones":["UTC+03:00"],"borders":["ERI","ETH","SOM"],"nativeName":"Djibouti","numericCode":"262","currencies":[{"code":"DJF","name":"Djiboutian franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Dschibuti","es":"Yibuti","fr":"Djibouti","ja":"ジブチ","it":"Gibuti","br":"Djibuti","pt":"Djibuti","nl":"Djibouti","hr":"Džibuti","fa":"جیبوتی"},"flag":"https://restcountries.eu/data/dji.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"DJI"} +{"name":"Dominica","topLevelDomain":[".dm"],"alpha2Code":"DM","alpha3Code":"DMA","callingCodes":["1767"],"capital":"Roseau","altSpellings":["DM","Dominique","Wai‘tu kubuli","Commonwealth of Dominica"],"region":"Americas","subregion":"Caribbean","population":71293,"latlng":[15.41666666,-61.33333333],"demonym":"Dominican","area":751.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Dominica","numericCode":"212","currencies":[{"code":"XCD","name":"East Caribbean dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Dominica","es":"Dominica","fr":"Dominique","ja":"ドミニカ国","it":"Dominica","br":"Dominica","pt":"Dominica","nl":"Dominica","hr":"Dominika","fa":"دومینیکا"},"flag":"https://restcountries.eu/data/dma.svg","regionalBlocs":[],"cioc":"DMA"} +{"name":"Dominican Republic","topLevelDomain":[".do"],"alpha2Code":"DO","alpha3Code":"DOM","callingCodes":["1809","1829","1849"],"capital":"Santo Domingo","altSpellings":["DO"],"region":"Americas","subregion":"Caribbean","population":10075045,"latlng":[19.0,-70.66666666],"demonym":"Dominican","area":48671.0,"gini":47.2,"timezones":["UTC-04:00"],"borders":["HTI"],"nativeName":"República Dominicana","numericCode":"214","currencies":[{"code":"DOP","name":"Dominican peso","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Dominikanische Republik","es":"República Dominicana","fr":"République dominicaine","ja":"ドミニカ共和国","it":"Repubblica Dominicana","br":"República Dominicana","pt":"República Dominicana","nl":"Dominicaanse Republiek","hr":"Dominikanska Republika","fa":"جمهوری دومینیکن"},"flag":"https://restcountries.eu/data/dom.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]},{"acronym":"CAIS","name":"Central American Integration System","otherAcronyms":["SICA"],"otherNames":["Sistema de la Integración Centroamericana,"]}],"cioc":"DOM"} +{"name":"Ecuador","topLevelDomain":[".ec"],"alpha2Code":"EC","alpha3Code":"ECU","callingCodes":["593"],"capital":"Quito","altSpellings":["EC","Republic of Ecuador","República del Ecuador"],"region":"Americas","subregion":"South America","population":16545799,"latlng":[-2.0,-77.5],"demonym":"Ecuadorean","area":276841.0,"gini":49.3,"timezones":["UTC-06:00","UTC-05:00"],"borders":["COL","PER"],"nativeName":"Ecuador","numericCode":"218","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Ecuador","es":"Ecuador","fr":"Équateur","ja":"エクアドル","it":"Ecuador","br":"Equador","pt":"Equador","nl":"Ecuador","hr":"Ekvador","fa":"اکوادور"},"flag":"https://restcountries.eu/data/ecu.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"ECU"} +{"name":"Egypt","topLevelDomain":[".eg"],"alpha2Code":"EG","alpha3Code":"EGY","callingCodes":["20"],"capital":"Cairo","altSpellings":["EG","Arab Republic of Egypt"],"region":"Africa","subregion":"Northern Africa","population":91290000,"latlng":[27.0,30.0],"demonym":"Egyptian","area":1002450.0,"gini":30.8,"timezones":["UTC+02:00"],"borders":["ISR","LBY","SDN"],"nativeName":"مصر‎","numericCode":"818","currencies":[{"code":"EGP","name":"Egyptian pound","symbol":"£"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Ägypten","es":"Egipto","fr":"Égypte","ja":"エジプト","it":"Egitto","br":"Egito","pt":"Egipto","nl":"Egypte","hr":"Egipat","fa":"مصر"},"flag":"https://restcountries.eu/data/egy.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"EGY"} +{"name":"El Salvador","topLevelDomain":[".sv"],"alpha2Code":"SV","alpha3Code":"SLV","callingCodes":["503"],"capital":"San Salvador","altSpellings":["SV","Republic of El Salvador","República de El Salvador"],"region":"Americas","subregion":"Central America","population":6520675,"latlng":[13.83333333,-88.91666666],"demonym":"Salvadoran","area":21041.0,"gini":48.3,"timezones":["UTC-06:00"],"borders":["GTM","HND"],"nativeName":"El Salvador","numericCode":"222","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"El Salvador","es":"El Salvador","fr":"Salvador","ja":"エルサルバドル","it":"El Salvador","br":"El Salvador","pt":"El Salvador","nl":"El Salvador","hr":"Salvador","fa":"السالوادور"},"flag":"https://restcountries.eu/data/slv.svg","regionalBlocs":[{"acronym":"CAIS","name":"Central American Integration System","otherAcronyms":["SICA"],"otherNames":["Sistema de la Integración Centroamericana,"]}],"cioc":"ESA"} +{"name":"Equatorial Guinea","topLevelDomain":[".gq"],"alpha2Code":"GQ","alpha3Code":"GNQ","callingCodes":["240"],"capital":"Malabo","altSpellings":["GQ","Republic of Equatorial Guinea","República de Guinea Ecuatorial","République de Guinée équatoriale","República da Guiné Equatorial"],"region":"Africa","subregion":"Middle Africa","population":1222442,"latlng":[2.0,10.0],"demonym":"Equatorial Guinean","area":28051.0,"gini":null,"timezones":["UTC+01:00"],"borders":["CMR","GAB"],"nativeName":"Guinea Ecuatorial","numericCode":"226","currencies":[{"code":"XAF","name":"Central African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Äquatorial-Guinea","es":"Guinea Ecuatorial","fr":"Guinée-Équatoriale","ja":"赤道ギニア","it":"Guinea Equatoriale","br":"Guiné Equatorial","pt":"Guiné Equatorial","nl":"Equatoriaal-Guinea","hr":"Ekvatorijalna Gvineja","fa":"گینه استوایی"},"flag":"https://restcountries.eu/data/gnq.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"GEQ"} +{"name":"Eritrea","topLevelDomain":[".er"],"alpha2Code":"ER","alpha3Code":"ERI","callingCodes":["291"],"capital":"Asmara","altSpellings":["ER","State of Eritrea","ሃገረ ኤርትራ","Dawlat Iritriyá","ʾErtrā","Iritriyā",""],"region":"Africa","subregion":"Eastern Africa","population":5352000,"latlng":[15.0,39.0],"demonym":"Eritrean","area":117600.0,"gini":null,"timezones":["UTC+03:00"],"borders":["DJI","ETH","SDN"],"nativeName":"ኤርትራ","numericCode":"232","currencies":[{"code":"ERN","name":"Eritrean nakfa","symbol":"Nfk"}],"languages":[{"iso639_1":"ti","iso639_2":"tir","name":"Tigrinya","nativeName":"ትግርኛ"},{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Eritrea","es":"Eritrea","fr":"Érythrée","ja":"エリトリア","it":"Eritrea","br":"Eritreia","pt":"Eritreia","nl":"Eritrea","hr":"Eritreja","fa":"اریتره"},"flag":"https://restcountries.eu/data/eri.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"ERI"} +{"name":"Estonia","topLevelDomain":[".ee"],"alpha2Code":"EE","alpha3Code":"EST","callingCodes":["372"],"capital":"Tallinn","altSpellings":["EE","Eesti","Republic of Estonia","Eesti Vabariik"],"region":"Europe","subregion":"Northern Europe","population":1315944,"latlng":[59.0,26.0],"demonym":"Estonian","area":45227.0,"gini":36.0,"timezones":["UTC+02:00"],"borders":["LVA","RUS"],"nativeName":"Eesti","numericCode":"233","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"et","iso639_2":"est","name":"Estonian","nativeName":"eesti"}],"translations":{"de":"Estland","es":"Estonia","fr":"Estonie","ja":"エストニア","it":"Estonia","br":"Estônia","pt":"Estónia","nl":"Estland","hr":"Estonija","fa":"استونی"},"flag":"https://restcountries.eu/data/est.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"EST"} +{"name":"Ethiopia","topLevelDomain":[".et"],"alpha2Code":"ET","alpha3Code":"ETH","callingCodes":["251"],"capital":"Addis Ababa","altSpellings":["ET","ʾĪtyōṗṗyā","Federal Democratic Republic of Ethiopia","የኢትዮጵያ ፌዴራላዊ ዲሞክራሲያዊ ሪፐብሊክ"],"region":"Africa","subregion":"Eastern Africa","population":92206005,"latlng":[8.0,38.0],"demonym":"Ethiopian","area":1104300.0,"gini":29.8,"timezones":["UTC+03:00"],"borders":["DJI","ERI","KEN","SOM","SSD","SDN"],"nativeName":"ኢትዮጵያ","numericCode":"231","currencies":[{"code":"ETB","name":"Ethiopian birr","symbol":"Br"}],"languages":[{"iso639_1":"am","iso639_2":"amh","name":"Amharic","nativeName":"አማርኛ"}],"translations":{"de":"Äthiopien","es":"Etiopía","fr":"Éthiopie","ja":"エチオピア","it":"Etiopia","br":"Etiópia","pt":"Etiópia","nl":"Ethiopië","hr":"Etiopija","fa":"اتیوپی"},"flag":"https://restcountries.eu/data/eth.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"ETH"} +{"name":"Falkland Islands (Malvinas)","topLevelDomain":[".fk"],"alpha2Code":"FK","alpha3Code":"FLK","callingCodes":["500"],"capital":"Stanley","altSpellings":["FK","Islas Malvinas"],"region":"Americas","subregion":"South America","population":2563,"latlng":[-51.75,-59.0],"demonym":"Falkland Islander","area":12173.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Falkland Islands","numericCode":"238","currencies":[{"code":"FKP","name":"Falkland Islands pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Falklandinseln","es":"Islas Malvinas","fr":"Îles Malouines","ja":"フォークランド(マルビナス)諸島","it":"Isole Falkland o Isole Malvine","br":"Ilhas Malvinas","pt":"Ilhas Falkland","nl":"Falklandeilanden [Islas Malvinas]","hr":"Falklandski Otoci","fa":"جزایر فالکلند"},"flag":"https://restcountries.eu/data/flk.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":""} +{"name":"Faroe Islands","topLevelDomain":[".fo"],"alpha2Code":"FO","alpha3Code":"FRO","callingCodes":["298"],"capital":"Tórshavn","altSpellings":["FO","Føroyar","Færøerne"],"region":"Europe","subregion":"Northern Europe","population":49376,"latlng":[62.0,-7.0],"demonym":"Faroese","area":1393.0,"gini":null,"timezones":["UTC+00:00"],"borders":[],"nativeName":"Føroyar","numericCode":"234","currencies":[{"code":"DKK","name":"Danish krone","symbol":"kr"},{"code":"(none)","name":"Faroese króna","symbol":"kr"}],"languages":[{"iso639_1":"fo","iso639_2":"fao","name":"Faroese","nativeName":"føroyskt"}],"translations":{"de":"Färöer-Inseln","es":"Islas Faroe","fr":"Îles Féroé","ja":"フェロー諸島","it":"Isole Far Oer","br":"Ilhas Faroé","pt":"Ilhas Faroé","nl":"Faeröer","hr":"Farski Otoci","fa":"جزایر فارو"},"flag":"https://restcountries.eu/data/fro.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":""} +{"name":"Fiji","topLevelDomain":[".fj"],"alpha2Code":"FJ","alpha3Code":"FJI","callingCodes":["679"],"capital":"Suva","altSpellings":["FJ","Viti","Republic of Fiji","Matanitu ko Viti","Fijī Gaṇarājya"],"region":"Oceania","subregion":"Melanesia","population":867000,"latlng":[-18.0,175.0],"demonym":"Fijian","area":18272.0,"gini":42.8,"timezones":["UTC+12:00"],"borders":[],"nativeName":"Fiji","numericCode":"242","currencies":[{"code":"FJD","name":"Fijian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"fj","iso639_2":"fij","name":"Fijian","nativeName":"vosa Vakaviti"},{"iso639_1":"hi","iso639_2":"hin","name":"Hindi","nativeName":"हिन्दी"},{"iso639_1":"ur","iso639_2":"urd","name":"Urdu","nativeName":"اردو"}],"translations":{"de":"Fidschi","es":"Fiyi","fr":"Fidji","ja":"フィジー","it":"Figi","br":"Fiji","pt":"Fiji","nl":"Fiji","hr":"Fiđi","fa":"فیجی"},"flag":"https://restcountries.eu/data/fji.svg","regionalBlocs":[],"cioc":"FIJ"} +{"name":"Finland","topLevelDomain":[".fi"],"alpha2Code":"FI","alpha3Code":"FIN","callingCodes":["358"],"capital":"Helsinki","altSpellings":["FI","Suomi","Republic of Finland","Suomen tasavalta","Republiken Finland"],"region":"Europe","subregion":"Northern Europe","population":5491817,"latlng":[64.0,26.0],"demonym":"Finnish","area":338424.0,"gini":26.9,"timezones":["UTC+02:00"],"borders":["NOR","SWE","RUS"],"nativeName":"Suomi","numericCode":"246","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fi","iso639_2":"fin","name":"Finnish","nativeName":"suomi"},{"iso639_1":"sv","iso639_2":"swe","name":"Swedish","nativeName":"svenska"}],"translations":{"de":"Finnland","es":"Finlandia","fr":"Finlande","ja":"フィンランド","it":"Finlandia","br":"Finlândia","pt":"Finlândia","nl":"Finland","hr":"Finska","fa":"فنلاند"},"flag":"https://restcountries.eu/data/fin.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"FIN"} +{"name":"France","topLevelDomain":[".fr"],"alpha2Code":"FR","alpha3Code":"FRA","callingCodes":["33"],"capital":"Paris","altSpellings":["FR","French Republic","République française"],"region":"Europe","subregion":"Western Europe","population":66710000,"latlng":[46.0,2.0],"demonym":"French","area":640679.0,"gini":32.7,"timezones":["UTC-10:00","UTC-09:30","UTC-09:00","UTC-08:00","UTC-04:00","UTC-03:00","UTC+01:00","UTC+03:00","UTC+04:00","UTC+05:00","UTC+11:00","UTC+12:00"],"borders":["AND","BEL","DEU","ITA","LUX","MCO","ESP","CHE"],"nativeName":"France","numericCode":"250","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Frankreich","es":"Francia","fr":"France","ja":"フランス","it":"Francia","br":"França","pt":"França","nl":"Frankrijk","hr":"Francuska","fa":"فرانسه"},"flag":"https://restcountries.eu/data/fra.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"FRA"} +{"name":"French Guiana","topLevelDomain":[".gf"],"alpha2Code":"GF","alpha3Code":"GUF","callingCodes":["594"],"capital":"Cayenne","altSpellings":["GF","Guiana","Guyane"],"region":"Americas","subregion":"South America","population":254541,"latlng":[4.0,-53.0],"demonym":"","area":null,"gini":null,"timezones":["UTC-03:00"],"borders":["BRA","SUR"],"nativeName":"Guyane française","numericCode":"254","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Französisch Guyana","es":"Guayana Francesa","fr":"Guayane","ja":"フランス領ギアナ","it":"Guyana francese","br":"Guiana Francesa","pt":"Guiana Francesa","nl":"Frans-Guyana","hr":"Francuska Gvajana","fa":"گویان فرانسه"},"flag":"https://restcountries.eu/data/guf.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]},{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":""} +{"name":"French Polynesia","topLevelDomain":[".pf"],"alpha2Code":"PF","alpha3Code":"PYF","callingCodes":["689"],"capital":"Papeetē","altSpellings":["PF","Polynésie française","French Polynesia","Pōrīnetia Farāni"],"region":"Oceania","subregion":"Polynesia","population":271800,"latlng":[-15.0,-140.0],"demonym":"French Polynesian","area":4167.0,"gini":null,"timezones":["UTC-10:00","UTC-09:30","UTC-09:00"],"borders":[],"nativeName":"Polynésie française","numericCode":"258","currencies":[{"code":"XPF","name":"CFP franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Französisch-Polynesien","es":"Polinesia Francesa","fr":"Polynésie française","ja":"フランス領ポリネシア","it":"Polinesia Francese","br":"Polinésia Francesa","pt":"Polinésia Francesa","nl":"Frans-Polynesië","hr":"Francuska Polinezija","fa":"پلی‌نزی فرانسه"},"flag":"https://restcountries.eu/data/pyf.svg","regionalBlocs":[],"cioc":""} +{"name":"French Southern Territories","topLevelDomain":[".tf"],"alpha2Code":"TF","alpha3Code":"ATF","callingCodes":[""],"capital":"Port-aux-Français","altSpellings":["TF"],"region":"Africa","subregion":"Southern Africa","population":140,"latlng":[-49.25,69.167],"demonym":"French","area":7747.0,"gini":null,"timezones":["UTC+05:00"],"borders":[],"nativeName":"Territoire des Terres australes et antarctiques françaises","numericCode":"260","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Französische Süd- und Antarktisgebiete","es":"Tierras Australes y Antárticas Francesas","fr":"Terres australes et antarctiques françaises","ja":"フランス領南方・南極地域","it":"Territori Francesi del Sud","br":"Terras Austrais e Antárticas Francesas","pt":"Terras Austrais e Antárticas Francesas","nl":"Franse Gebieden in de zuidelijke Indische Oceaan","hr":"Francuski južni i antarktički teritoriji","fa":"سرزمین‌های جنوبی و جنوبگانی فرانسه"},"flag":"https://restcountries.eu/data/atf.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":""} +{"name":"Gabon","topLevelDomain":[".ga"],"alpha2Code":"GA","alpha3Code":"GAB","callingCodes":["241"],"capital":"Libreville","altSpellings":["GA","Gabonese Republic","République Gabonaise"],"region":"Africa","subregion":"Middle Africa","population":1802278,"latlng":[-1.0,11.75],"demonym":"Gabonese","area":267668.0,"gini":41.5,"timezones":["UTC+01:00"],"borders":["CMR","COG","GNQ"],"nativeName":"Gabon","numericCode":"266","currencies":[{"code":"XAF","name":"Central African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Gabun","es":"Gabón","fr":"Gabon","ja":"ガボン","it":"Gabon","br":"Gabão","pt":"Gabão","nl":"Gabon","hr":"Gabon","fa":"گابن"},"flag":"https://restcountries.eu/data/gab.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"GAB"} +{"name":"Gambia","topLevelDomain":[".gm"],"alpha2Code":"GM","alpha3Code":"GMB","callingCodes":["220"],"capital":"Banjul","altSpellings":["GM","Republic of the Gambia"],"region":"Africa","subregion":"Western Africa","population":1882450,"latlng":[13.46666666,-16.56666666],"demonym":"Gambian","area":11295.0,"gini":null,"timezones":["UTC+00:00"],"borders":["SEN"],"nativeName":"Gambia","numericCode":"270","currencies":[{"code":"GMD","name":"Gambian dalasi","symbol":"D"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Gambia","es":"Gambia","fr":"Gambie","ja":"ガンビア","it":"Gambia","br":"Gâmbia","pt":"Gâmbia","nl":"Gambia","hr":"Gambija","fa":"گامبیا"},"flag":"https://restcountries.eu/data/gmb.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"GAM"} +{"name":"Georgia","topLevelDomain":[".ge"],"alpha2Code":"GE","alpha3Code":"GEO","callingCodes":["995"],"capital":"Tbilisi","altSpellings":["GE","Sakartvelo"],"region":"Asia","subregion":"Western Asia","population":3720400,"latlng":[42.0,43.5],"demonym":"Georgian","area":69700.0,"gini":41.3,"timezones":["UTC-05:00"],"borders":["ARM","AZE","RUS","TUR"],"nativeName":"საქართველო","numericCode":"268","currencies":[{"code":"GEL","name":"Georgian Lari","symbol":"ლ"}],"languages":[{"iso639_1":"ka","iso639_2":"kat","name":"Georgian","nativeName":"ქართული"}],"translations":{"de":"Georgien","es":"Georgia","fr":"Géorgie","ja":"グルジア","it":"Georgia","br":"Geórgia","pt":"Geórgia","nl":"Georgië","hr":"Gruzija","fa":"گرجستان"},"flag":"https://restcountries.eu/data/geo.svg","regionalBlocs":[],"cioc":"GEO"} +{"name":"Germany","topLevelDomain":[".de"],"alpha2Code":"DE","alpha3Code":"DEU","callingCodes":["49"],"capital":"Berlin","altSpellings":["DE","Federal Republic of Germany","Bundesrepublik Deutschland"],"region":"Europe","subregion":"Western Europe","population":81770900,"latlng":[51.0,9.0],"demonym":"German","area":357114.0,"gini":28.3,"timezones":["UTC+01:00"],"borders":["AUT","BEL","CZE","DNK","FRA","LUX","NLD","POL","CHE"],"nativeName":"Deutschland","numericCode":"276","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"de","iso639_2":"deu","name":"German","nativeName":"Deutsch"}],"translations":{"de":"Deutschland","es":"Alemania","fr":"Allemagne","ja":"ドイツ","it":"Germania","br":"Alemanha","pt":"Alemanha","nl":"Duitsland","hr":"Njemačka","fa":"آلمان"},"flag":"https://restcountries.eu/data/deu.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"GER"} +{"name":"Ghana","topLevelDomain":[".gh"],"alpha2Code":"GH","alpha3Code":"GHA","callingCodes":["233"],"capital":"Accra","altSpellings":["GH"],"region":"Africa","subregion":"Western Africa","population":27670174,"latlng":[8.0,-2.0],"demonym":"Ghanaian","area":238533.0,"gini":42.8,"timezones":["UTC"],"borders":["BFA","CIV","TGO"],"nativeName":"Ghana","numericCode":"288","currencies":[{"code":"GHS","name":"Ghanaian cedi","symbol":"₵"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Ghana","es":"Ghana","fr":"Ghana","ja":"ガーナ","it":"Ghana","br":"Gana","pt":"Gana","nl":"Ghana","hr":"Gana","fa":"غنا"},"flag":"https://restcountries.eu/data/gha.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"GHA"} +{"name":"Gibraltar","topLevelDomain":[".gi"],"alpha2Code":"GI","alpha3Code":"GIB","callingCodes":["350"],"capital":"Gibraltar","altSpellings":["GI"],"region":"Europe","subregion":"Southern Europe","population":33140,"latlng":[36.13333333,-5.35],"demonym":"Gibraltar","area":6.0,"gini":null,"timezones":["UTC+01:00"],"borders":["ESP"],"nativeName":"Gibraltar","numericCode":"292","currencies":[{"code":"GIP","name":"Gibraltar pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Gibraltar","es":"Gibraltar","fr":"Gibraltar","ja":"ジブラルタル","it":"Gibilterra","br":"Gibraltar","pt":"Gibraltar","nl":"Gibraltar","hr":"Gibraltar","fa":"جبل‌طارق"},"flag":"https://restcountries.eu/data/gib.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":""} +{"name":"Greece","topLevelDomain":[".gr"],"alpha2Code":"GR","alpha3Code":"GRC","callingCodes":["30"],"capital":"Athens","altSpellings":["GR","Elláda","Hellenic Republic","Ελληνική Δημοκρατία"],"region":"Europe","subregion":"Southern Europe","population":10858018,"latlng":[39.0,22.0],"demonym":"Greek","area":131990.0,"gini":34.3,"timezones":["UTC+02:00"],"borders":["ALB","BGR","TUR","MKD"],"nativeName":"Ελλάδα","numericCode":"300","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"el","iso639_2":"ell","name":"Greek (modern)","nativeName":"ελληνικά"}],"translations":{"de":"Griechenland","es":"Grecia","fr":"Grèce","ja":"ギリシャ","it":"Grecia","br":"Grécia","pt":"Grécia","nl":"Griekenland","hr":"Grčka","fa":"یونان"},"flag":"https://restcountries.eu/data/grc.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"GRE"} +{"name":"Greenland","topLevelDomain":[".gl"],"alpha2Code":"GL","alpha3Code":"GRL","callingCodes":["299"],"capital":"Nuuk","altSpellings":["GL","Grønland"],"region":"Americas","subregion":"Northern America","population":55847,"latlng":[72.0,-40.0],"demonym":"Greenlandic","area":2166086.0,"gini":null,"timezones":["UTC-04:00","UTC-03:00","UTC-01:00","UTC+00:00"],"borders":[],"nativeName":"Kalaallit Nunaat","numericCode":"304","currencies":[{"code":"DKK","name":"Danish krone","symbol":"kr"}],"languages":[{"iso639_1":"kl","iso639_2":"kal","name":"Kalaallisut","nativeName":"kalaallisut"}],"translations":{"de":"Grönland","es":"Groenlandia","fr":"Groenland","ja":"グリーンランド","it":"Groenlandia","br":"Groelândia","pt":"Gronelândia","nl":"Groenland","hr":"Grenland","fa":"گرینلند"},"flag":"https://restcountries.eu/data/grl.svg","regionalBlocs":[],"cioc":""} +{"name":"Grenada","topLevelDomain":[".gd"],"alpha2Code":"GD","alpha3Code":"GRD","callingCodes":["1473"],"capital":"St. George's","altSpellings":["GD"],"region":"Americas","subregion":"Caribbean","population":103328,"latlng":[12.11666666,-61.66666666],"demonym":"Grenadian","area":344.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Grenada","numericCode":"308","currencies":[{"code":"XCD","name":"East Caribbean dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Grenada","es":"Grenada","fr":"Grenade","ja":"グレナダ","it":"Grenada","br":"Granada","pt":"Granada","nl":"Grenada","hr":"Grenada","fa":"گرنادا"},"flag":"https://restcountries.eu/data/grd.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"GRN"} +{"name":"Guadeloupe","topLevelDomain":[".gp"],"alpha2Code":"GP","alpha3Code":"GLP","callingCodes":["590"],"capital":"Basse-Terre","altSpellings":["GP","Gwadloup"],"region":"Americas","subregion":"Caribbean","population":400132,"latlng":[16.25,-61.583333],"demonym":"Guadeloupian","area":null,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Guadeloupe","numericCode":"312","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Guadeloupe","es":"Guadalupe","fr":"Guadeloupe","ja":"グアドループ","it":"Guadeloupa","br":"Guadalupe","pt":"Guadalupe","nl":"Guadeloupe","hr":"Gvadalupa","fa":"جزیره گوادلوپ"},"flag":"https://restcountries.eu/data/glp.svg","regionalBlocs":[],"cioc":""} +{"name":"Guam","topLevelDomain":[".gu"],"alpha2Code":"GU","alpha3Code":"GUM","callingCodes":["1671"],"capital":"Hagåtña","altSpellings":["GU","Guåhån"],"region":"Oceania","subregion":"Micronesia","population":184200,"latlng":[13.46666666,144.78333333],"demonym":"Guamanian","area":549.0,"gini":null,"timezones":["UTC+10:00"],"borders":[],"nativeName":"Guam","numericCode":"316","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"ch","iso639_2":"cha","name":"Chamorro","nativeName":"Chamoru"},{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Guam","es":"Guam","fr":"Guam","ja":"グアム","it":"Guam","br":"Guam","pt":"Guame","nl":"Guam","hr":"Guam","fa":"گوام"},"flag":"https://restcountries.eu/data/gum.svg","regionalBlocs":[],"cioc":"GUM"} +{"name":"Guatemala","topLevelDomain":[".gt"],"alpha2Code":"GT","alpha3Code":"GTM","callingCodes":["502"],"capital":"Guatemala City","altSpellings":["GT"],"region":"Americas","subregion":"Central America","population":16176133,"latlng":[15.5,-90.25],"demonym":"Guatemalan","area":108889.0,"gini":55.9,"timezones":["UTC-06:00"],"borders":["BLZ","SLV","HND","MEX"],"nativeName":"Guatemala","numericCode":"320","currencies":[{"code":"GTQ","name":"Guatemalan quetzal","symbol":"Q"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Guatemala","es":"Guatemala","fr":"Guatemala","ja":"グアテマラ","it":"Guatemala","br":"Guatemala","pt":"Guatemala","nl":"Guatemala","hr":"Gvatemala","fa":"گواتمالا"},"flag":"https://restcountries.eu/data/gtm.svg","regionalBlocs":[{"acronym":"CAIS","name":"Central American Integration System","otherAcronyms":["SICA"],"otherNames":["Sistema de la Integración Centroamericana,"]}],"cioc":"GUA"} +{"name":"Guernsey","topLevelDomain":[".gg"],"alpha2Code":"GG","alpha3Code":"GGY","callingCodes":["44"],"capital":"St. Peter Port","altSpellings":["GG","Bailiwick of Guernsey","Bailliage de Guernesey"],"region":"Europe","subregion":"Northern Europe","population":62999,"latlng":[49.46666666,-2.58333333],"demonym":"Channel Islander","area":78.0,"gini":null,"timezones":["UTC+00:00"],"borders":[],"nativeName":"Guernsey","numericCode":"831","currencies":[{"code":"GBP","name":"British pound","symbol":"£"},{"code":"(none)","name":"Guernsey pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Guernsey","es":"Guernsey","fr":"Guernesey","ja":"ガーンジー","it":"Guernsey","br":"Guernsey","pt":"Guernsey","nl":"Guernsey","hr":"Guernsey","fa":"گرنزی"},"flag":"https://restcountries.eu/data/ggy.svg","regionalBlocs":[],"cioc":""} +{"name":"Guinea","topLevelDomain":[".gn"],"alpha2Code":"GN","alpha3Code":"GIN","callingCodes":["224"],"capital":"Conakry","altSpellings":["GN","Republic of Guinea","République de Guinée"],"region":"Africa","subregion":"Western Africa","population":12947000,"latlng":[11.0,-10.0],"demonym":"Guinean","area":245857.0,"gini":39.4,"timezones":["UTC"],"borders":["CIV","GNB","LBR","MLI","SEN","SLE"],"nativeName":"Guinée","numericCode":"324","currencies":[{"code":"GNF","name":"Guinean franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"ff","iso639_2":"ful","name":"Fula","nativeName":"Fulfulde"}],"translations":{"de":"Guinea","es":"Guinea","fr":"Guinée","ja":"ギニア","it":"Guinea","br":"Guiné","pt":"Guiné","nl":"Guinee","hr":"Gvineja","fa":"گینه"},"flag":"https://restcountries.eu/data/gin.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"GUI"} +{"name":"Guinea-Bissau","topLevelDomain":[".gw"],"alpha2Code":"GW","alpha3Code":"GNB","callingCodes":["245"],"capital":"Bissau","altSpellings":["GW","Republic of Guinea-Bissau","República da Guiné-Bissau"],"region":"Africa","subregion":"Western Africa","population":1547777,"latlng":[12.0,-15.0],"demonym":"Guinea-Bissauan","area":36125.0,"gini":35.5,"timezones":["UTC"],"borders":["GIN","SEN"],"nativeName":"Guiné-Bissau","numericCode":"624","currencies":[{"code":"XOF","name":"West African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"Guinea-Bissau","es":"Guinea-Bisáu","fr":"Guinée-Bissau","ja":"ギニアビサウ","it":"Guinea-Bissau","br":"Guiné-Bissau","pt":"Guiné-Bissau","nl":"Guinee-Bissau","hr":"Gvineja Bisau","fa":"گینه بیسائو"},"flag":"https://restcountries.eu/data/gnb.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"GBS"} +{"name":"Guyana","topLevelDomain":[".gy"],"alpha2Code":"GY","alpha3Code":"GUY","callingCodes":["592"],"capital":"Georgetown","altSpellings":["GY","Co-operative Republic of Guyana"],"region":"Americas","subregion":"South America","population":746900,"latlng":[5.0,-59.0],"demonym":"Guyanese","area":214969.0,"gini":44.5,"timezones":["UTC-04:00"],"borders":["BRA","SUR","VEN"],"nativeName":"Guyana","numericCode":"328","currencies":[{"code":"GYD","name":"Guyanese dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Guyana","es":"Guyana","fr":"Guyane","ja":"ガイアナ","it":"Guyana","br":"Guiana","pt":"Guiana","nl":"Guyana","hr":"Gvajana","fa":"گویان"},"flag":"https://restcountries.eu/data/guy.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]},{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"GUY"} +{"name":"Haiti","topLevelDomain":[".ht"],"alpha2Code":"HT","alpha3Code":"HTI","callingCodes":["509"],"capital":"Port-au-Prince","altSpellings":["HT","Republic of Haiti","République d'Haïti","Repiblik Ayiti"],"region":"Americas","subregion":"Caribbean","population":11078033,"latlng":[19.0,-72.41666666],"demonym":"Haitian","area":27750.0,"gini":59.2,"timezones":["UTC-05:00"],"borders":["DOM"],"nativeName":"Haïti","numericCode":"332","currencies":[{"code":"HTG","name":"Haitian gourde","symbol":"G"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"ht","iso639_2":"hat","name":"Haitian","nativeName":"Kreyòl ayisyen"}],"translations":{"de":"Haiti","es":"Haiti","fr":"Haïti","ja":"ハイチ","it":"Haiti","br":"Haiti","pt":"Haiti","nl":"Haïti","hr":"Haiti","fa":"هائیتی"},"flag":"https://restcountries.eu/data/hti.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"HAI"} +{"name":"Heard Island and McDonald Islands","topLevelDomain":[".hm",".aq"],"alpha2Code":"HM","alpha3Code":"HMD","callingCodes":[""],"capital":"","altSpellings":["HM"],"region":"","subregion":"","population":0,"latlng":[-53.1,72.51666666],"demonym":"Heard and McDonald Islander","area":412.0,"gini":null,"timezones":["UTC+05:00"],"borders":[],"nativeName":"Heard Island and McDonald Islands","numericCode":"334","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Heard und die McDonaldinseln","es":"Islas Heard y McDonald","fr":"Îles Heard-et-MacDonald","ja":"ハード島とマクドナルド諸島","it":"Isole Heard e McDonald","br":"Ilha Heard e Ilhas McDonald","pt":"Ilha Heard e Ilhas McDonald","nl":"Heard- en McDonaldeilanden","hr":"Otok Heard i otočje McDonald","fa":"جزیره هرد و جزایر مک‌دونالد"},"flag":"https://restcountries.eu/data/hmd.svg","regionalBlocs":[],"cioc":""} +{"name":"Holy See","topLevelDomain":[".va"],"alpha2Code":"VA","alpha3Code":"VAT","callingCodes":["379"],"capital":"Rome","altSpellings":["Sancta Sedes","Vatican","The Vatican"],"region":"Europe","subregion":"Southern Europe","population":451,"latlng":[41.9,12.45],"demonym":"","area":0.44,"gini":null,"timezones":["UTC+01:00"],"borders":["ITA"],"nativeName":"Sancta Sedes","numericCode":"336","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"la","iso639_2":"lat","name":"Latin","nativeName":"latine"},{"iso639_1":"it","iso639_2":"ita","name":"Italian","nativeName":"Italiano"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"de","iso639_2":"deu","name":"German","nativeName":"Deutsch"}],"translations":{"de":"Heiliger Stuhl","es":"Santa Sede","fr":"voir Saint","ja":"聖座","it":"Santa Sede","br":"Vaticano","pt":"Vaticano","nl":"Heilige Stoel","hr":"Sveta Stolica","fa":"سریر مقدس"},"flag":"https://restcountries.eu/data/vat.svg","regionalBlocs":[],"cioc":""} +{"name":"Honduras","topLevelDomain":[".hn"],"alpha2Code":"HN","alpha3Code":"HND","callingCodes":["504"],"capital":"Tegucigalpa","altSpellings":["HN","Republic of Honduras","República de Honduras"],"region":"Americas","subregion":"Central America","population":8576532,"latlng":[15.0,-86.5],"demonym":"Honduran","area":112492.0,"gini":57.0,"timezones":["UTC-06:00"],"borders":["GTM","SLV","NIC"],"nativeName":"Honduras","numericCode":"340","currencies":[{"code":"HNL","name":"Honduran lempira","symbol":"L"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Honduras","es":"Honduras","fr":"Honduras","ja":"ホンジュラス","it":"Honduras","br":"Honduras","pt":"Honduras","nl":"Honduras","hr":"Honduras","fa":"هندوراس"},"flag":"https://restcountries.eu/data/hnd.svg","regionalBlocs":[{"acronym":"CAIS","name":"Central American Integration System","otherAcronyms":["SICA"],"otherNames":["Sistema de la Integración Centroamericana,"]}],"cioc":"HON"} +{"name":"Hong Kong","topLevelDomain":[".hk"],"alpha2Code":"HK","alpha3Code":"HKG","callingCodes":["852"],"capital":"City of Victoria","altSpellings":["HK","香港"],"region":"Asia","subregion":"Eastern Asia","population":7324300,"latlng":[22.25,114.16666666],"demonym":"Chinese","area":1104.0,"gini":53.3,"timezones":["UTC+08:00"],"borders":["CHN"],"nativeName":"香港","numericCode":"344","currencies":[{"code":"HKD","name":"Hong Kong dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"zh","iso639_2":"zho","name":"Chinese","nativeName":"中文 (Zhōngwén)"}],"translations":{"de":"Hong Kong","es":"Hong Kong","fr":"Hong Kong","ja":"香港","it":"Hong Kong","br":"Hong Kong","pt":"Hong Kong","nl":"Hongkong","hr":"Hong Kong","fa":"هنگ‌کنگ"},"flag":"https://restcountries.eu/data/hkg.svg","regionalBlocs":[],"cioc":"HKG"} +{"name":"Hungary","topLevelDomain":[".hu"],"alpha2Code":"HU","alpha3Code":"HUN","callingCodes":["36"],"capital":"Budapest","altSpellings":["HU"],"region":"Europe","subregion":"Eastern Europe","population":9823000,"latlng":[47.0,20.0],"demonym":"Hungarian","area":93028.0,"gini":31.2,"timezones":["UTC+01:00"],"borders":["AUT","HRV","ROU","SRB","SVK","SVN","UKR"],"nativeName":"Magyarország","numericCode":"348","currencies":[{"code":"HUF","name":"Hungarian forint","symbol":"Ft"}],"languages":[{"iso639_1":"hu","iso639_2":"hun","name":"Hungarian","nativeName":"magyar"}],"translations":{"de":"Ungarn","es":"Hungría","fr":"Hongrie","ja":"ハンガリー","it":"Ungheria","br":"Hungria","pt":"Hungria","nl":"Hongarije","hr":"Mađarska","fa":"مجارستان"},"flag":"https://restcountries.eu/data/hun.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"HUN"} +{"name":"Iceland","topLevelDomain":[".is"],"alpha2Code":"IS","alpha3Code":"ISL","callingCodes":["354"],"capital":"Reykjavík","altSpellings":["IS","Island","Republic of Iceland","Lýðveldið Ísland"],"region":"Europe","subregion":"Northern Europe","population":334300,"latlng":[65.0,-18.0],"demonym":"Icelander","area":103000.0,"gini":null,"timezones":["UTC"],"borders":[],"nativeName":"Ísland","numericCode":"352","currencies":[{"code":"ISK","name":"Icelandic króna","symbol":"kr"}],"languages":[{"iso639_1":"is","iso639_2":"isl","name":"Icelandic","nativeName":"Íslenska"}],"translations":{"de":"Island","es":"Islandia","fr":"Islande","ja":"アイスランド","it":"Islanda","br":"Islândia","pt":"Islândia","nl":"IJsland","hr":"Island","fa":"ایسلند"},"flag":"https://restcountries.eu/data/isl.svg","regionalBlocs":[{"acronym":"EFTA","name":"European Free Trade Association","otherAcronyms":[],"otherNames":[]}],"cioc":"ISL"} +{"name":"India","topLevelDomain":[".in"],"alpha2Code":"IN","alpha3Code":"IND","callingCodes":["91"],"capital":"New Delhi","altSpellings":["IN","Bhārat","Republic of India","Bharat Ganrajya"],"region":"Asia","subregion":"Southern Asia","population":1295210000,"latlng":[20.0,77.0],"demonym":"Indian","area":3287590.0,"gini":33.4,"timezones":["UTC+05:30"],"borders":["AFG","BGD","BTN","MMR","CHN","NPL","PAK","LKA"],"nativeName":"भारत","numericCode":"356","currencies":[{"code":"INR","name":"Indian rupee","symbol":"₹"}],"languages":[{"iso639_1":"hi","iso639_2":"hin","name":"Hindi","nativeName":"हिन्दी"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Indien","es":"India","fr":"Inde","ja":"インド","it":"India","br":"Índia","pt":"Índia","nl":"India","hr":"Indija","fa":"هند"},"flag":"https://restcountries.eu/data/ind.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Association for Regional Cooperation","otherAcronyms":[],"otherNames":[]}],"cioc":"IND"} +{"name":"Indonesia","topLevelDomain":[".id"],"alpha2Code":"ID","alpha3Code":"IDN","callingCodes":["62"],"capital":"Jakarta","altSpellings":["ID","Republic of Indonesia","Republik Indonesia"],"region":"Asia","subregion":"South-Eastern Asia","population":258705000,"latlng":[-5.0,120.0],"demonym":"Indonesian","area":1904569.0,"gini":34.0,"timezones":["UTC+07:00","UTC+08:00","UTC+09:00"],"borders":["TLS","MYS","PNG"],"nativeName":"Indonesia","numericCode":"360","currencies":[{"code":"IDR","name":"Indonesian rupiah","symbol":"Rp"}],"languages":[{"iso639_1":"id","iso639_2":"ind","name":"Indonesian","nativeName":"Bahasa Indonesia"}],"translations":{"de":"Indonesien","es":"Indonesia","fr":"Indonésie","ja":"インドネシア","it":"Indonesia","br":"Indonésia","pt":"Indonésia","nl":"Indonesië","hr":"Indonezija","fa":"اندونزی"},"flag":"https://restcountries.eu/data/idn.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"INA"} +{"name":"Côte d'Ivoire","topLevelDomain":[".ci"],"alpha2Code":"CI","alpha3Code":"CIV","callingCodes":["225"],"capital":"Yamoussoukro","altSpellings":["CI","Ivory Coast","Republic of Côte d'Ivoire","République de Côte d'Ivoire"],"region":"Africa","subregion":"Western Africa","population":22671331,"latlng":[8.0,-5.0],"demonym":"Ivorian","area":322463.0,"gini":41.5,"timezones":["UTC"],"borders":["BFA","GHA","GIN","LBR","MLI"],"nativeName":"Côte d'Ivoire","numericCode":"384","currencies":[{"code":"XOF","name":"West African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Elfenbeinküste","es":"Costa de Marfil","fr":"Côte d'Ivoire","ja":"コートジボワール","it":"Costa D'Avorio","br":"Costa do Marfim","pt":"Costa do Marfim","nl":"Ivoorkust","hr":"Obala Bjelokosti","fa":"ساحل عاج"},"flag":"https://restcountries.eu/data/civ.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"CIV"} +{"name":"Iran (Islamic Republic of)","topLevelDomain":[".ir"],"alpha2Code":"IR","alpha3Code":"IRN","callingCodes":["98"],"capital":"Tehran","altSpellings":["IR","Islamic Republic of Iran","Jomhuri-ye Eslāmi-ye Irān"],"region":"Asia","subregion":"Southern Asia","population":79369900,"latlng":[32.0,53.0],"demonym":"Iranian","area":1648195.0,"gini":38.3,"timezones":["UTC+03:30"],"borders":["AFG","ARM","AZE","IRQ","PAK","TUR","TKM"],"nativeName":"ایران","numericCode":"364","currencies":[{"code":"IRR","name":"Iranian rial","symbol":"﷼"}],"languages":[{"iso639_1":"fa","iso639_2":"fas","name":"Persian (Farsi)","nativeName":"فارسی"}],"translations":{"de":"Iran","es":"Iran","fr":"Iran","ja":"イラン・イスラム共和国","it":null,"br":"Irã","pt":"Irão","nl":"Iran","hr":"Iran","fa":"ایران"},"flag":"https://restcountries.eu/data/irn.svg","regionalBlocs":[],"cioc":"IRI"} +{"name":"Iraq","topLevelDomain":[".iq"],"alpha2Code":"IQ","alpha3Code":"IRQ","callingCodes":["964"],"capital":"Baghdad","altSpellings":["IQ","Republic of Iraq","Jumhūriyyat al-‘Irāq"],"region":"Asia","subregion":"Western Asia","population":37883543,"latlng":[33.0,44.0],"demonym":"Iraqi","area":438317.0,"gini":30.9,"timezones":["UTC+03:00"],"borders":["IRN","JOR","KWT","SAU","SYR","TUR"],"nativeName":"العراق","numericCode":"368","currencies":[{"code":"IQD","name":"Iraqi dinar","symbol":"ع.د"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"},{"iso639_1":"ku","iso639_2":"kur","name":"Kurdish","nativeName":"Kurdî"}],"translations":{"de":"Irak","es":"Irak","fr":"Irak","ja":"イラク","it":"Iraq","br":"Iraque","pt":"Iraque","nl":"Irak","hr":"Irak","fa":"عراق"},"flag":"https://restcountries.eu/data/irq.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"IRQ"} +{"name":"Ireland","topLevelDomain":[".ie"],"alpha2Code":"IE","alpha3Code":"IRL","callingCodes":["353"],"capital":"Dublin","altSpellings":["IE","Éire","Republic of Ireland","Poblacht na hÉireann"],"region":"Europe","subregion":"Northern Europe","population":6378000,"latlng":[53.0,-8.0],"demonym":"Irish","area":70273.0,"gini":34.3,"timezones":["UTC"],"borders":["GBR"],"nativeName":"Éire","numericCode":"372","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"ga","iso639_2":"gle","name":"Irish","nativeName":"Gaeilge"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Irland","es":"Irlanda","fr":"Irlande","ja":"アイルランド","it":"Irlanda","br":"Irlanda","pt":"Irlanda","nl":"Ierland","hr":"Irska","fa":"ایرلند"},"flag":"https://restcountries.eu/data/irl.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"IRL"} +{"name":"Isle of Man","topLevelDomain":[".im"],"alpha2Code":"IM","alpha3Code":"IMN","callingCodes":["44"],"capital":"Douglas","altSpellings":["IM","Ellan Vannin","Mann","Mannin"],"region":"Europe","subregion":"Northern Europe","population":84497,"latlng":[54.25,-4.5],"demonym":"Manx","area":572.0,"gini":null,"timezones":["UTC+00:00"],"borders":[],"nativeName":"Isle of Man","numericCode":"833","currencies":[{"code":"GBP","name":"British pound","symbol":"£"},{"code":"IMP[G]","name":"Manx pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"gv","iso639_2":"glv","name":"Manx","nativeName":"Gaelg"}],"translations":{"de":"Insel Man","es":"Isla de Man","fr":"Île de Man","ja":"マン島","it":"Isola di Man","br":"Ilha de Man","pt":"Ilha de Man","nl":"Isle of Man","hr":"Otok Man","fa":"جزیره من"},"flag":"https://restcountries.eu/data/imn.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":""} +{"name":"Israel","topLevelDomain":[".il"],"alpha2Code":"IL","alpha3Code":"ISR","callingCodes":["972"],"capital":"Jerusalem","altSpellings":["IL","State of Israel","Medīnat Yisrā'el"],"region":"Asia","subregion":"Western Asia","population":8527400,"latlng":[31.5,34.75],"demonym":"Israeli","area":20770.0,"gini":39.2,"timezones":["UTC+02:00"],"borders":["EGY","JOR","LBN","SYR"],"nativeName":"יִשְׂרָאֵל","numericCode":"376","currencies":[{"code":"ILS","name":"Israeli new shekel","symbol":"₪"}],"languages":[{"iso639_1":"he","iso639_2":"heb","name":"Hebrew (modern)","nativeName":"עברית"},{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Israel","es":"Israel","fr":"Israël","ja":"イスラエル","it":"Israele","br":"Israel","pt":"Israel","nl":"Israël","hr":"Izrael","fa":"اسرائیل"},"flag":"https://restcountries.eu/data/isr.svg","regionalBlocs":[],"cioc":"ISR"} +{"name":"Italy","topLevelDomain":[".it"],"alpha2Code":"IT","alpha3Code":"ITA","callingCodes":["39"],"capital":"Rome","altSpellings":["IT","Italian Republic","Repubblica italiana"],"region":"Europe","subregion":"Southern Europe","population":60665551,"latlng":[42.83333333,12.83333333],"demonym":"Italian","area":301336.0,"gini":36.0,"timezones":["UTC+01:00"],"borders":["AUT","FRA","SMR","SVN","CHE","VAT"],"nativeName":"Italia","numericCode":"380","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"it","iso639_2":"ita","name":"Italian","nativeName":"Italiano"}],"translations":{"de":"Italien","es":"Italia","fr":"Italie","ja":"イタリア","it":"Italia","br":"Itália","pt":"Itália","nl":"Italië","hr":"Italija","fa":"ایتالیا"},"flag":"https://restcountries.eu/data/ita.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"ITA"} +{"name":"Jamaica","topLevelDomain":[".jm"],"alpha2Code":"JM","alpha3Code":"JAM","callingCodes":["1876"],"capital":"Kingston","altSpellings":["JM"],"region":"Americas","subregion":"Caribbean","population":2723246,"latlng":[18.25,-77.5],"demonym":"Jamaican","area":10991.0,"gini":45.5,"timezones":["UTC-05:00"],"borders":[],"nativeName":"Jamaica","numericCode":"388","currencies":[{"code":"JMD","name":"Jamaican dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Jamaika","es":"Jamaica","fr":"Jamaïque","ja":"ジャマイカ","it":"Giamaica","br":"Jamaica","pt":"Jamaica","nl":"Jamaica","hr":"Jamajka","fa":"جامائیکا"},"flag":"https://restcountries.eu/data/jam.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"JAM"} +{"name":"Japan","topLevelDomain":[".jp"],"alpha2Code":"JP","alpha3Code":"JPN","callingCodes":["81"],"capital":"Tokyo","altSpellings":["JP","Nippon","Nihon"],"region":"Asia","subregion":"Eastern Asia","population":126960000,"latlng":[36.0,138.0],"demonym":"Japanese","area":377930.0,"gini":38.1,"timezones":["UTC+09:00"],"borders":[],"nativeName":"日本","numericCode":"392","currencies":[{"code":"JPY","name":"Japanese yen","symbol":"¥"}],"languages":[{"iso639_1":"ja","iso639_2":"jpn","name":"Japanese","nativeName":"日本語 (にほんご)"}],"translations":{"de":"Japan","es":"Japón","fr":"Japon","ja":"日本","it":"Giappone","br":"Japão","pt":"Japão","nl":"Japan","hr":"Japan","fa":"ژاپن"},"flag":"https://restcountries.eu/data/jpn.svg","regionalBlocs":[],"cioc":"JPN"} +{"name":"Jersey","topLevelDomain":[".je"],"alpha2Code":"JE","alpha3Code":"JEY","callingCodes":["44"],"capital":"Saint Helier","altSpellings":["JE","Bailiwick of Jersey","Bailliage de Jersey","Bailliage dé Jèrri"],"region":"Europe","subregion":"Northern Europe","population":100800,"latlng":[49.25,-2.16666666],"demonym":"Channel Islander","area":116.0,"gini":null,"timezones":["UTC+01:00"],"borders":[],"nativeName":"Jersey","numericCode":"832","currencies":[{"code":"GBP","name":"British pound","symbol":"£"},{"code":"JEP[G]","name":"Jersey pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Jersey","es":"Jersey","fr":"Jersey","ja":"ジャージー","it":"Isola di Jersey","br":"Jersey","pt":"Jersey","nl":"Jersey","hr":"Jersey","fa":"جرزی"},"flag":"https://restcountries.eu/data/jey.svg","regionalBlocs":[],"cioc":""} +{"name":"Jordan","topLevelDomain":[".jo"],"alpha2Code":"JO","alpha3Code":"JOR","callingCodes":["962"],"capital":"Amman","altSpellings":["JO","Hashemite Kingdom of Jordan","al-Mamlakah al-Urdunīyah al-Hāshimīyah"],"region":"Asia","subregion":"Western Asia","population":9531712,"latlng":[31.0,36.0],"demonym":"Jordanian","area":89342.0,"gini":35.4,"timezones":["UTC+03:00"],"borders":["IRQ","ISR","SAU","SYR"],"nativeName":"الأردن","numericCode":"400","currencies":[{"code":"JOD","name":"Jordanian dinar","symbol":"د.ا"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Jordanien","es":"Jordania","fr":"Jordanie","ja":"ヨルダン","it":"Giordania","br":"Jordânia","pt":"Jordânia","nl":"Jordanië","hr":"Jordan","fa":"اردن"},"flag":"https://restcountries.eu/data/jor.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"JOR"} +{"name":"Kazakhstan","topLevelDomain":[".kz",".қаз"],"alpha2Code":"KZ","alpha3Code":"KAZ","callingCodes":["76","77"],"capital":"Astana","altSpellings":["KZ","Qazaqstan","Казахстан","Republic of Kazakhstan","Қазақстан Республикасы","Qazaqstan Respublïkası","Республика Казахстан","Respublika Kazakhstan"],"region":"Asia","subregion":"Central Asia","population":17753200,"latlng":[48.0,68.0],"demonym":"Kazakhstani","area":2724900.0,"gini":29.0,"timezones":["UTC+05:00","UTC+06:00"],"borders":["CHN","KGZ","RUS","TKM","UZB"],"nativeName":"Қазақстан","numericCode":"398","currencies":[{"code":"KZT","name":"Kazakhstani tenge","symbol":null}],"languages":[{"iso639_1":"kk","iso639_2":"kaz","name":"Kazakh","nativeName":"қазақ тілі"},{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Kasachstan","es":"Kazajistán","fr":"Kazakhstan","ja":"カザフスタン","it":"Kazakistan","br":"Cazaquistão","pt":"Cazaquistão","nl":"Kazachstan","hr":"Kazahstan","fa":"قزاقستان"},"flag":"https://restcountries.eu/data/kaz.svg","regionalBlocs":[{"acronym":"EEU","name":"Eurasian Economic Union","otherAcronyms":["EAEU"],"otherNames":[]}],"cioc":"KAZ"} +{"name":"Kenya","topLevelDomain":[".ke"],"alpha2Code":"KE","alpha3Code":"KEN","callingCodes":["254"],"capital":"Nairobi","altSpellings":["KE","Republic of Kenya","Jamhuri ya Kenya"],"region":"Africa","subregion":"Eastern Africa","population":47251000,"latlng":[1.0,38.0],"demonym":"Kenyan","area":580367.0,"gini":47.7,"timezones":["UTC+03:00"],"borders":["ETH","SOM","SSD","TZA","UGA"],"nativeName":"Kenya","numericCode":"404","currencies":[{"code":"KES","name":"Kenyan shilling","symbol":"Sh"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"sw","iso639_2":"swa","name":"Swahili","nativeName":"Kiswahili"}],"translations":{"de":"Kenia","es":"Kenia","fr":"Kenya","ja":"ケニア","it":"Kenya","br":"Quênia","pt":"Quénia","nl":"Kenia","hr":"Kenija","fa":"کنیا"},"flag":"https://restcountries.eu/data/ken.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"KEN"} +{"name":"Kiribati","topLevelDomain":[".ki"],"alpha2Code":"KI","alpha3Code":"KIR","callingCodes":["686"],"capital":"South Tarawa","altSpellings":["KI","Republic of Kiribati","Ribaberiki Kiribati"],"region":"Oceania","subregion":"Micronesia","population":113400,"latlng":[1.41666666,173.0],"demonym":"I-Kiribati","area":811.0,"gini":null,"timezones":["UTC+12:00","UTC+13:00","UTC+14:00"],"borders":[],"nativeName":"Kiribati","numericCode":"296","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"},{"code":"(none)","name":"Kiribati dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Kiribati","es":"Kiribati","fr":"Kiribati","ja":"キリバス","it":"Kiribati","br":"Kiribati","pt":"Quiribáti","nl":"Kiribati","hr":"Kiribati","fa":"کیریباتی"},"flag":"https://restcountries.eu/data/kir.svg","regionalBlocs":[],"cioc":"KIR"} +{"name":"Kuwait","topLevelDomain":[".kw"],"alpha2Code":"KW","alpha3Code":"KWT","callingCodes":["965"],"capital":"Kuwait City","altSpellings":["KW","State of Kuwait","Dawlat al-Kuwait"],"region":"Asia","subregion":"Western Asia","population":4183658,"latlng":[29.5,45.75],"demonym":"Kuwaiti","area":17818.0,"gini":null,"timezones":["UTC+03:00"],"borders":["IRN","SAU"],"nativeName":"الكويت","numericCode":"414","currencies":[{"code":"KWD","name":"Kuwaiti dinar","symbol":"د.ك"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Kuwait","es":"Kuwait","fr":"Koweït","ja":"クウェート","it":"Kuwait","br":"Kuwait","pt":"Kuwait","nl":"Koeweit","hr":"Kuvajt","fa":"کویت"},"flag":"https://restcountries.eu/data/kwt.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"KUW"} +{"name":"Kyrgyzstan","topLevelDomain":[".kg"],"alpha2Code":"KG","alpha3Code":"KGZ","callingCodes":["996"],"capital":"Bishkek","altSpellings":["KG","Киргизия","Kyrgyz Republic","Кыргыз Республикасы","Kyrgyz Respublikasy"],"region":"Asia","subregion":"Central Asia","population":6047800,"latlng":[41.0,75.0],"demonym":"Kirghiz","area":199951.0,"gini":36.2,"timezones":["UTC+06:00"],"borders":["CHN","KAZ","TJK","UZB"],"nativeName":"Кыргызстан","numericCode":"417","currencies":[{"code":"KGS","name":"Kyrgyzstani som","symbol":"с"}],"languages":[{"iso639_1":"ky","iso639_2":"kir","name":"Kyrgyz","nativeName":"Кыргызча"},{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Kirgisistan","es":"Kirguizistán","fr":"Kirghizistan","ja":"キルギス","it":"Kirghizistan","br":"Quirguistão","pt":"Quirguizistão","nl":"Kirgizië","hr":"Kirgistan","fa":"قرقیزستان"},"flag":"https://restcountries.eu/data/kgz.svg","regionalBlocs":[{"acronym":"EEU","name":"Eurasian Economic Union","otherAcronyms":["EAEU"],"otherNames":[]}],"cioc":"KGZ"} +{"name":"Lao People's Democratic Republic","topLevelDomain":[".la"],"alpha2Code":"LA","alpha3Code":"LAO","callingCodes":["856"],"capital":"Vientiane","altSpellings":["LA","Lao","Laos","Lao People's Democratic Republic","Sathalanalat Paxathipatai Paxaxon Lao"],"region":"Asia","subregion":"South-Eastern Asia","population":6492400,"latlng":[18.0,105.0],"demonym":"Laotian","area":236800.0,"gini":36.7,"timezones":["UTC+07:00"],"borders":["MMR","KHM","CHN","THA","VNM"],"nativeName":"ສປປລາວ","numericCode":"418","currencies":[{"code":"LAK","name":"Lao kip","symbol":"₭"}],"languages":[{"iso639_1":"lo","iso639_2":"lao","name":"Lao","nativeName":"ພາສາລາວ"}],"translations":{"de":"Laos","es":"Laos","fr":"Laos","ja":"ラオス人民民主共和国","it":"Laos","br":"Laos","pt":"Laos","nl":"Laos","hr":"Laos","fa":"لائوس"},"flag":"https://restcountries.eu/data/lao.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"LAO"} +{"name":"Latvia","topLevelDomain":[".lv"],"alpha2Code":"LV","alpha3Code":"LVA","callingCodes":["371"],"capital":"Riga","altSpellings":["LV","Republic of Latvia","Latvijas Republika"],"region":"Europe","subregion":"Northern Europe","population":1961600,"latlng":[57.0,25.0],"demonym":"Latvian","area":64559.0,"gini":36.6,"timezones":["UTC+02:00"],"borders":["BLR","EST","LTU","RUS"],"nativeName":"Latvija","numericCode":"428","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"lv","iso639_2":"lav","name":"Latvian","nativeName":"latviešu valoda"}],"translations":{"de":"Lettland","es":"Letonia","fr":"Lettonie","ja":"ラトビア","it":"Lettonia","br":"Letônia","pt":"Letónia","nl":"Letland","hr":"Latvija","fa":"لتونی"},"flag":"https://restcountries.eu/data/lva.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"LAT"} +{"name":"Lebanon","topLevelDomain":[".lb"],"alpha2Code":"LB","alpha3Code":"LBN","callingCodes":["961"],"capital":"Beirut","altSpellings":["LB","Lebanese Republic","Al-Jumhūrīyah Al-Libnānīyah"],"region":"Asia","subregion":"Western Asia","population":5988000,"latlng":[33.83333333,35.83333333],"demonym":"Lebanese","area":10452.0,"gini":null,"timezones":["UTC+02:00"],"borders":["ISR","SYR"],"nativeName":"لبنان","numericCode":"422","currencies":[{"code":"LBP","name":"Lebanese pound","symbol":"ل.ل"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Libanon","es":"Líbano","fr":"Liban","ja":"レバノン","it":"Libano","br":"Líbano","pt":"Líbano","nl":"Libanon","hr":"Libanon","fa":"لبنان"},"flag":"https://restcountries.eu/data/lbn.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"LIB"} +{"name":"Lesotho","topLevelDomain":[".ls"],"alpha2Code":"LS","alpha3Code":"LSO","callingCodes":["266"],"capital":"Maseru","altSpellings":["LS","Kingdom of Lesotho","Muso oa Lesotho"],"region":"Africa","subregion":"Southern Africa","population":1894194,"latlng":[-29.5,28.5],"demonym":"Mosotho","area":30355.0,"gini":52.5,"timezones":["UTC+02:00"],"borders":["ZAF"],"nativeName":"Lesotho","numericCode":"426","currencies":[{"code":"LSL","name":"Lesotho loti","symbol":"L"},{"code":"ZAR","name":"South African rand","symbol":"R"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"st","iso639_2":"sot","name":"Southern Sotho","nativeName":"Sesotho"}],"translations":{"de":"Lesotho","es":"Lesotho","fr":"Lesotho","ja":"レソト","it":"Lesotho","br":"Lesoto","pt":"Lesoto","nl":"Lesotho","hr":"Lesoto","fa":"لسوتو"},"flag":"https://restcountries.eu/data/lso.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"LES"} +{"name":"Liberia","topLevelDomain":[".lr"],"alpha2Code":"LR","alpha3Code":"LBR","callingCodes":["231"],"capital":"Monrovia","altSpellings":["LR","Republic of Liberia"],"region":"Africa","subregion":"Western Africa","population":4615000,"latlng":[6.5,-9.5],"demonym":"Liberian","area":111369.0,"gini":38.2,"timezones":["UTC"],"borders":["GIN","CIV","SLE"],"nativeName":"Liberia","numericCode":"430","currencies":[{"code":"LRD","name":"Liberian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Liberia","es":"Liberia","fr":"Liberia","ja":"リベリア","it":"Liberia","br":"Libéria","pt":"Libéria","nl":"Liberia","hr":"Liberija","fa":"لیبریا"},"flag":"https://restcountries.eu/data/lbr.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"LBR"} +{"name":"Libya","topLevelDomain":[".ly"],"alpha2Code":"LY","alpha3Code":"LBY","callingCodes":["218"],"capital":"Tripoli","altSpellings":["LY","State of Libya","Dawlat Libya"],"region":"Africa","subregion":"Northern Africa","population":6385000,"latlng":[25.0,17.0],"demonym":"Libyan","area":1759540.0,"gini":null,"timezones":["UTC+01:00"],"borders":["DZA","TCD","EGY","NER","SDN","TUN"],"nativeName":"‏ليبيا","numericCode":"434","currencies":[{"code":"LYD","name":"Libyan dinar","symbol":"ل.د"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Libyen","es":"Libia","fr":"Libye","ja":"リビア","it":"Libia","br":"Líbia","pt":"Líbia","nl":"Libië","hr":"Libija","fa":"لیبی"},"flag":"https://restcountries.eu/data/lby.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"LBA"} +{"name":"Liechtenstein","topLevelDomain":[".li"],"alpha2Code":"LI","alpha3Code":"LIE","callingCodes":["423"],"capital":"Vaduz","altSpellings":["LI","Principality of Liechtenstein","Fürstentum Liechtenstein"],"region":"Europe","subregion":"Western Europe","population":37623,"latlng":[47.26666666,9.53333333],"demonym":"Liechtensteiner","area":160.0,"gini":null,"timezones":["UTC+01:00"],"borders":["AUT","CHE"],"nativeName":"Liechtenstein","numericCode":"438","currencies":[{"code":"CHF","name":"Swiss franc","symbol":"Fr"}],"languages":[{"iso639_1":"de","iso639_2":"deu","name":"German","nativeName":"Deutsch"}],"translations":{"de":"Liechtenstein","es":"Liechtenstein","fr":"Liechtenstein","ja":"リヒテンシュタイン","it":"Liechtenstein","br":"Liechtenstein","pt":"Listenstaine","nl":"Liechtenstein","hr":"Lihtenštajn","fa":"لیختن‌اشتاین"},"flag":"https://restcountries.eu/data/lie.svg","regionalBlocs":[{"acronym":"EFTA","name":"European Free Trade Association","otherAcronyms":[],"otherNames":[]}],"cioc":"LIE"} +{"name":"Lithuania","topLevelDomain":[".lt"],"alpha2Code":"LT","alpha3Code":"LTU","callingCodes":["370"],"capital":"Vilnius","altSpellings":["LT","Republic of Lithuania","Lietuvos Respublika"],"region":"Europe","subregion":"Northern Europe","population":2872294,"latlng":[56.0,24.0],"demonym":"Lithuanian","area":65300.0,"gini":37.6,"timezones":["UTC+02:00"],"borders":["BLR","LVA","POL","RUS"],"nativeName":"Lietuva","numericCode":"440","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"lt","iso639_2":"lit","name":"Lithuanian","nativeName":"lietuvių kalba"}],"translations":{"de":"Litauen","es":"Lituania","fr":"Lituanie","ja":"リトアニア","it":"Lituania","br":"Lituânia","pt":"Lituânia","nl":"Litouwen","hr":"Litva","fa":"لیتوانی"},"flag":"https://restcountries.eu/data/ltu.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"LTU"} +{"name":"Luxembourg","topLevelDomain":[".lu"],"alpha2Code":"LU","alpha3Code":"LUX","callingCodes":["352"],"capital":"Luxembourg","altSpellings":["LU","Grand Duchy of Luxembourg","Grand-Duché de Luxembourg","Großherzogtum Luxemburg","Groussherzogtum Lëtzebuerg"],"region":"Europe","subregion":"Western Europe","population":576200,"latlng":[49.75,6.16666666],"demonym":"Luxembourger","area":2586.0,"gini":30.8,"timezones":["UTC+01:00"],"borders":["BEL","FRA","DEU"],"nativeName":"Luxembourg","numericCode":"442","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"de","iso639_2":"deu","name":"German","nativeName":"Deutsch"},{"iso639_1":"lb","iso639_2":"ltz","name":"Luxembourgish","nativeName":"Lëtzebuergesch"}],"translations":{"de":"Luxemburg","es":"Luxemburgo","fr":"Luxembourg","ja":"ルクセンブルク","it":"Lussemburgo","br":"Luxemburgo","pt":"Luxemburgo","nl":"Luxemburg","hr":"Luksemburg","fa":"لوکزامبورگ"},"flag":"https://restcountries.eu/data/lux.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"LUX"} +{"name":"Macao","topLevelDomain":[".mo"],"alpha2Code":"MO","alpha3Code":"MAC","callingCodes":["853"],"capital":"","altSpellings":["MO","澳门","Macao Special Administrative Region of the People's Republic of China","中華人民共和國澳門特別行政區","Região Administrativa Especial de Macau da República Popular da China"],"region":"Asia","subregion":"Eastern Asia","population":649100,"latlng":[22.16666666,113.55],"demonym":"Chinese","area":30.0,"gini":null,"timezones":["UTC+08:00"],"borders":["CHN"],"nativeName":"澳門","numericCode":"446","currencies":[{"code":"MOP","name":"Macanese pataca","symbol":"P"}],"languages":[{"iso639_1":"zh","iso639_2":"zho","name":"Chinese","nativeName":"中文 (Zhōngwén)"},{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"Macao","es":"Macao","fr":"Macao","ja":"マカオ","it":"Macao","br":"Macau","pt":"Macau","nl":"Macao","hr":"Makao","fa":"مکائو"},"flag":"https://restcountries.eu/data/mac.svg","regionalBlocs":[],"cioc":""} +{"name":"Macedonia (the former Yugoslav Republic of)","topLevelDomain":[".mk"],"alpha2Code":"MK","alpha3Code":"MKD","callingCodes":["389"],"capital":"Skopje","altSpellings":["MK","Republic of Macedonia","Република Македонија"],"region":"Europe","subregion":"Southern Europe","population":2058539,"latlng":[41.83333333,22.0],"demonym":"Macedonian","area":25713.0,"gini":43.2,"timezones":["UTC+01:00"],"borders":["ALB","BGR","GRC","KOS","SRB"],"nativeName":"Македонија","numericCode":"807","currencies":[{"code":"MKD","name":"Macedonian denar","symbol":"ден"}],"languages":[{"iso639_1":"mk","iso639_2":"mkd","name":"Macedonian","nativeName":"македонски јазик"}],"translations":{"de":"Mazedonien","es":"Macedonia","fr":"Macédoine","ja":"マケドニア旧ユーゴスラビア共和国","it":"Macedonia","br":"Macedônia","pt":"Macedónia","nl":"Macedonië","hr":"Makedonija","fa":""},"flag":"https://restcountries.eu/data/mkd.svg","regionalBlocs":[{"acronym":"CEFTA","name":"Central European Free Trade Agreement","otherAcronyms":[],"otherNames":[]}],"cioc":"MKD"} +{"name":"Madagascar","topLevelDomain":[".mg"],"alpha2Code":"MG","alpha3Code":"MDG","callingCodes":["261"],"capital":"Antananarivo","altSpellings":["MG","Republic of Madagascar","Repoblikan'i Madagasikara","République de Madagascar"],"region":"Africa","subregion":"Eastern Africa","population":22434363,"latlng":[-20.0,47.0],"demonym":"Malagasy","area":587041.0,"gini":44.1,"timezones":["UTC+03:00"],"borders":[],"nativeName":"Madagasikara","numericCode":"450","currencies":[{"code":"MGA","name":"Malagasy ariary","symbol":"Ar"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"mg","iso639_2":"mlg","name":"Malagasy","nativeName":"fiteny malagasy"}],"translations":{"de":"Madagaskar","es":"Madagascar","fr":"Madagascar","ja":"マダガスカル","it":"Madagascar","br":"Madagascar","pt":"Madagáscar","nl":"Madagaskar","hr":"Madagaskar","fa":"ماداگاسکار"},"flag":"https://restcountries.eu/data/mdg.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"MAD"} +{"name":"Malawi","topLevelDomain":[".mw"],"alpha2Code":"MW","alpha3Code":"MWI","callingCodes":["265"],"capital":"Lilongwe","altSpellings":["MW","Republic of Malawi"],"region":"Africa","subregion":"Eastern Africa","population":16832910,"latlng":[-13.5,34.0],"demonym":"Malawian","area":118484.0,"gini":39.0,"timezones":["UTC+02:00"],"borders":["MOZ","TZA","ZMB"],"nativeName":"Malawi","numericCode":"454","currencies":[{"code":"MWK","name":"Malawian kwacha","symbol":"MK"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"ny","iso639_2":"nya","name":"Chichewa","nativeName":"chiCheŵa"}],"translations":{"de":"Malawi","es":"Malawi","fr":"Malawi","ja":"マラウイ","it":"Malawi","br":"Malawi","pt":"Malávi","nl":"Malawi","hr":"Malavi","fa":"مالاوی"},"flag":"https://restcountries.eu/data/mwi.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"MAW"} +{"name":"Malaysia","topLevelDomain":[".my"],"alpha2Code":"MY","alpha3Code":"MYS","callingCodes":["60"],"capital":"Kuala Lumpur","altSpellings":["MY"],"region":"Asia","subregion":"South-Eastern Asia","population":31405416,"latlng":[2.5,112.5],"demonym":"Malaysian","area":330803.0,"gini":46.2,"timezones":["UTC+08:00"],"borders":["BRN","IDN","THA"],"nativeName":"Malaysia","numericCode":"458","currencies":[{"code":"MYR","name":"Malaysian ringgit","symbol":"RM"}],"languages":[{"iso639_1":null,"iso639_2":"zsm","name":"Malaysian","nativeName":"بهاس مليسيا"}],"translations":{"de":"Malaysia","es":"Malasia","fr":"Malaisie","ja":"マレーシア","it":"Malesia","br":"Malásia","pt":"Malásia","nl":"Maleisië","hr":"Malezija","fa":"مالزی"},"flag":"https://restcountries.eu/data/mys.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"MAS"} +{"name":"Maldives","topLevelDomain":[".mv"],"alpha2Code":"MV","alpha3Code":"MDV","callingCodes":["960"],"capital":"Malé","altSpellings":["MV","Maldive Islands","Republic of the Maldives","Dhivehi Raajjeyge Jumhooriyya"],"region":"Asia","subregion":"Southern Asia","population":344023,"latlng":[3.25,73.0],"demonym":"Maldivan","area":300.0,"gini":37.4,"timezones":["UTC+05:00"],"borders":[],"nativeName":"Maldives","numericCode":"462","currencies":[{"code":"MVR","name":"Maldivian rufiyaa","symbol":".ރ"}],"languages":[{"iso639_1":"dv","iso639_2":"div","name":"Divehi","nativeName":"ދިވެހި"}],"translations":{"de":"Malediven","es":"Maldivas","fr":"Maldives","ja":"モルディブ","it":"Maldive","br":"Maldivas","pt":"Maldivas","nl":"Maldiven","hr":"Maldivi","fa":"مالدیو"},"flag":"https://restcountries.eu/data/mdv.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Association for Regional Cooperation","otherAcronyms":[],"otherNames":[]}],"cioc":"MDV"} +{"name":"Mali","topLevelDomain":[".ml"],"alpha2Code":"ML","alpha3Code":"MLI","callingCodes":["223"],"capital":"Bamako","altSpellings":["ML","Republic of Mali","République du Mali"],"region":"Africa","subregion":"Western Africa","population":18135000,"latlng":[17.0,-4.0],"demonym":"Malian","area":1240192.0,"gini":33.0,"timezones":["UTC"],"borders":["DZA","BFA","GIN","CIV","MRT","NER","SEN"],"nativeName":"Mali","numericCode":"466","currencies":[{"code":"XOF","name":"West African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Mali","es":"Mali","fr":"Mali","ja":"マリ","it":"Mali","br":"Mali","pt":"Mali","nl":"Mali","hr":"Mali","fa":"مالی"},"flag":"https://restcountries.eu/data/mli.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"MLI"} +{"name":"Malta","topLevelDomain":[".mt"],"alpha2Code":"MT","alpha3Code":"MLT","callingCodes":["356"],"capital":"Valletta","altSpellings":["MT","Republic of Malta","Repubblika ta' Malta"],"region":"Europe","subregion":"Southern Europe","population":425384,"latlng":[35.83333333,14.58333333],"demonym":"Maltese","area":316.0,"gini":null,"timezones":["UTC+01:00"],"borders":[],"nativeName":"Malta","numericCode":"470","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"mt","iso639_2":"mlt","name":"Maltese","nativeName":"Malti"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Malta","es":"Malta","fr":"Malte","ja":"マルタ","it":"Malta","br":"Malta","pt":"Malta","nl":"Malta","hr":"Malta","fa":"مالت"},"flag":"https://restcountries.eu/data/mlt.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"MLT"} +{"name":"Marshall Islands","topLevelDomain":[".mh"],"alpha2Code":"MH","alpha3Code":"MHL","callingCodes":["692"],"capital":"Majuro","altSpellings":["MH","Republic of the Marshall Islands","Aolepān Aorōkin M̧ajeļ"],"region":"Oceania","subregion":"Micronesia","population":54880,"latlng":[9.0,168.0],"demonym":"Marshallese","area":181.0,"gini":null,"timezones":["UTC+12:00"],"borders":[],"nativeName":"M̧ajeļ","numericCode":"584","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"mh","iso639_2":"mah","name":"Marshallese","nativeName":"Kajin M̧ajeļ"}],"translations":{"de":"Marshallinseln","es":"Islas Marshall","fr":"Îles Marshall","ja":"マーシャル諸島","it":"Isole Marshall","br":"Ilhas Marshall","pt":"Ilhas Marshall","nl":"Marshalleilanden","hr":"Maršalovi Otoci","fa":"جزایر مارشال"},"flag":"https://restcountries.eu/data/mhl.svg","regionalBlocs":[],"cioc":"MHL"} +{"name":"Martinique","topLevelDomain":[".mq"],"alpha2Code":"MQ","alpha3Code":"MTQ","callingCodes":["596"],"capital":"Fort-de-France","altSpellings":["MQ"],"region":"Americas","subregion":"Caribbean","population":378243,"latlng":[14.666667,-61.0],"demonym":"French","area":null,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Martinique","numericCode":"474","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Martinique","es":"Martinica","fr":"Martinique","ja":"マルティニーク","it":"Martinica","br":"Martinica","pt":"Martinica","nl":"Martinique","hr":"Martinique","fa":"مونتسرات"},"flag":"https://restcountries.eu/data/mtq.svg","regionalBlocs":[],"cioc":""} +{"name":"Mauritania","topLevelDomain":[".mr"],"alpha2Code":"MR","alpha3Code":"MRT","callingCodes":["222"],"capital":"Nouakchott","altSpellings":["MR","Islamic Republic of Mauritania","al-Jumhūriyyah al-ʾIslāmiyyah al-Mūrītāniyyah"],"region":"Africa","subregion":"Western Africa","population":3718678,"latlng":[20.0,-12.0],"demonym":"Mauritanian","area":1030700.0,"gini":40.5,"timezones":["UTC"],"borders":["DZA","MLI","SEN","ESH"],"nativeName":"موريتانيا","numericCode":"478","currencies":[{"code":"MRO","name":"Mauritanian ouguiya","symbol":"UM"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Mauretanien","es":"Mauritania","fr":"Mauritanie","ja":"モーリタニア","it":"Mauritania","br":"Mauritânia","pt":"Mauritânia","nl":"Mauritanië","hr":"Mauritanija","fa":"موریتانی"},"flag":"https://restcountries.eu/data/mrt.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"MTN"} +{"name":"Mauritius","topLevelDomain":[".mu"],"alpha2Code":"MU","alpha3Code":"MUS","callingCodes":["230"],"capital":"Port Louis","altSpellings":["MU","Republic of Mauritius","République de Maurice"],"region":"Africa","subregion":"Eastern Africa","population":1262879,"latlng":[-20.28333333,57.55],"demonym":"Mauritian","area":2040.0,"gini":null,"timezones":["UTC+04:00"],"borders":[],"nativeName":"Maurice","numericCode":"480","currencies":[{"code":"MUR","name":"Mauritian rupee","symbol":"₨"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Mauritius","es":"Mauricio","fr":"Île Maurice","ja":"モーリシャス","it":"Mauritius","br":"Maurício","pt":"Maurícia","nl":"Mauritius","hr":"Mauricijus","fa":"موریس"},"flag":"https://restcountries.eu/data/mus.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"MRI"} +{"name":"Mayotte","topLevelDomain":[".yt"],"alpha2Code":"YT","alpha3Code":"MYT","callingCodes":["262"],"capital":"Mamoudzou","altSpellings":["YT","Department of Mayotte","Département de Mayotte"],"region":"Africa","subregion":"Eastern Africa","population":226915,"latlng":[-12.83333333,45.16666666],"demonym":"French","area":null,"gini":null,"timezones":["UTC+03:00"],"borders":[],"nativeName":"Mayotte","numericCode":"175","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Mayotte","es":"Mayotte","fr":"Mayotte","ja":"マヨット","it":"Mayotte","br":"Mayotte","pt":"Mayotte","nl":"Mayotte","hr":"Mayotte","fa":"مایوت"},"flag":"https://restcountries.eu/data/myt.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":""} +{"name":"Mexico","topLevelDomain":[".mx"],"alpha2Code":"MX","alpha3Code":"MEX","callingCodes":["52"],"capital":"Mexico City","altSpellings":["MX","Mexicanos","United Mexican States","Estados Unidos Mexicanos"],"region":"Americas","subregion":"Central America","population":122273473,"latlng":[23.0,-102.0],"demonym":"Mexican","area":1964375.0,"gini":47.0,"timezones":["UTC-08:00","UTC-07:00","UTC-06:00"],"borders":["BLZ","GTM","USA"],"nativeName":"México","numericCode":"484","currencies":[{"code":"MXN","name":"Mexican peso","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Mexiko","es":"México","fr":"Mexique","ja":"メキシコ","it":"Messico","br":"México","pt":"México","nl":"Mexico","hr":"Meksiko","fa":"مکزیک"},"flag":"https://restcountries.eu/data/mex.svg","regionalBlocs":[{"acronym":"PA","name":"Pacific Alliance","otherAcronyms":[],"otherNames":["Alianza del Pacífico"]},{"acronym":"NAFTA","name":"North American Free Trade Agreement","otherAcronyms":[],"otherNames":["Tratado de Libre Comercio de América del Norte","Accord de Libre-échange Nord-Américain"]}],"cioc":"MEX"} +{"name":"Micronesia (Federated States of)","topLevelDomain":[".fm"],"alpha2Code":"FM","alpha3Code":"FSM","callingCodes":["691"],"capital":"Palikir","altSpellings":["FM","Federated States of Micronesia"],"region":"Oceania","subregion":"Micronesia","population":102800,"latlng":[6.91666666,158.25],"demonym":"Micronesian","area":702.0,"gini":null,"timezones":["UTC+10:00","UTC+11"],"borders":[],"nativeName":"Micronesia","numericCode":"583","currencies":[{"code":null,"name":"[D]","symbol":"$"},{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Mikronesien","es":"Micronesia","fr":"Micronésie","ja":"ミクロネシア連邦","it":"Micronesia","br":"Micronésia","pt":"Micronésia","nl":"Micronesië","hr":"Mikronezija","fa":"ایالات فدرال میکرونزی"},"flag":"https://restcountries.eu/data/fsm.svg","regionalBlocs":[],"cioc":"FSM"} +{"name":"Moldova (Republic of)","topLevelDomain":[".md"],"alpha2Code":"MD","alpha3Code":"MDA","callingCodes":["373"],"capital":"Chișinău","altSpellings":["MD","Republic of Moldova","Republica Moldova"],"region":"Europe","subregion":"Eastern Europe","population":3553100,"latlng":[47.0,29.0],"demonym":"Moldovan","area":33846.0,"gini":33.0,"timezones":["UTC+02:00"],"borders":["ROU","UKR"],"nativeName":"Moldova","numericCode":"498","currencies":[{"code":"MDL","name":"Moldovan leu","symbol":"L"}],"languages":[{"iso639_1":"ro","iso639_2":"ron","name":"Romanian","nativeName":"Română"}],"translations":{"de":"Moldawie","es":"Moldavia","fr":"Moldavie","ja":"モルドバ共和国","it":"Moldavia","br":"Moldávia","pt":"Moldávia","nl":"Moldavië","hr":"Moldova","fa":"مولداوی"},"flag":"https://restcountries.eu/data/mda.svg","regionalBlocs":[{"acronym":"CEFTA","name":"Central European Free Trade Agreement","otherAcronyms":[],"otherNames":[]}],"cioc":"MDA"} +{"name":"Monaco","topLevelDomain":[".mc"],"alpha2Code":"MC","alpha3Code":"MCO","callingCodes":["377"],"capital":"Monaco","altSpellings":["MC","Principality of Monaco","Principauté de Monaco"],"region":"Europe","subregion":"Western Europe","population":38400,"latlng":[43.73333333,7.4],"demonym":"Monegasque","area":2.02,"gini":null,"timezones":["UTC+01:00"],"borders":["FRA"],"nativeName":"Monaco","numericCode":"492","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Monaco","es":"Mónaco","fr":"Monaco","ja":"モナコ","it":"Principato di Monaco","br":"Mônaco","pt":"Mónaco","nl":"Monaco","hr":"Monako","fa":"موناکو"},"flag":"https://restcountries.eu/data/mco.svg","regionalBlocs":[],"cioc":"MON"} +{"name":"Mongolia","topLevelDomain":[".mn"],"alpha2Code":"MN","alpha3Code":"MNG","callingCodes":["976"],"capital":"Ulan Bator","altSpellings":["MN"],"region":"Asia","subregion":"Eastern Asia","population":3093100,"latlng":[46.0,105.0],"demonym":"Mongolian","area":1564110.0,"gini":36.5,"timezones":["UTC+07:00","UTC+08:00"],"borders":["CHN","RUS"],"nativeName":"Монгол улс","numericCode":"496","currencies":[{"code":"MNT","name":"Mongolian tögrög","symbol":"₮"}],"languages":[{"iso639_1":"mn","iso639_2":"mon","name":"Mongolian","nativeName":"Монгол хэл"}],"translations":{"de":"Mongolei","es":"Mongolia","fr":"Mongolie","ja":"モンゴル","it":"Mongolia","br":"Mongólia","pt":"Mongólia","nl":"Mongolië","hr":"Mongolija","fa":"مغولستان"},"flag":"https://restcountries.eu/data/mng.svg","regionalBlocs":[],"cioc":"MGL"} +{"name":"Montenegro","topLevelDomain":[".me"],"alpha2Code":"ME","alpha3Code":"MNE","callingCodes":["382"],"capital":"Podgorica","altSpellings":["ME","Crna Gora"],"region":"Europe","subregion":"Southern Europe","population":621810,"latlng":[42.5,19.3],"demonym":"Montenegrin","area":13812.0,"gini":30.0,"timezones":["UTC+01:00"],"borders":["ALB","BIH","HRV","KOS","SRB"],"nativeName":"Црна Гора","numericCode":"499","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"sr","iso639_2":"srp","name":"Serbian","nativeName":"српски језик"},{"iso639_1":"bs","iso639_2":"bos","name":"Bosnian","nativeName":"bosanski jezik"},{"iso639_1":"sq","iso639_2":"sqi","name":"Albanian","nativeName":"Shqip"},{"iso639_1":"hr","iso639_2":"hrv","name":"Croatian","nativeName":"hrvatski jezik"}],"translations":{"de":"Montenegro","es":"Montenegro","fr":"Monténégro","ja":"モンテネグロ","it":"Montenegro","br":"Montenegro","pt":"Montenegro","nl":"Montenegro","hr":"Crna Gora","fa":"مونته‌نگرو"},"flag":"https://restcountries.eu/data/mne.svg","regionalBlocs":[{"acronym":"CEFTA","name":"Central European Free Trade Agreement","otherAcronyms":[],"otherNames":[]}],"cioc":"MNE"} +{"name":"Montserrat","topLevelDomain":[".ms"],"alpha2Code":"MS","alpha3Code":"MSR","callingCodes":["1664"],"capital":"Plymouth","altSpellings":["MS"],"region":"Americas","subregion":"Caribbean","population":4922,"latlng":[16.75,-62.2],"demonym":"Montserratian","area":102.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Montserrat","numericCode":"500","currencies":[{"code":"XCD","name":"East Caribbean dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Montserrat","es":"Montserrat","fr":"Montserrat","ja":"モントセラト","it":"Montserrat","br":"Montserrat","pt":"Monserrate","nl":"Montserrat","hr":"Montserrat","fa":"مایوت"},"flag":"https://restcountries.eu/data/msr.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":""} +{"name":"Morocco","topLevelDomain":[".ma"],"alpha2Code":"MA","alpha3Code":"MAR","callingCodes":["212"],"capital":"Rabat","altSpellings":["MA","Kingdom of Morocco","Al-Mamlakah al-Maġribiyah"],"region":"Africa","subregion":"Northern Africa","population":33337529,"latlng":[32.0,-5.0],"demonym":"Moroccan","area":446550.0,"gini":40.9,"timezones":["UTC"],"borders":["DZA","ESH","ESP"],"nativeName":"المغرب","numericCode":"504","currencies":[{"code":"MAD","name":"Moroccan dirham","symbol":"د.م."}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Marokko","es":"Marruecos","fr":"Maroc","ja":"モロッコ","it":"Marocco","br":"Marrocos","pt":"Marrocos","nl":"Marokko","hr":"Maroko","fa":"مراکش"},"flag":"https://restcountries.eu/data/mar.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"MAR"} +{"name":"Mozambique","topLevelDomain":[".mz"],"alpha2Code":"MZ","alpha3Code":"MOZ","callingCodes":["258"],"capital":"Maputo","altSpellings":["MZ","Republic of Mozambique","República de Moçambique"],"region":"Africa","subregion":"Eastern Africa","population":26423700,"latlng":[-18.25,35.0],"demonym":"Mozambican","area":801590.0,"gini":45.7,"timezones":["UTC+02:00"],"borders":["MWI","ZAF","SWZ","TZA","ZMB","ZWE"],"nativeName":"Moçambique","numericCode":"508","currencies":[{"code":"MZN","name":"Mozambican metical","symbol":"MT"}],"languages":[{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"Mosambik","es":"Mozambique","fr":"Mozambique","ja":"モザンビーク","it":"Mozambico","br":"Moçambique","pt":"Moçambique","nl":"Mozambique","hr":"Mozambik","fa":"موزامبیک"},"flag":"https://restcountries.eu/data/moz.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"MOZ"} +{"name":"Myanmar","topLevelDomain":[".mm"],"alpha2Code":"MM","alpha3Code":"MMR","callingCodes":["95"],"capital":"Naypyidaw","altSpellings":["MM","Burma","Republic of the Union of Myanmar","Pyidaunzu Thanmăda Myăma Nainngandaw"],"region":"Asia","subregion":"South-Eastern Asia","population":51419420,"latlng":[22.0,98.0],"demonym":"Burmese","area":676578.0,"gini":null,"timezones":["UTC+06:30"],"borders":["BGD","CHN","IND","LAO","THA"],"nativeName":"Myanma","numericCode":"104","currencies":[{"code":"MMK","name":"Burmese kyat","symbol":"Ks"}],"languages":[{"iso639_1":"my","iso639_2":"mya","name":"Burmese","nativeName":"ဗမာစာ"}],"translations":{"de":"Myanmar","es":"Myanmar","fr":"Myanmar","ja":"ミャンマー","it":"Birmania","br":"Myanmar","pt":"Myanmar","nl":"Myanmar","hr":"Mijanmar","fa":"میانمار"},"flag":"https://restcountries.eu/data/mmr.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"MYA"} +{"name":"Namibia","topLevelDomain":[".na"],"alpha2Code":"NA","alpha3Code":"NAM","callingCodes":["264"],"capital":"Windhoek","altSpellings":["NA","Namibië","Republic of Namibia"],"region":"Africa","subregion":"Southern Africa","population":2324388,"latlng":[-22.0,17.0],"demonym":"Namibian","area":825615.0,"gini":63.9,"timezones":["UTC+01:00"],"borders":["AGO","BWA","ZAF","ZMB"],"nativeName":"Namibia","numericCode":"516","currencies":[{"code":"NAD","name":"Namibian dollar","symbol":"$"},{"code":"ZAR","name":"South African rand","symbol":"R"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"af","iso639_2":"afr","name":"Afrikaans","nativeName":"Afrikaans"}],"translations":{"de":"Namibia","es":"Namibia","fr":"Namibie","ja":"ナミビア","it":"Namibia","br":"Namíbia","pt":"Namíbia","nl":"Namibië","hr":"Namibija","fa":"نامیبیا"},"flag":"https://restcountries.eu/data/nam.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"NAM"} +{"name":"Nauru","topLevelDomain":[".nr"],"alpha2Code":"NR","alpha3Code":"NRU","callingCodes":["674"],"capital":"Yaren","altSpellings":["NR","Naoero","Pleasant Island","Republic of Nauru","Ripublik Naoero"],"region":"Oceania","subregion":"Micronesia","population":10084,"latlng":[-0.53333333,166.91666666],"demonym":"Nauruan","area":21.0,"gini":null,"timezones":["UTC+12:00"],"borders":[],"nativeName":"Nauru","numericCode":"520","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"},{"code":"(none)","name":null,"symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"na","iso639_2":"nau","name":"Nauruan","nativeName":"Dorerin Naoero"}],"translations":{"de":"Nauru","es":"Nauru","fr":"Nauru","ja":"ナウル","it":"Nauru","br":"Nauru","pt":"Nauru","nl":"Nauru","hr":"Nauru","fa":"نائورو"},"flag":"https://restcountries.eu/data/nru.svg","regionalBlocs":[],"cioc":"NRU"} +{"name":"Nepal","topLevelDomain":[".np"],"alpha2Code":"NP","alpha3Code":"NPL","callingCodes":["977"],"capital":"Kathmandu","altSpellings":["NP","Federal Democratic Republic of Nepal","Loktāntrik Ganatantra Nepāl"],"region":"Asia","subregion":"Southern Asia","population":28431500,"latlng":[28.0,84.0],"demonym":"Nepalese","area":147181.0,"gini":32.8,"timezones":["UTC+05:45"],"borders":["CHN","IND"],"nativeName":"नेपाल","numericCode":"524","currencies":[{"code":"NPR","name":"Nepalese rupee","symbol":"₨"}],"languages":[{"iso639_1":"ne","iso639_2":"nep","name":"Nepali","nativeName":"नेपाली"}],"translations":{"de":"Népal","es":"Nepal","fr":"Népal","ja":"ネパール","it":"Nepal","br":"Nepal","pt":"Nepal","nl":"Nepal","hr":"Nepal","fa":"نپال"},"flag":"https://restcountries.eu/data/npl.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Association for Regional Cooperation","otherAcronyms":[],"otherNames":[]}],"cioc":"NEP"} +{"name":"Netherlands","topLevelDomain":[".nl"],"alpha2Code":"NL","alpha3Code":"NLD","callingCodes":["31"],"capital":"Amsterdam","altSpellings":["NL","Holland","Nederland"],"region":"Europe","subregion":"Western Europe","population":17019800,"latlng":[52.5,5.75],"demonym":"Dutch","area":41850.0,"gini":30.9,"timezones":["UTC-04:00","UTC+01:00"],"borders":["BEL","DEU"],"nativeName":"Nederland","numericCode":"528","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"nl","iso639_2":"nld","name":"Dutch","nativeName":"Nederlands"}],"translations":{"de":"Niederlande","es":"Países Bajos","fr":"Pays-Bas","ja":"オランダ","it":"Paesi Bassi","br":"Holanda","pt":"Países Baixos","nl":"Nederland","hr":"Nizozemska","fa":"پادشاهی هلند"},"flag":"https://restcountries.eu/data/nld.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"NED"} +{"name":"New Caledonia","topLevelDomain":[".nc"],"alpha2Code":"NC","alpha3Code":"NCL","callingCodes":["687"],"capital":"Nouméa","altSpellings":["NC"],"region":"Oceania","subregion":"Melanesia","population":268767,"latlng":[-21.5,165.5],"demonym":"New Caledonian","area":18575.0,"gini":null,"timezones":["UTC+11:00"],"borders":[],"nativeName":"Nouvelle-Calédonie","numericCode":"540","currencies":[{"code":"XPF","name":"CFP franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Neukaledonien","es":"Nueva Caledonia","fr":"Nouvelle-Calédonie","ja":"ニューカレドニア","it":"Nuova Caledonia","br":"Nova Caledônia","pt":"Nova Caledónia","nl":"Nieuw-Caledonië","hr":"Nova Kaledonija","fa":"کالدونیای جدید"},"flag":"https://restcountries.eu/data/ncl.svg","regionalBlocs":[],"cioc":""} +{"name":"New Zealand","topLevelDomain":[".nz"],"alpha2Code":"NZ","alpha3Code":"NZL","callingCodes":["64"],"capital":"Wellington","altSpellings":["NZ","Aotearoa"],"region":"Oceania","subregion":"Australia and New Zealand","population":4697854,"latlng":[-41.0,174.0],"demonym":"New Zealander","area":270467.0,"gini":36.2,"timezones":["UTC-11:00","UTC-10:00","UTC+12:00","UTC+12:45","UTC+13:00"],"borders":[],"nativeName":"New Zealand","numericCode":"554","currencies":[{"code":"NZD","name":"New Zealand dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"mi","iso639_2":"mri","name":"Māori","nativeName":"te reo Māori"}],"translations":{"de":"Neuseeland","es":"Nueva Zelanda","fr":"Nouvelle-Zélande","ja":"ニュージーランド","it":"Nuova Zelanda","br":"Nova Zelândia","pt":"Nova Zelândia","nl":"Nieuw-Zeeland","hr":"Novi Zeland","fa":"نیوزیلند"},"flag":"https://restcountries.eu/data/nzl.svg","regionalBlocs":[],"cioc":"NZL"} +{"name":"Nicaragua","topLevelDomain":[".ni"],"alpha2Code":"NI","alpha3Code":"NIC","callingCodes":["505"],"capital":"Managua","altSpellings":["NI","Republic of Nicaragua","República de Nicaragua"],"region":"Americas","subregion":"Central America","population":6262703,"latlng":[13.0,-85.0],"demonym":"Nicaraguan","area":130373.0,"gini":40.5,"timezones":["UTC-06:00"],"borders":["CRI","HND"],"nativeName":"Nicaragua","numericCode":"558","currencies":[{"code":"NIO","name":"Nicaraguan córdoba","symbol":"C$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Nicaragua","es":"Nicaragua","fr":"Nicaragua","ja":"ニカラグア","it":"Nicaragua","br":"Nicarágua","pt":"Nicarágua","nl":"Nicaragua","hr":"Nikaragva","fa":"نیکاراگوئه"},"flag":"https://restcountries.eu/data/nic.svg","regionalBlocs":[{"acronym":"CAIS","name":"Central American Integration System","otherAcronyms":["SICA"],"otherNames":["Sistema de la Integración Centroamericana,"]}],"cioc":"NCA"} +{"name":"Niger","topLevelDomain":[".ne"],"alpha2Code":"NE","alpha3Code":"NER","callingCodes":["227"],"capital":"Niamey","altSpellings":["NE","Nijar","Republic of Niger","République du Niger"],"region":"Africa","subregion":"Western Africa","population":20715000,"latlng":[16.0,8.0],"demonym":"Nigerien","area":1267000.0,"gini":34.6,"timezones":["UTC+01:00"],"borders":["DZA","BEN","BFA","TCD","LBY","MLI","NGA"],"nativeName":"Niger","numericCode":"562","currencies":[{"code":"XOF","name":"West African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Niger","es":"Níger","fr":"Niger","ja":"ニジェール","it":"Niger","br":"Níger","pt":"Níger","nl":"Niger","hr":"Niger","fa":"نیجر"},"flag":"https://restcountries.eu/data/ner.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"NIG"} +{"name":"Nigeria","topLevelDomain":[".ng"],"alpha2Code":"NG","alpha3Code":"NGA","callingCodes":["234"],"capital":"Abuja","altSpellings":["NG","Nijeriya","Naíjíríà","Federal Republic of Nigeria"],"region":"Africa","subregion":"Western Africa","population":186988000,"latlng":[10.0,8.0],"demonym":"Nigerian","area":923768.0,"gini":48.8,"timezones":["UTC+01:00"],"borders":["BEN","CMR","TCD","NER"],"nativeName":"Nigeria","numericCode":"566","currencies":[{"code":"NGN","name":"Nigerian naira","symbol":"₦"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Nigeria","es":"Nigeria","fr":"Nigéria","ja":"ナイジェリア","it":"Nigeria","br":"Nigéria","pt":"Nigéria","nl":"Nigeria","hr":"Nigerija","fa":"نیجریه"},"flag":"https://restcountries.eu/data/nga.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"NGR"} +{"name":"Niue","topLevelDomain":[".nu"],"alpha2Code":"NU","alpha3Code":"NIU","callingCodes":["683"],"capital":"Alofi","altSpellings":["NU"],"region":"Oceania","subregion":"Polynesia","population":1470,"latlng":[-19.03333333,-169.86666666],"demonym":"Niuean","area":260.0,"gini":null,"timezones":["UTC-11:00"],"borders":[],"nativeName":"Niuē","numericCode":"570","currencies":[{"code":"NZD","name":"New Zealand dollar","symbol":"$"},{"code":"(none)","name":"Niue dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Niue","es":"Niue","fr":"Niue","ja":"ニウエ","it":"Niue","br":"Niue","pt":"Niue","nl":"Niue","hr":"Niue","fa":"نیووی"},"flag":"https://restcountries.eu/data/niu.svg","regionalBlocs":[],"cioc":""} +{"name":"Norfolk Island","topLevelDomain":[".nf"],"alpha2Code":"NF","alpha3Code":"NFK","callingCodes":["672"],"capital":"Kingston","altSpellings":["NF","Territory of Norfolk Island","Teratri of Norf'k Ailen"],"region":"Oceania","subregion":"Australia and New Zealand","population":2302,"latlng":[-29.03333333,167.95],"demonym":"Norfolk Islander","area":36.0,"gini":null,"timezones":["UTC+11:30"],"borders":[],"nativeName":"Norfolk Island","numericCode":"574","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Norfolkinsel","es":"Isla de Norfolk","fr":"Île de Norfolk","ja":"ノーフォーク島","it":"Isola Norfolk","br":"Ilha Norfolk","pt":"Ilha Norfolk","nl":"Norfolkeiland","hr":"Otok Norfolk","fa":"جزیره نورفک"},"flag":"https://restcountries.eu/data/nfk.svg","regionalBlocs":[],"cioc":""} +{"name":"Korea (Democratic People's Republic of)","topLevelDomain":[".kp"],"alpha2Code":"KP","alpha3Code":"PRK","callingCodes":["850"],"capital":"Pyongyang","altSpellings":["KP","Democratic People's Republic of Korea","조선민주주의인민공화국","Chosŏn Minjujuŭi Inmin Konghwaguk"],"region":"Asia","subregion":"Eastern Asia","population":25281000,"latlng":[40.0,127.0],"demonym":"North Korean","area":120538.0,"gini":null,"timezones":["UTC+09:00"],"borders":["CHN","KOR","RUS"],"nativeName":"북한","numericCode":"408","currencies":[{"code":"KPW","name":"North Korean won","symbol":"₩"}],"languages":[{"iso639_1":"ko","iso639_2":"kor","name":"Korean","nativeName":"한국어"}],"translations":{"de":"Nordkorea","es":"Corea del Norte","fr":"Corée du Nord","ja":"朝鮮民主主義人民共和国","it":"Corea del Nord","br":"Coreia do Norte","pt":"Coreia do Norte","nl":"Noord-Korea","hr":"Sjeverna Koreja","fa":"کره جنوبی"},"flag":"https://restcountries.eu/data/prk.svg","regionalBlocs":[],"cioc":"PRK"} +{"name":"Northern Mariana Islands","topLevelDomain":[".mp"],"alpha2Code":"MP","alpha3Code":"MNP","callingCodes":["1670"],"capital":"Saipan","altSpellings":["MP","Commonwealth of the Northern Mariana Islands","Sankattan Siha Na Islas Mariånas"],"region":"Oceania","subregion":"Micronesia","population":56940,"latlng":[15.2,145.75],"demonym":"American","area":464.0,"gini":null,"timezones":["UTC+10:00"],"borders":[],"nativeName":"Northern Mariana Islands","numericCode":"580","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"ch","iso639_2":"cha","name":"Chamorro","nativeName":"Chamoru"}],"translations":{"de":"Nördliche Marianen","es":"Islas Marianas del Norte","fr":"Îles Mariannes du Nord","ja":"北マリアナ諸島","it":"Isole Marianne Settentrionali","br":"Ilhas Marianas","pt":"Ilhas Marianas","nl":"Noordelijke Marianeneilanden","hr":"Sjevernomarijanski otoci","fa":"جزایر ماریانای شمالی"},"flag":"https://restcountries.eu/data/mnp.svg","regionalBlocs":[],"cioc":""} +{"name":"Norway","topLevelDomain":[".no"],"alpha2Code":"NO","alpha3Code":"NOR","callingCodes":["47"],"capital":"Oslo","altSpellings":["NO","Norge","Noreg","Kingdom of Norway","Kongeriket Norge","Kongeriket Noreg"],"region":"Europe","subregion":"Northern Europe","population":5223256,"latlng":[62.0,10.0],"demonym":"Norwegian","area":323802.0,"gini":25.8,"timezones":["UTC+01:00"],"borders":["FIN","SWE","RUS"],"nativeName":"Norge","numericCode":"578","currencies":[{"code":"NOK","name":"Norwegian krone","symbol":"kr"}],"languages":[{"iso639_1":"no","iso639_2":"nor","name":"Norwegian","nativeName":"Norsk"},{"iso639_1":"nb","iso639_2":"nob","name":"Norwegian Bokmål","nativeName":"Norsk bokmål"},{"iso639_1":"nn","iso639_2":"nno","name":"Norwegian Nynorsk","nativeName":"Norsk nynorsk"}],"translations":{"de":"Norwegen","es":"Noruega","fr":"Norvège","ja":"ノルウェー","it":"Norvegia","br":"Noruega","pt":"Noruega","nl":"Noorwegen","hr":"Norveška","fa":"نروژ"},"flag":"https://restcountries.eu/data/nor.svg","regionalBlocs":[{"acronym":"EFTA","name":"European Free Trade Association","otherAcronyms":[],"otherNames":[]}],"cioc":"NOR"} +{"name":"Oman","topLevelDomain":[".om"],"alpha2Code":"OM","alpha3Code":"OMN","callingCodes":["968"],"capital":"Muscat","altSpellings":["OM","Sultanate of Oman","Salṭanat ʻUmān"],"region":"Asia","subregion":"Western Asia","population":4420133,"latlng":[21.0,57.0],"demonym":"Omani","area":309500.0,"gini":null,"timezones":["UTC+04:00"],"borders":["SAU","ARE","YEM"],"nativeName":"عمان","numericCode":"512","currencies":[{"code":"OMR","name":"Omani rial","symbol":"ر.ع."}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Oman","es":"Omán","fr":"Oman","ja":"オマーン","it":"oman","br":"Omã","pt":"Omã","nl":"Oman","hr":"Oman","fa":"عمان"},"flag":"https://restcountries.eu/data/omn.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"OMA"} +{"name":"Pakistan","topLevelDomain":[".pk"],"alpha2Code":"PK","alpha3Code":"PAK","callingCodes":["92"],"capital":"Islamabad","altSpellings":["PK","Pākistān","Islamic Republic of Pakistan","Islāmī Jumhūriya'eh Pākistān"],"region":"Asia","subregion":"Southern Asia","population":194125062,"latlng":[30.0,70.0],"demonym":"Pakistani","area":881912.0,"gini":30.0,"timezones":["UTC+05:00"],"borders":["AFG","CHN","IND","IRN"],"nativeName":"Pakistan","numericCode":"586","currencies":[{"code":"PKR","name":"Pakistani rupee","symbol":"₨"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"ur","iso639_2":"urd","name":"Urdu","nativeName":"اردو"}],"translations":{"de":"Pakistan","es":"Pakistán","fr":"Pakistan","ja":"パキスタン","it":"Pakistan","br":"Paquistão","pt":"Paquistão","nl":"Pakistan","hr":"Pakistan","fa":"پاکستان"},"flag":"https://restcountries.eu/data/pak.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Association for Regional Cooperation","otherAcronyms":[],"otherNames":[]}],"cioc":"PAK"} +{"name":"Palau","topLevelDomain":[".pw"],"alpha2Code":"PW","alpha3Code":"PLW","callingCodes":["680"],"capital":"Ngerulmud","altSpellings":["PW","Republic of Palau","Beluu er a Belau"],"region":"Oceania","subregion":"Micronesia","population":17950,"latlng":[7.5,134.5],"demonym":"Palauan","area":459.0,"gini":null,"timezones":["UTC+09:00"],"borders":[],"nativeName":"Palau","numericCode":"585","currencies":[{"code":"(none)","name":"[E]","symbol":"$"},{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Palau","es":"Palau","fr":"Palaos","ja":"パラオ","it":"Palau","br":"Palau","pt":"Palau","nl":"Palau","hr":"Palau","fa":"پالائو"},"flag":"https://restcountries.eu/data/plw.svg","regionalBlocs":[],"cioc":"PLW"} +{"name":"Palestine, State of","topLevelDomain":[".ps"],"alpha2Code":"PS","alpha3Code":"PSE","callingCodes":["970"],"capital":"Ramallah","altSpellings":["PS","State of Palestine","Dawlat Filasṭin"],"region":"Asia","subregion":"Western Asia","population":4682467,"latlng":[31.9,35.2],"demonym":"Palestinian","area":null,"gini":35.5,"timezones":["UTC+02:00"],"borders":["ISR","EGY","JOR"],"nativeName":"فلسطين","numericCode":"275","currencies":[{"code":"ILS","name":"Israeli new sheqel","symbol":"₪"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Palästina","es":"Palestina","fr":"Palestine","ja":"パレスチナ","it":"Palestina","br":"Palestina","pt":"Palestina","nl":"Palestijnse gebieden","hr":"Palestina","fa":"فلسطین"},"flag":"https://restcountries.eu/data/pse.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"PLE"} +{"name":"Panama","topLevelDomain":[".pa"],"alpha2Code":"PA","alpha3Code":"PAN","callingCodes":["507"],"capital":"Panama City","altSpellings":["PA","Republic of Panama","República de Panamá"],"region":"Americas","subregion":"Central America","population":3814672,"latlng":[9.0,-80.0],"demonym":"Panamanian","area":75417.0,"gini":51.9,"timezones":["UTC-05:00"],"borders":["COL","CRI"],"nativeName":"Panamá","numericCode":"591","currencies":[{"code":"PAB","name":"Panamanian balboa","symbol":"B/."},{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Panama","es":"Panamá","fr":"Panama","ja":"パナマ","it":"Panama","br":"Panamá","pt":"Panamá","nl":"Panama","hr":"Panama","fa":"پاناما"},"flag":"https://restcountries.eu/data/pan.svg","regionalBlocs":[{"acronym":"CAIS","name":"Central American Integration System","otherAcronyms":["SICA"],"otherNames":["Sistema de la Integración Centroamericana,"]}],"cioc":"PAN"} +{"name":"Papua New Guinea","topLevelDomain":[".pg"],"alpha2Code":"PG","alpha3Code":"PNG","callingCodes":["675"],"capital":"Port Moresby","altSpellings":["PG","Independent State of Papua New Guinea","Independen Stet bilong Papua Niugini"],"region":"Oceania","subregion":"Melanesia","population":8083700,"latlng":[-6.0,147.0],"demonym":"Papua New Guinean","area":462840.0,"gini":50.9,"timezones":["UTC+10:00"],"borders":["IDN"],"nativeName":"Papua Niugini","numericCode":"598","currencies":[{"code":"PGK","name":"Papua New Guinean kina","symbol":"K"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Papua-Neuguinea","es":"Papúa Nueva Guinea","fr":"Papouasie-Nouvelle-Guinée","ja":"パプアニューギニア","it":"Papua Nuova Guinea","br":"Papua Nova Guiné","pt":"Papua Nova Guiné","nl":"Papoea-Nieuw-Guinea","hr":"Papua Nova Gvineja","fa":"پاپوآ گینه نو"},"flag":"https://restcountries.eu/data/png.svg","regionalBlocs":[],"cioc":"PNG"} +{"name":"Paraguay","topLevelDomain":[".py"],"alpha2Code":"PY","alpha3Code":"PRY","callingCodes":["595"],"capital":"Asunción","altSpellings":["PY","Republic of Paraguay","República del Paraguay","Tetã Paraguái"],"region":"Americas","subregion":"South America","population":6854536,"latlng":[-23.0,-58.0],"demonym":"Paraguayan","area":406752.0,"gini":52.4,"timezones":["UTC-04:00"],"borders":["ARG","BOL","BRA"],"nativeName":"Paraguay","numericCode":"600","currencies":[{"code":"PYG","name":"Paraguayan guaraní","symbol":"₲"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"},{"iso639_1":"gn","iso639_2":"grn","name":"Guaraní","nativeName":"Avañe'ẽ"}],"translations":{"de":"Paraguay","es":"Paraguay","fr":"Paraguay","ja":"パラグアイ","it":"Paraguay","br":"Paraguai","pt":"Paraguai","nl":"Paraguay","hr":"Paragvaj","fa":"پاراگوئه"},"flag":"https://restcountries.eu/data/pry.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"PAR"} +{"name":"Peru","topLevelDomain":[".pe"],"alpha2Code":"PE","alpha3Code":"PER","callingCodes":["51"],"capital":"Lima","altSpellings":["PE","Republic of Peru"," República del Perú"],"region":"Americas","subregion":"South America","population":31488700,"latlng":[-10.0,-76.0],"demonym":"Peruvian","area":1285216.0,"gini":48.1,"timezones":["UTC-05:00"],"borders":["BOL","BRA","CHL","COL","ECU"],"nativeName":"Perú","numericCode":"604","currencies":[{"code":"PEN","name":"Peruvian sol","symbol":"S/."}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Peru","es":"Perú","fr":"Pérou","ja":"ペルー","it":"Perù","br":"Peru","pt":"Peru","nl":"Peru","hr":"Peru","fa":"پرو"},"flag":"https://restcountries.eu/data/per.svg","regionalBlocs":[{"acronym":"PA","name":"Pacific Alliance","otherAcronyms":[],"otherNames":["Alianza del Pacífico"]},{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"PER"} +{"name":"Philippines","topLevelDomain":[".ph"],"alpha2Code":"PH","alpha3Code":"PHL","callingCodes":["63"],"capital":"Manila","altSpellings":["PH","Republic of the Philippines","Repúblika ng Pilipinas"],"region":"Asia","subregion":"South-Eastern Asia","population":103279800,"latlng":[13.0,122.0],"demonym":"Filipino","area":342353.0,"gini":43.0,"timezones":["UTC+08:00"],"borders":[],"nativeName":"Pilipinas","numericCode":"608","currencies":[{"code":"PHP","name":"Philippine peso","symbol":"₱"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Philippinen","es":"Filipinas","fr":"Philippines","ja":"フィリピン","it":"Filippine","br":"Filipinas","pt":"Filipinas","nl":"Filipijnen","hr":"Filipini","fa":"جزایر الندفیلیپین"},"flag":"https://restcountries.eu/data/phl.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"PHI"} +{"name":"Pitcairn","topLevelDomain":[".pn"],"alpha2Code":"PN","alpha3Code":"PCN","callingCodes":["64"],"capital":"Adamstown","altSpellings":["PN","Pitcairn Henderson Ducie and Oeno Islands"],"region":"Oceania","subregion":"Polynesia","population":56,"latlng":[-25.06666666,-130.1],"demonym":"Pitcairn Islander","area":47.0,"gini":null,"timezones":["UTC-08:00"],"borders":[],"nativeName":"Pitcairn Islands","numericCode":"612","currencies":[{"code":"NZD","name":"New Zealand dollar","symbol":"$"},{"code":null,"name":"Pitcairn Islands dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Pitcairn","es":"Islas Pitcairn","fr":"Îles Pitcairn","ja":"ピトケアン","it":"Isole Pitcairn","br":"Ilhas Pitcairn","pt":"Ilhas Picárnia","nl":"Pitcairneilanden","hr":"Pitcairnovo otočje","fa":"پیتکرن"},"flag":"https://restcountries.eu/data/pcn.svg","regionalBlocs":[],"cioc":""} +{"name":"Poland","topLevelDomain":[".pl"],"alpha2Code":"PL","alpha3Code":"POL","callingCodes":["48"],"capital":"Warsaw","altSpellings":["PL","Republic of Poland","Rzeczpospolita Polska"],"region":"Europe","subregion":"Eastern Europe","population":38437239,"latlng":[52.0,20.0],"demonym":"Polish","area":312679.0,"gini":34.1,"timezones":["UTC+01:00"],"borders":["BLR","CZE","DEU","LTU","RUS","SVK","UKR"],"nativeName":"Polska","numericCode":"616","currencies":[{"code":"PLN","name":"Polish złoty","symbol":"zł"}],"languages":[{"iso639_1":"pl","iso639_2":"pol","name":"Polish","nativeName":"język polski"}],"translations":{"de":"Polen","es":"Polonia","fr":"Pologne","ja":"ポーランド","it":"Polonia","br":"Polônia","pt":"Polónia","nl":"Polen","hr":"Poljska","fa":"لهستان"},"flag":"https://restcountries.eu/data/pol.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"POL"} +{"name":"Portugal","topLevelDomain":[".pt"],"alpha2Code":"PT","alpha3Code":"PRT","callingCodes":["351"],"capital":"Lisbon","altSpellings":["PT","Portuguesa","Portuguese Republic","República Portuguesa"],"region":"Europe","subregion":"Southern Europe","population":10374822,"latlng":[39.5,-8.0],"demonym":"Portuguese","area":92090.0,"gini":38.5,"timezones":["UTC-01:00","UTC"],"borders":["ESP"],"nativeName":"Portugal","numericCode":"620","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"Portugal","es":"Portugal","fr":"Portugal","ja":"ポルトガル","it":"Portogallo","br":"Portugal","pt":"Portugal","nl":"Portugal","hr":"Portugal","fa":"پرتغال"},"flag":"https://restcountries.eu/data/prt.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"POR"} +{"name":"Puerto Rico","topLevelDomain":[".pr"],"alpha2Code":"PR","alpha3Code":"PRI","callingCodes":["1787","1939"],"capital":"San Juan","altSpellings":["PR","Commonwealth of Puerto Rico","Estado Libre Asociado de Puerto Rico"],"region":"Americas","subregion":"Caribbean","population":3474182,"latlng":[18.25,-66.5],"demonym":"Puerto Rican","area":8870.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Puerto Rico","numericCode":"630","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Puerto Rico","es":"Puerto Rico","fr":"Porto Rico","ja":"プエルトリコ","it":"Porto Rico","br":"Porto Rico","pt":"Porto Rico","nl":"Puerto Rico","hr":"Portoriko","fa":"پورتو ریکو"},"flag":"https://restcountries.eu/data/pri.svg","regionalBlocs":[],"cioc":"PUR"} +{"name":"Qatar","topLevelDomain":[".qa"],"alpha2Code":"QA","alpha3Code":"QAT","callingCodes":["974"],"capital":"Doha","altSpellings":["QA","State of Qatar","Dawlat Qaṭar"],"region":"Asia","subregion":"Western Asia","population":2587564,"latlng":[25.5,51.25],"demonym":"Qatari","area":11586.0,"gini":41.1,"timezones":["UTC+03:00"],"borders":["SAU"],"nativeName":"قطر","numericCode":"634","currencies":[{"code":"QAR","name":"Qatari riyal","symbol":"ر.ق"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Katar","es":"Catar","fr":"Qatar","ja":"カタール","it":"Qatar","br":"Catar","pt":"Catar","nl":"Qatar","hr":"Katar","fa":"قطر"},"flag":"https://restcountries.eu/data/qat.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"QAT"} +{"name":"Republic of Kosovo","topLevelDomain":[""],"alpha2Code":"XK","alpha3Code":"KOS","callingCodes":["383"],"capital":"Pristina","altSpellings":["XK","Република Косово"],"region":"Europe","subregion":"Eastern Europe","population":1733842,"latlng":[42.666667,21.166667],"demonym":"Kosovar","area":10908.0,"gini":null,"timezones":["UTC+01:00"],"borders":["ALB","MKD","MNE","SRB"],"nativeName":"Republika e Kosovës","numericCode":null,"currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"sq","iso639_2":"sqi","name":"Albanian","nativeName":"Shqip"},{"iso639_1":"sr","iso639_2":"srp","name":"Serbian","nativeName":"српски језик"}],"translations":{"de":null,"es":"Kosovo","fr":null,"ja":null,"it":null,"br":"Kosovo","pt":"Kosovo","nl":null,"hr":"Kosovo","fa":"کوزوو"},"flag":"https://restcountries.eu/data/kos.svg","regionalBlocs":[{"acronym":"CEFTA","name":"Central European Free Trade Agreement","otherAcronyms":[],"otherNames":[]}],"cioc":null} +{"name":"Réunion","topLevelDomain":[".re"],"alpha2Code":"RE","alpha3Code":"REU","callingCodes":["262"],"capital":"Saint-Denis","altSpellings":["RE","Reunion"],"region":"Africa","subregion":"Eastern Africa","population":840974,"latlng":[-21.15,55.5],"demonym":"French","area":null,"gini":null,"timezones":["UTC+04:00"],"borders":[],"nativeName":"La Réunion","numericCode":"638","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Réunion","es":"Reunión","fr":"Réunion","ja":"レユニオン","it":"Riunione","br":"Reunião","pt":"Reunião","nl":"Réunion","hr":"Réunion","fa":"رئونیون"},"flag":"https://restcountries.eu/data/reu.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":""} +{"name":"Romania","topLevelDomain":[".ro"],"alpha2Code":"RO","alpha3Code":"ROU","callingCodes":["40"],"capital":"Bucharest","altSpellings":["RO","Rumania","Roumania","România"],"region":"Europe","subregion":"Eastern Europe","population":19861408,"latlng":[46.0,25.0],"demonym":"Romanian","area":238391.0,"gini":30.0,"timezones":["UTC+02:00"],"borders":["BGR","HUN","MDA","SRB","UKR"],"nativeName":"România","numericCode":"642","currencies":[{"code":"RON","name":"Romanian leu","symbol":"lei"}],"languages":[{"iso639_1":"ro","iso639_2":"ron","name":"Romanian","nativeName":"Română"}],"translations":{"de":"Rumänien","es":"Rumania","fr":"Roumanie","ja":"ルーマニア","it":"Romania","br":"Romênia","pt":"Roménia","nl":"Roemenië","hr":"Rumunjska","fa":"رومانی"},"flag":"https://restcountries.eu/data/rou.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"ROU"} +{"name":"Russian Federation","topLevelDomain":[".ru"],"alpha2Code":"RU","alpha3Code":"RUS","callingCodes":["7"],"capital":"Moscow","altSpellings":["RU","Rossiya","Russian Federation","Российская Федерация","Rossiyskaya Federatsiya"],"region":"Europe","subregion":"Eastern Europe","population":146599183,"latlng":[60.0,100.0],"demonym":"Russian","area":1.7124442E7,"gini":40.1,"timezones":["UTC+03:00","UTC+04:00","UTC+06:00","UTC+07:00","UTC+08:00","UTC+09:00","UTC+10:00","UTC+11:00","UTC+12:00"],"borders":["AZE","BLR","CHN","EST","FIN","GEO","KAZ","PRK","LVA","LTU","MNG","NOR","POL","UKR"],"nativeName":"Россия","numericCode":"643","currencies":[{"code":"RUB","name":"Russian ruble","symbol":"₽"}],"languages":[{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Russland","es":"Rusia","fr":"Russie","ja":"ロシア連邦","it":"Russia","br":"Rússia","pt":"Rússia","nl":"Rusland","hr":"Rusija","fa":"روسیه"},"flag":"https://restcountries.eu/data/rus.svg","regionalBlocs":[{"acronym":"EEU","name":"Eurasian Economic Union","otherAcronyms":["EAEU"],"otherNames":[]}],"cioc":"RUS"} +{"name":"Rwanda","topLevelDomain":[".rw"],"alpha2Code":"RW","alpha3Code":"RWA","callingCodes":["250"],"capital":"Kigali","altSpellings":["RW","Republic of Rwanda","Repubulika y'u Rwanda","République du Rwanda"],"region":"Africa","subregion":"Eastern Africa","population":11553188,"latlng":[-2.0,30.0],"demonym":"Rwandan","area":26338.0,"gini":50.8,"timezones":["UTC+02:00"],"borders":["BDI","COD","TZA","UGA"],"nativeName":"Rwanda","numericCode":"646","currencies":[{"code":"RWF","name":"Rwandan franc","symbol":"Fr"}],"languages":[{"iso639_1":"rw","iso639_2":"kin","name":"Kinyarwanda","nativeName":"Ikinyarwanda"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Ruanda","es":"Ruanda","fr":"Rwanda","ja":"ルワンダ","it":"Ruanda","br":"Ruanda","pt":"Ruanda","nl":"Rwanda","hr":"Ruanda","fa":"رواندا"},"flag":"https://restcountries.eu/data/rwa.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"RWA"} +{"name":"Saint Barthélemy","topLevelDomain":[".bl"],"alpha2Code":"BL","alpha3Code":"BLM","callingCodes":["590"],"capital":"Gustavia","altSpellings":["BL","St. Barthelemy","Collectivity of Saint Barthélemy","Collectivité de Saint-Barthélemy"],"region":"Americas","subregion":"Caribbean","population":9417,"latlng":[18.5,-63.41666666],"demonym":"Saint Barthélemy Islander","area":21.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Saint-Barthélemy","numericCode":"652","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Saint-Barthélemy","es":"San Bartolomé","fr":"Saint-Barthélemy","ja":"サン・バルテルミー","it":"Antille Francesi","br":"São Bartolomeu","pt":"São Bartolomeu","nl":"Saint Barthélemy","hr":"Saint Barthélemy","fa":"سن-بارتلمی"},"flag":"https://restcountries.eu/data/blm.svg","regionalBlocs":[],"cioc":""} +{"name":"Saint Helena, Ascension and Tristan da Cunha","topLevelDomain":[".sh"],"alpha2Code":"SH","alpha3Code":"SHN","callingCodes":["290"],"capital":"Jamestown","altSpellings":["SH"],"region":"Africa","subregion":"Western Africa","population":4255,"latlng":[-15.95,-5.7],"demonym":"Saint Helenian","area":null,"gini":null,"timezones":["UTC+00:00"],"borders":[],"nativeName":"Saint Helena","numericCode":"654","currencies":[{"code":"SHP","name":"Saint Helena pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Sankt Helena","es":"Santa Helena","fr":"Sainte-Hélène","ja":"セントヘレナ・アセンションおよびトリスタンダクーニャ","it":"Sant'Elena","br":"Santa Helena","pt":"Santa Helena","nl":"Sint-Helena","hr":"Sveta Helena","fa":"سنت هلنا، اسنشن و تریستان دا کونا"},"flag":"https://restcountries.eu/data/shn.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":null} +{"name":"Saint Kitts and Nevis","topLevelDomain":[".kn"],"alpha2Code":"KN","alpha3Code":"KNA","callingCodes":["1869"],"capital":"Basseterre","altSpellings":["KN","Federation of Saint Christopher and Nevis"],"region":"Americas","subregion":"Caribbean","population":46204,"latlng":[17.33333333,-62.75],"demonym":"Kittian and Nevisian","area":261.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Saint Kitts and Nevis","numericCode":"659","currencies":[{"code":"XCD","name":"East Caribbean dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"St. Kitts und Nevis","es":"San Cristóbal y Nieves","fr":"Saint-Christophe-et-Niévès","ja":"セントクリストファー・ネイビス","it":"Saint Kitts e Nevis","br":"São Cristóvão e Neves","pt":"São Cristóvão e Neves","nl":"Saint Kitts en Nevis","hr":"Sveti Kristof i Nevis","fa":"سنت کیتس و نویس"},"flag":"https://restcountries.eu/data/kna.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"SKN"} +{"name":"Saint Lucia","topLevelDomain":[".lc"],"alpha2Code":"LC","alpha3Code":"LCA","callingCodes":["1758"],"capital":"Castries","altSpellings":["LC"],"region":"Americas","subregion":"Caribbean","population":186000,"latlng":[13.88333333,-60.96666666],"demonym":"Saint Lucian","area":616.0,"gini":42.6,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Saint Lucia","numericCode":"662","currencies":[{"code":"XCD","name":"East Caribbean dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Saint Lucia","es":"Santa Lucía","fr":"Saint-Lucie","ja":"セントルシア","it":"Santa Lucia","br":"Santa Lúcia","pt":"Santa Lúcia","nl":"Saint Lucia","hr":"Sveta Lucija","fa":"سنت لوسیا"},"flag":"https://restcountries.eu/data/lca.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"LCA"} +{"name":"Saint Martin (French part)","topLevelDomain":[".mf",".fr",".gp"],"alpha2Code":"MF","alpha3Code":"MAF","callingCodes":["590"],"capital":"Marigot","altSpellings":["MF","Collectivity of Saint Martin","Collectivité de Saint-Martin"],"region":"Americas","subregion":"Caribbean","population":36979,"latlng":[18.08333333,-63.95],"demonym":"Saint Martin Islander","area":53.0,"gini":null,"timezones":["UTC-04:00"],"borders":["SXM","NLD"],"nativeName":"Saint-Martin","numericCode":"663","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"nl","iso639_2":"nld","name":"Dutch","nativeName":"Nederlands"}],"translations":{"de":"Saint Martin","es":"Saint Martin","fr":"Saint-Martin","ja":"サン・マルタン(フランス領)","it":"Saint Martin","br":"Saint Martin","pt":"Ilha São Martinho","nl":"Saint-Martin","hr":"Sveti Martin","fa":"سینت مارتن"},"flag":"https://restcountries.eu/data/maf.svg","regionalBlocs":[],"cioc":""} +{"name":"Saint Pierre and Miquelon","topLevelDomain":[".pm"],"alpha2Code":"PM","alpha3Code":"SPM","callingCodes":["508"],"capital":"Saint-Pierre","altSpellings":["PM","Collectivité territoriale de Saint-Pierre-et-Miquelon"],"region":"Americas","subregion":"Northern America","population":6069,"latlng":[46.83333333,-56.33333333],"demonym":"French","area":242.0,"gini":null,"timezones":["UTC-03:00"],"borders":[],"nativeName":"Saint-Pierre-et-Miquelon","numericCode":"666","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Saint-Pierre und Miquelon","es":"San Pedro y Miquelón","fr":"Saint-Pierre-et-Miquelon","ja":"サンピエール島・ミクロン島","it":"Saint-Pierre e Miquelon","br":"Saint-Pierre e Miquelon","pt":"São Pedro e Miquelon","nl":"Saint Pierre en Miquelon","hr":"Sveti Petar i Mikelon","fa":"سن پیر و میکلن"},"flag":"https://restcountries.eu/data/spm.svg","regionalBlocs":[],"cioc":""} +{"name":"Saint Vincent and the Grenadines","topLevelDomain":[".vc"],"alpha2Code":"VC","alpha3Code":"VCT","callingCodes":["1784"],"capital":"Kingstown","altSpellings":["VC"],"region":"Americas","subregion":"Caribbean","population":109991,"latlng":[13.25,-61.2],"demonym":"Saint Vincentian","area":389.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Saint Vincent and the Grenadines","numericCode":"670","currencies":[{"code":"XCD","name":"East Caribbean dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Saint Vincent und die Grenadinen","es":"San Vicente y Granadinas","fr":"Saint-Vincent-et-les-Grenadines","ja":"セントビンセントおよびグレナディーン諸島","it":"Saint Vincent e Grenadine","br":"São Vicente e Granadinas","pt":"São Vicente e Granadinas","nl":"Saint Vincent en de Grenadines","hr":"Sveti Vincent i Grenadini","fa":"سنت وینسنت و گرنادین‌ها"},"flag":"https://restcountries.eu/data/vct.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"VIN"} +{"name":"Samoa","topLevelDomain":[".ws"],"alpha2Code":"WS","alpha3Code":"WSM","callingCodes":["685"],"capital":"Apia","altSpellings":["WS","Independent State of Samoa","Malo Saʻoloto Tutoʻatasi o Sāmoa"],"region":"Oceania","subregion":"Polynesia","population":194899,"latlng":[-13.58333333,-172.33333333],"demonym":"Samoan","area":2842.0,"gini":null,"timezones":["UTC+13:00"],"borders":[],"nativeName":"Samoa","numericCode":"882","currencies":[{"code":"WST","name":"Samoan tālā","symbol":"T"}],"languages":[{"iso639_1":"sm","iso639_2":"smo","name":"Samoan","nativeName":"gagana fa'a Samoa"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Samoa","es":"Samoa","fr":"Samoa","ja":"サモア","it":"Samoa","br":"Samoa","pt":"Samoa","nl":"Samoa","hr":"Samoa","fa":"ساموآ"},"flag":"https://restcountries.eu/data/wsm.svg","regionalBlocs":[],"cioc":"SAM"} +{"name":"San Marino","topLevelDomain":[".sm"],"alpha2Code":"SM","alpha3Code":"SMR","callingCodes":["378"],"capital":"City of San Marino","altSpellings":["SM","Republic of San Marino","Repubblica di San Marino"],"region":"Europe","subregion":"Southern Europe","population":33005,"latlng":[43.76666666,12.41666666],"demonym":"Sammarinese","area":61.0,"gini":null,"timezones":["UTC+01:00"],"borders":["ITA"],"nativeName":"San Marino","numericCode":"674","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"it","iso639_2":"ita","name":"Italian","nativeName":"Italiano"}],"translations":{"de":"San Marino","es":"San Marino","fr":"Saint-Marin","ja":"サンマリノ","it":"San Marino","br":"San Marino","pt":"São Marinho","nl":"San Marino","hr":"San Marino","fa":"سان مارینو"},"flag":"https://restcountries.eu/data/smr.svg","regionalBlocs":[],"cioc":"SMR"} +{"name":"Sao Tome and Principe","topLevelDomain":[".st"],"alpha2Code":"ST","alpha3Code":"STP","callingCodes":["239"],"capital":"São Tomé","altSpellings":["ST","Democratic Republic of São Tomé and Príncipe","República Democrática de São Tomé e Príncipe"],"region":"Africa","subregion":"Middle Africa","population":187356,"latlng":[1.0,7.0],"demonym":"Sao Tomean","area":964.0,"gini":50.8,"timezones":["UTC"],"borders":[],"nativeName":"São Tomé e Príncipe","numericCode":"678","currencies":[{"code":"STD","name":"São Tomé and Príncipe dobra","symbol":"Db"}],"languages":[{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"São Tomé und Príncipe","es":"Santo Tomé y Príncipe","fr":"Sao Tomé-et-Principe","ja":"サントメ・プリンシペ","it":"São Tomé e Príncipe","br":"São Tomé e Príncipe","pt":"São Tomé e Príncipe","nl":"Sao Tomé en Principe","hr":"Sveti Toma i Princip","fa":"کواترو دو فرویرو"},"flag":"https://restcountries.eu/data/stp.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"STP"} +{"name":"Saudi Arabia","topLevelDomain":[".sa"],"alpha2Code":"SA","alpha3Code":"SAU","callingCodes":["966"],"capital":"Riyadh","altSpellings":["SA","Kingdom of Saudi Arabia","Al-Mamlakah al-‘Arabiyyah as-Su‘ūdiyyah"],"region":"Asia","subregion":"Western Asia","population":32248200,"latlng":[25.0,45.0],"demonym":"Saudi Arabian","area":2149690.0,"gini":null,"timezones":["UTC+03:00"],"borders":["IRQ","JOR","KWT","OMN","QAT","ARE","YEM"],"nativeName":"العربية السعودية","numericCode":"682","currencies":[{"code":"SAR","name":"Saudi riyal","symbol":"ر.س"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Saudi-Arabien","es":"Arabia Saudí","fr":"Arabie Saoudite","ja":"サウジアラビア","it":"Arabia Saudita","br":"Arábia Saudita","pt":"Arábia Saudita","nl":"Saoedi-Arabië","hr":"Saudijska Arabija","fa":"عربستان سعودی"},"flag":"https://restcountries.eu/data/sau.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"KSA"} +{"name":"Senegal","topLevelDomain":[".sn"],"alpha2Code":"SN","alpha3Code":"SEN","callingCodes":["221"],"capital":"Dakar","altSpellings":["SN","Republic of Senegal","République du Sénégal"],"region":"Africa","subregion":"Western Africa","population":14799859,"latlng":[14.0,-14.0],"demonym":"Senegalese","area":196722.0,"gini":39.2,"timezones":["UTC"],"borders":["GMB","GIN","GNB","MLI","MRT"],"nativeName":"Sénégal","numericCode":"686","currencies":[{"code":"XOF","name":"West African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Senegal","es":"Senegal","fr":"Sénégal","ja":"セネガル","it":"Senegal","br":"Senegal","pt":"Senegal","nl":"Senegal","hr":"Senegal","fa":"سنگال"},"flag":"https://restcountries.eu/data/sen.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"SEN"} +{"name":"Serbia","topLevelDomain":[".rs"],"alpha2Code":"RS","alpha3Code":"SRB","callingCodes":["381"],"capital":"Belgrade","altSpellings":["RS","Srbija","Republic of Serbia","Република Србија","Republika Srbija"],"region":"Europe","subregion":"Southern Europe","population":7076372,"latlng":[44.0,21.0],"demonym":"Serbian","area":88361.0,"gini":27.8,"timezones":["UTC+01:00"],"borders":["BIH","BGR","HRV","HUN","KOS","MKD","MNE","ROU"],"nativeName":"Србија","numericCode":"688","currencies":[{"code":"RSD","name":"Serbian dinar","symbol":"дин."}],"languages":[{"iso639_1":"sr","iso639_2":"srp","name":"Serbian","nativeName":"српски језик"}],"translations":{"de":"Serbien","es":"Serbia","fr":"Serbie","ja":"セルビア","it":"Serbia","br":"Sérvia","pt":"Sérvia","nl":"Servië","hr":"Srbija","fa":"صربستان"},"flag":"https://restcountries.eu/data/srb.svg","regionalBlocs":[{"acronym":"CEFTA","name":"Central European Free Trade Agreement","otherAcronyms":[],"otherNames":[]}],"cioc":"SRB"} +{"name":"Seychelles","topLevelDomain":[".sc"],"alpha2Code":"SC","alpha3Code":"SYC","callingCodes":["248"],"capital":"Victoria","altSpellings":["SC","Republic of Seychelles","Repiblik Sesel","République des Seychelles"],"region":"Africa","subregion":"Eastern Africa","population":91400,"latlng":[-4.58333333,55.66666666],"demonym":"Seychellois","area":452.0,"gini":65.8,"timezones":["UTC+04:00"],"borders":[],"nativeName":"Seychelles","numericCode":"690","currencies":[{"code":"SCR","name":"Seychellois rupee","symbol":"₨"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Seychellen","es":"Seychelles","fr":"Seychelles","ja":"セーシェル","it":"Seychelles","br":"Seicheles","pt":"Seicheles","nl":"Seychellen","hr":"Sejšeli","fa":"سیشل"},"flag":"https://restcountries.eu/data/syc.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"SEY"} +{"name":"Sierra Leone","topLevelDomain":[".sl"],"alpha2Code":"SL","alpha3Code":"SLE","callingCodes":["232"],"capital":"Freetown","altSpellings":["SL","Republic of Sierra Leone"],"region":"Africa","subregion":"Western Africa","population":7075641,"latlng":[8.5,-11.5],"demonym":"Sierra Leonean","area":71740.0,"gini":42.5,"timezones":["UTC"],"borders":["GIN","LBR"],"nativeName":"Sierra Leone","numericCode":"694","currencies":[{"code":"SLL","name":"Sierra Leonean leone","symbol":"Le"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Sierra Leone","es":"Sierra Leone","fr":"Sierra Leone","ja":"シエラレオネ","it":"Sierra Leone","br":"Serra Leoa","pt":"Serra Leoa","nl":"Sierra Leone","hr":"Sijera Leone","fa":"سیرالئون"},"flag":"https://restcountries.eu/data/sle.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"SLE"} +{"name":"Singapore","topLevelDomain":[".sg"],"alpha2Code":"SG","alpha3Code":"SGP","callingCodes":["65"],"capital":"Singapore","altSpellings":["SG","Singapura","Republik Singapura","新加坡共和国"],"region":"Asia","subregion":"South-Eastern Asia","population":5535000,"latlng":[1.36666666,103.8],"demonym":"Singaporean","area":710.0,"gini":48.1,"timezones":["UTC+08:00"],"borders":[],"nativeName":"Singapore","numericCode":"702","currencies":[{"code":"BND","name":"Brunei dollar","symbol":"$"},{"code":"SGD","name":"Singapore dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"ms","iso639_2":"msa","name":"Malay","nativeName":"bahasa Melayu"},{"iso639_1":"ta","iso639_2":"tam","name":"Tamil","nativeName":"தமிழ்"},{"iso639_1":"zh","iso639_2":"zho","name":"Chinese","nativeName":"中文 (Zhōngwén)"}],"translations":{"de":"Singapur","es":"Singapur","fr":"Singapour","ja":"シンガポール","it":"Singapore","br":"Singapura","pt":"Singapura","nl":"Singapore","hr":"Singapur","fa":"سنگاپور"},"flag":"https://restcountries.eu/data/sgp.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"SIN"} +{"name":"Sint Maarten (Dutch part)","topLevelDomain":[".sx"],"alpha2Code":"SX","alpha3Code":"SXM","callingCodes":["1721"],"capital":"Philipsburg","altSpellings":["SX"],"region":"Americas","subregion":"Caribbean","population":38247,"latlng":[18.033333,-63.05],"demonym":"Dutch","area":34.0,"gini":null,"timezones":["UTC-04:00"],"borders":["MAF"],"nativeName":"Sint Maarten","numericCode":"534","currencies":[{"code":"ANG","name":"Netherlands Antillean guilder","symbol":"ƒ"}],"languages":[{"iso639_1":"nl","iso639_2":"nld","name":"Dutch","nativeName":"Nederlands"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Sint Maarten (niederl. Teil)","es":null,"fr":"Saint Martin (partie néerlandaise)","ja":null,"it":"Saint Martin (parte olandese)","br":"Sint Maarten","pt":"São Martinho","nl":"Sint Maarten","hr":null,"fa":"سینت مارتن"},"flag":"https://restcountries.eu/data/sxm.svg","regionalBlocs":[],"cioc":""} +{"name":"Slovakia","topLevelDomain":[".sk"],"alpha2Code":"SK","alpha3Code":"SVK","callingCodes":["421"],"capital":"Bratislava","altSpellings":["SK","Slovak Republic","Slovenská republika"],"region":"Europe","subregion":"Eastern Europe","population":5426252,"latlng":[48.66666666,19.5],"demonym":"Slovak","area":49037.0,"gini":26.0,"timezones":["UTC+01:00"],"borders":["AUT","CZE","HUN","POL","UKR"],"nativeName":"Slovensko","numericCode":"703","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"sk","iso639_2":"slk","name":"Slovak","nativeName":"slovenčina"}],"translations":{"de":"Slowakei","es":"República Eslovaca","fr":"Slovaquie","ja":"スロバキア","it":"Slovacchia","br":"Eslováquia","pt":"Eslováquia","nl":"Slowakije","hr":"Slovačka","fa":"اسلواکی"},"flag":"https://restcountries.eu/data/svk.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"SVK"} +{"name":"Slovenia","topLevelDomain":[".si"],"alpha2Code":"SI","alpha3Code":"SVN","callingCodes":["386"],"capital":"Ljubljana","altSpellings":["SI","Republic of Slovenia","Republika Slovenija"],"region":"Europe","subregion":"Southern Europe","population":2064188,"latlng":[46.11666666,14.81666666],"demonym":"Slovene","area":20273.0,"gini":31.2,"timezones":["UTC+01:00"],"borders":["AUT","HRV","ITA","HUN"],"nativeName":"Slovenija","numericCode":"705","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"sl","iso639_2":"slv","name":"Slovene","nativeName":"slovenski jezik"}],"translations":{"de":"Slowenien","es":"Eslovenia","fr":"Slovénie","ja":"スロベニア","it":"Slovenia","br":"Eslovênia","pt":"Eslovénia","nl":"Slovenië","hr":"Slovenija","fa":"اسلوونی"},"flag":"https://restcountries.eu/data/svn.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"SLO"} +{"name":"Solomon Islands","topLevelDomain":[".sb"],"alpha2Code":"SB","alpha3Code":"SLB","callingCodes":["677"],"capital":"Honiara","altSpellings":["SB"],"region":"Oceania","subregion":"Melanesia","population":642000,"latlng":[-8.0,159.0],"demonym":"Solomon Islander","area":28896.0,"gini":null,"timezones":["UTC+11:00"],"borders":[],"nativeName":"Solomon Islands","numericCode":"090","currencies":[{"code":"SBD","name":"Solomon Islands dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Salomonen","es":"Islas Salomón","fr":"Îles Salomon","ja":"ソロモン諸島","it":"Isole Salomone","br":"Ilhas Salomão","pt":"Ilhas Salomão","nl":"Salomonseilanden","hr":"Solomonski Otoci","fa":"جزایر سلیمان"},"flag":"https://restcountries.eu/data/slb.svg","regionalBlocs":[],"cioc":"SOL"} +{"name":"Somalia","topLevelDomain":[".so"],"alpha2Code":"SO","alpha3Code":"SOM","callingCodes":["252"],"capital":"Mogadishu","altSpellings":["SO","aṣ-Ṣūmāl","Federal Republic of Somalia","Jamhuuriyadda Federaalka Soomaaliya","Jumhūriyyat aṣ-Ṣūmāl al-Fiderāliyya"],"region":"Africa","subregion":"Eastern Africa","population":11079000,"latlng":[10.0,49.0],"demonym":"Somali","area":637657.0,"gini":null,"timezones":["UTC+03:00"],"borders":["DJI","ETH","KEN"],"nativeName":"Soomaaliya","numericCode":"706","currencies":[{"code":"SOS","name":"Somali shilling","symbol":"Sh"}],"languages":[{"iso639_1":"so","iso639_2":"som","name":"Somali","nativeName":"Soomaaliga"},{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Somalia","es":"Somalia","fr":"Somalie","ja":"ソマリア","it":"Somalia","br":"Somália","pt":"Somália","nl":"Somalië","hr":"Somalija","fa":"سومالی"},"flag":"https://restcountries.eu/data/som.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"SOM"} +{"name":"South Africa","topLevelDomain":[".za"],"alpha2Code":"ZA","alpha3Code":"ZAF","callingCodes":["27"],"capital":"Pretoria","altSpellings":["ZA","RSA","Suid-Afrika","Republic of South Africa"],"region":"Africa","subregion":"Southern Africa","population":55653654,"latlng":[-29.0,24.0],"demonym":"South African","area":1221037.0,"gini":63.1,"timezones":["UTC+02:00"],"borders":["BWA","LSO","MOZ","NAM","SWZ","ZWE"],"nativeName":"South Africa","numericCode":"710","currencies":[{"code":"ZAR","name":"South African rand","symbol":"R"}],"languages":[{"iso639_1":"af","iso639_2":"afr","name":"Afrikaans","nativeName":"Afrikaans"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"nr","iso639_2":"nbl","name":"Southern Ndebele","nativeName":"isiNdebele"},{"iso639_1":"st","iso639_2":"sot","name":"Southern Sotho","nativeName":"Sesotho"},{"iso639_1":"ss","iso639_2":"ssw","name":"Swati","nativeName":"SiSwati"},{"iso639_1":"tn","iso639_2":"tsn","name":"Tswana","nativeName":"Setswana"},{"iso639_1":"ts","iso639_2":"tso","name":"Tsonga","nativeName":"Xitsonga"},{"iso639_1":"ve","iso639_2":"ven","name":"Venda","nativeName":"Tshivenḓa"},{"iso639_1":"xh","iso639_2":"xho","name":"Xhosa","nativeName":"isiXhosa"},{"iso639_1":"zu","iso639_2":"zul","name":"Zulu","nativeName":"isiZulu"}],"translations":{"de":"Republik Südafrika","es":"República de Sudáfrica","fr":"Afrique du Sud","ja":"南アフリカ","it":"Sud Africa","br":"República Sul-Africana","pt":"República Sul-Africana","nl":"Zuid-Afrika","hr":"Južnoafrička Republika","fa":"آفریقای جنوبی"},"flag":"https://restcountries.eu/data/zaf.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"RSA"} +{"name":"South Georgia and the South Sandwich Islands","topLevelDomain":[".gs"],"alpha2Code":"GS","alpha3Code":"SGS","callingCodes":["500"],"capital":"King Edward Point","altSpellings":["GS","South Georgia and the South Sandwich Islands"],"region":"Americas","subregion":"South America","population":30,"latlng":[-54.5,-37.0],"demonym":"South Georgia and the South Sandwich Islander","area":null,"gini":null,"timezones":["UTC-02:00"],"borders":[],"nativeName":"South Georgia","numericCode":"239","currencies":[{"code":"GBP","name":"British pound","symbol":"£"},{"code":"(none)","name":null,"symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Südgeorgien und die Südlichen Sandwichinseln","es":"Islas Georgias del Sur y Sandwich del Sur","fr":"Géorgie du Sud-et-les Îles Sandwich du Sud","ja":"サウスジョージア・サウスサンドウィッチ諸島","it":"Georgia del Sud e Isole Sandwich Meridionali","br":"Ilhas Geórgias do Sul e Sandwich do Sul","pt":"Ilhas Geórgia do Sul e Sanduíche do Sul","nl":"Zuid-Georgia en Zuidelijke Sandwicheilanden","hr":"Južna Georgija i otočje Južni Sandwich","fa":"جزایر جورجیای جنوبی و ساندویچ جنوبی"},"flag":"https://restcountries.eu/data/sgs.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":""} +{"name":"Korea (Republic of)","topLevelDomain":[".kr"],"alpha2Code":"KR","alpha3Code":"KOR","callingCodes":["82"],"capital":"Seoul","altSpellings":["KR","Republic of Korea"],"region":"Asia","subregion":"Eastern Asia","population":50801405,"latlng":[37.0,127.5],"demonym":"South Korean","area":100210.0,"gini":31.3,"timezones":["UTC+09:00"],"borders":["PRK"],"nativeName":"대한민국","numericCode":"410","currencies":[{"code":"KRW","name":"South Korean won","symbol":"₩"}],"languages":[{"iso639_1":"ko","iso639_2":"kor","name":"Korean","nativeName":"한국어"}],"translations":{"de":"Südkorea","es":"Corea del Sur","fr":"Corée du Sud","ja":"大韓民国","it":"Corea del Sud","br":"Coreia do Sul","pt":"Coreia do Sul","nl":"Zuid-Korea","hr":"Južna Koreja","fa":"کره شمالی"},"flag":"https://restcountries.eu/data/kor.svg","regionalBlocs":[],"cioc":"KOR"} +{"name":"South Sudan","topLevelDomain":[".ss"],"alpha2Code":"SS","alpha3Code":"SSD","callingCodes":["211"],"capital":"Juba","altSpellings":["SS"],"region":"Africa","subregion":"Middle Africa","population":12131000,"latlng":[7.0,30.0],"demonym":"South Sudanese","area":619745.0,"gini":45.5,"timezones":["UTC+03:00"],"borders":["CAF","COD","ETH","KEN","SDN","UGA"],"nativeName":"South Sudan","numericCode":"728","currencies":[{"code":"SSP","name":"South Sudanese pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Südsudan","es":"Sudán del Sur","fr":"Soudan du Sud","ja":"南スーダン","it":"Sudan del sud","br":"Sudão do Sul","pt":"Sudão do Sul","nl":"Zuid-Soedan","hr":"Južni Sudan","fa":"سودان جنوبی"},"flag":"https://restcountries.eu/data/ssd.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":""} +{"name":"Spain","topLevelDomain":[".es"],"alpha2Code":"ES","alpha3Code":"ESP","callingCodes":["34"],"capital":"Madrid","altSpellings":["ES","Kingdom of Spain","Reino de España"],"region":"Europe","subregion":"Southern Europe","population":46438422,"latlng":[40.0,-4.0],"demonym":"Spanish","area":505992.0,"gini":34.7,"timezones":["UTC","UTC+01:00"],"borders":["AND","FRA","GIB","PRT","MAR"],"nativeName":"España","numericCode":"724","currencies":[{"code":"EUR","name":"Euro","symbol":"€"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Spanien","es":"España","fr":"Espagne","ja":"スペイン","it":"Spagna","br":"Espanha","pt":"Espanha","nl":"Spanje","hr":"Španjolska","fa":"اسپانیا"},"flag":"https://restcountries.eu/data/esp.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"ESP"} +{"name":"Sri Lanka","topLevelDomain":[".lk"],"alpha2Code":"LK","alpha3Code":"LKA","callingCodes":["94"],"capital":"Colombo","altSpellings":["LK","ilaṅkai","Democratic Socialist Republic of Sri Lanka"],"region":"Asia","subregion":"Southern Asia","population":20966000,"latlng":[7.0,81.0],"demonym":"Sri Lankan","area":65610.0,"gini":40.3,"timezones":["UTC+05:30"],"borders":["IND"],"nativeName":"śrī laṃkāva","numericCode":"144","currencies":[{"code":"LKR","name":"Sri Lankan rupee","symbol":"Rs"}],"languages":[{"iso639_1":"si","iso639_2":"sin","name":"Sinhalese","nativeName":"සිංහල"},{"iso639_1":"ta","iso639_2":"tam","name":"Tamil","nativeName":"தமிழ்"}],"translations":{"de":"Sri Lanka","es":"Sri Lanka","fr":"Sri Lanka","ja":"スリランカ","it":"Sri Lanka","br":"Sri Lanka","pt":"Sri Lanka","nl":"Sri Lanka","hr":"Šri Lanka","fa":"سری‌لانکا"},"flag":"https://restcountries.eu/data/lka.svg","regionalBlocs":[{"acronym":"SAARC","name":"South Asian Association for Regional Cooperation","otherAcronyms":[],"otherNames":[]}],"cioc":"SRI"} +{"name":"Sudan","topLevelDomain":[".sd"],"alpha2Code":"SD","alpha3Code":"SDN","callingCodes":["249"],"capital":"Khartoum","altSpellings":["SD","Republic of the Sudan","Jumhūrīyat as-Sūdān"],"region":"Africa","subregion":"Northern Africa","population":39598700,"latlng":[15.0,30.0],"demonym":"Sudanese","area":1886068.0,"gini":35.3,"timezones":["UTC+03:00"],"borders":["CAF","TCD","EGY","ERI","ETH","LBY","SSD"],"nativeName":"السودان","numericCode":"729","currencies":[{"code":"SDG","name":"Sudanese pound","symbol":"ج.س."}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Sudan","es":"Sudán","fr":"Soudan","ja":"スーダン","it":"Sudan","br":"Sudão","pt":"Sudão","nl":"Soedan","hr":"Sudan","fa":"سودان"},"flag":"https://restcountries.eu/data/sdn.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"SUD"} +{"name":"Suriname","topLevelDomain":[".sr"],"alpha2Code":"SR","alpha3Code":"SUR","callingCodes":["597"],"capital":"Paramaribo","altSpellings":["SR","Sarnam","Sranangron","Republic of Suriname","Republiek Suriname"],"region":"Americas","subregion":"South America","population":541638,"latlng":[4.0,-56.0],"demonym":"Surinamer","area":163820.0,"gini":52.9,"timezones":["UTC-03:00"],"borders":["BRA","GUF","FRA","GUY"],"nativeName":"Suriname","numericCode":"740","currencies":[{"code":"SRD","name":"Surinamese dollar","symbol":"$"}],"languages":[{"iso639_1":"nl","iso639_2":"nld","name":"Dutch","nativeName":"Nederlands"}],"translations":{"de":"Suriname","es":"Surinam","fr":"Surinam","ja":"スリナム","it":"Suriname","br":"Suriname","pt":"Suriname","nl":"Suriname","hr":"Surinam","fa":"سورینام"},"flag":"https://restcountries.eu/data/sur.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]},{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"SUR"} +{"name":"Svalbard and Jan Mayen","topLevelDomain":[".sj"],"alpha2Code":"SJ","alpha3Code":"SJM","callingCodes":["4779"],"capital":"Longyearbyen","altSpellings":["SJ","Svalbard and Jan Mayen Islands"],"region":"Europe","subregion":"Northern Europe","population":2562,"latlng":[78.0,20.0],"demonym":"Norwegian","area":null,"gini":null,"timezones":["UTC+01:00"],"borders":[],"nativeName":"Svalbard og Jan Mayen","numericCode":"744","currencies":[{"code":"NOK","name":"Norwegian krone","symbol":"kr"}],"languages":[{"iso639_1":"no","iso639_2":"nor","name":"Norwegian","nativeName":"Norsk"}],"translations":{"de":"Svalbard und Jan Mayen","es":"Islas Svalbard y Jan Mayen","fr":"Svalbard et Jan Mayen","ja":"スヴァールバル諸島およびヤンマイエン島","it":"Svalbard e Jan Mayen","br":"Svalbard","pt":"Svalbard","nl":"Svalbard en Jan Mayen","hr":"Svalbard i Jan Mayen","fa":"سوالبارد و یان ماین"},"flag":"https://restcountries.eu/data/sjm.svg","regionalBlocs":[],"cioc":""} +{"name":"Swaziland","topLevelDomain":[".sz"],"alpha2Code":"SZ","alpha3Code":"SWZ","callingCodes":["268"],"capital":"Lobamba","altSpellings":["SZ","weSwatini","Swatini","Ngwane","Kingdom of Swaziland","Umbuso waseSwatini"],"region":"Africa","subregion":"Southern Africa","population":1132657,"latlng":[-26.5,31.5],"demonym":"Swazi","area":17364.0,"gini":51.5,"timezones":["UTC+02:00"],"borders":["MOZ","ZAF"],"nativeName":"Swaziland","numericCode":"748","currencies":[{"code":"SZL","name":"Swazi lilangeni","symbol":"L"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"ss","iso639_2":"ssw","name":"Swati","nativeName":"SiSwati"}],"translations":{"de":"Swasiland","es":"Suazilandia","fr":"Swaziland","ja":"スワジランド","it":"Swaziland","br":"Suazilândia","pt":"Suazilândia","nl":"Swaziland","hr":"Svazi","fa":"سوازیلند"},"flag":"https://restcountries.eu/data/swz.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"SWZ"} +{"name":"Sweden","topLevelDomain":[".se"],"alpha2Code":"SE","alpha3Code":"SWE","callingCodes":["46"],"capital":"Stockholm","altSpellings":["SE","Kingdom of Sweden","Konungariket Sverige"],"region":"Europe","subregion":"Northern Europe","population":9894888,"latlng":[62.0,15.0],"demonym":"Swedish","area":450295.0,"gini":25.0,"timezones":["UTC+01:00"],"borders":["FIN","NOR"],"nativeName":"Sverige","numericCode":"752","currencies":[{"code":"SEK","name":"Swedish krona","symbol":"kr"}],"languages":[{"iso639_1":"sv","iso639_2":"swe","name":"Swedish","nativeName":"svenska"}],"translations":{"de":"Schweden","es":"Suecia","fr":"Suède","ja":"スウェーデン","it":"Svezia","br":"Suécia","pt":"Suécia","nl":"Zweden","hr":"Švedska","fa":"سوئد"},"flag":"https://restcountries.eu/data/swe.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"SWE"} +{"name":"Switzerland","topLevelDomain":[".ch"],"alpha2Code":"CH","alpha3Code":"CHE","callingCodes":["41"],"capital":"Bern","altSpellings":["CH","Swiss Confederation","Schweiz","Suisse","Svizzera","Svizra"],"region":"Europe","subregion":"Western Europe","population":8341600,"latlng":[47.0,8.0],"demonym":"Swiss","area":41284.0,"gini":33.7,"timezones":["UTC+01:00"],"borders":["AUT","FRA","ITA","LIE","DEU"],"nativeName":"Schweiz","numericCode":"756","currencies":[{"code":"CHF","name":"Swiss franc","symbol":"Fr"}],"languages":[{"iso639_1":"de","iso639_2":"deu","name":"German","nativeName":"Deutsch"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"},{"iso639_1":"it","iso639_2":"ita","name":"Italian","nativeName":"Italiano"}],"translations":{"de":"Schweiz","es":"Suiza","fr":"Suisse","ja":"スイス","it":"Svizzera","br":"Suíça","pt":"Suíça","nl":"Zwitserland","hr":"Švicarska","fa":"سوئیس"},"flag":"https://restcountries.eu/data/che.svg","regionalBlocs":[{"acronym":"EFTA","name":"European Free Trade Association","otherAcronyms":[],"otherNames":[]}],"cioc":"SUI"} +{"name":"Syrian Arab Republic","topLevelDomain":[".sy"],"alpha2Code":"SY","alpha3Code":"SYR","callingCodes":["963"],"capital":"Damascus","altSpellings":["SY","Syrian Arab Republic","Al-Jumhūrīyah Al-ʻArabīyah As-Sūrīyah"],"region":"Asia","subregion":"Western Asia","population":18564000,"latlng":[35.0,38.0],"demonym":"Syrian","area":185180.0,"gini":35.8,"timezones":["UTC+02:00"],"borders":["IRQ","ISR","JOR","LBN","TUR"],"nativeName":"سوريا","numericCode":"760","currencies":[{"code":"SYP","name":"Syrian pound","symbol":"£"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Syrien","es":"Siria","fr":"Syrie","ja":"シリア・アラブ共和国","it":"Siria","br":"Síria","pt":"Síria","nl":"Syrië","hr":"Sirija","fa":"سوریه"},"flag":"https://restcountries.eu/data/syr.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"SYR"} +{"name":"Taiwan","topLevelDomain":[".tw"],"alpha2Code":"TW","alpha3Code":"TWN","callingCodes":["886"],"capital":"Taipei","altSpellings":["TW","Táiwān","Republic of China","中華民國","Zhōnghuá Mínguó"],"region":"Asia","subregion":"Eastern Asia","population":23503349,"latlng":[23.5,121.0],"demonym":"Taiwanese","area":36193.0,"gini":null,"timezones":["UTC+08:00"],"borders":[],"nativeName":"臺灣","numericCode":"158","currencies":[{"code":"TWD","name":"New Taiwan dollar","symbol":"$"}],"languages":[{"iso639_1":"zh","iso639_2":"zho","name":"Chinese","nativeName":"中文 (Zhōngwén)"}],"translations":{"de":"Taiwan","es":"Taiwán","fr":"Taïwan","ja":"台湾(中華民国)","it":"Taiwan","br":"Taiwan","pt":"Taiwan","nl":"Taiwan","hr":"Tajvan","fa":"تایوان"},"flag":"https://restcountries.eu/data/twn.svg","regionalBlocs":[],"cioc":"TPE"} +{"name":"Tajikistan","topLevelDomain":[".tj"],"alpha2Code":"TJ","alpha3Code":"TJK","callingCodes":["992"],"capital":"Dushanbe","altSpellings":["TJ","Toçikiston","Republic of Tajikistan","Ҷумҳурии Тоҷикистон","Çumhuriyi Toçikiston"],"region":"Asia","subregion":"Central Asia","population":8593600,"latlng":[39.0,71.0],"demonym":"Tadzhik","area":143100.0,"gini":30.8,"timezones":["UTC+05:00"],"borders":["AFG","CHN","KGZ","UZB"],"nativeName":"Тоҷикистон","numericCode":"762","currencies":[{"code":"TJS","name":"Tajikistani somoni","symbol":"ЅМ"}],"languages":[{"iso639_1":"tg","iso639_2":"tgk","name":"Tajik","nativeName":"тоҷикӣ"},{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Tadschikistan","es":"Tayikistán","fr":"Tadjikistan","ja":"タジキスタン","it":"Tagikistan","br":"Tajiquistão","pt":"Tajiquistão","nl":"Tadzjikistan","hr":"Tađikistan","fa":"تاجیکستان"},"flag":"https://restcountries.eu/data/tjk.svg","regionalBlocs":[],"cioc":"TJK"} +{"name":"Tanzania, United Republic of","topLevelDomain":[".tz"],"alpha2Code":"TZ","alpha3Code":"TZA","callingCodes":["255"],"capital":"Dodoma","altSpellings":["TZ","United Republic of Tanzania","Jamhuri ya Muungano wa Tanzania"],"region":"Africa","subregion":"Eastern Africa","population":55155000,"latlng":[-6.0,35.0],"demonym":"Tanzanian","area":945087.0,"gini":37.6,"timezones":["UTC+03:00"],"borders":["BDI","COD","KEN","MWI","MOZ","RWA","UGA","ZMB"],"nativeName":"Tanzania","numericCode":"834","currencies":[{"code":"TZS","name":"Tanzanian shilling","symbol":"Sh"}],"languages":[{"iso639_1":"sw","iso639_2":"swa","name":"Swahili","nativeName":"Kiswahili"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Tansania","es":"Tanzania","fr":"Tanzanie","ja":"タンザニア","it":"Tanzania","br":"Tanzânia","pt":"Tanzânia","nl":"Tanzania","hr":"Tanzanija","fa":"تانزانیا"},"flag":"https://restcountries.eu/data/tza.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"TAN"} +{"name":"Thailand","topLevelDomain":[".th"],"alpha2Code":"TH","alpha3Code":"THA","callingCodes":["66"],"capital":"Bangkok","altSpellings":["TH","Prathet","Thai","Kingdom of Thailand","ราชอาณาจักรไทย","Ratcha Anachak Thai"],"region":"Asia","subregion":"South-Eastern Asia","population":65327652,"latlng":[15.0,100.0],"demonym":"Thai","area":513120.0,"gini":40.0,"timezones":["UTC+07:00"],"borders":["MMR","KHM","LAO","MYS"],"nativeName":"ประเทศไทย","numericCode":"764","currencies":[{"code":"THB","name":"Thai baht","symbol":"฿"}],"languages":[{"iso639_1":"th","iso639_2":"tha","name":"Thai","nativeName":"ไทย"}],"translations":{"de":"Thailand","es":"Tailandia","fr":"Thaïlande","ja":"タイ","it":"Tailandia","br":"Tailândia","pt":"Tailândia","nl":"Thailand","hr":"Tajland","fa":"تایلند"},"flag":"https://restcountries.eu/data/tha.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"THA"} +{"name":"Timor-Leste","topLevelDomain":[".tl"],"alpha2Code":"TL","alpha3Code":"TLS","callingCodes":["670"],"capital":"Dili","altSpellings":["TL","East Timor","Democratic Republic of Timor-Leste","República Democrática de Timor-Leste","Repúblika Demokrátika Timór-Leste"],"region":"Asia","subregion":"South-Eastern Asia","population":1167242,"latlng":[-8.83333333,125.91666666],"demonym":"East Timorese","area":14874.0,"gini":31.9,"timezones":["UTC+09:00"],"borders":["IDN"],"nativeName":"Timor-Leste","numericCode":"626","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"},{"code":null,"name":null,"symbol":null}],"languages":[{"iso639_1":"pt","iso639_2":"por","name":"Portuguese","nativeName":"Português"}],"translations":{"de":"Timor-Leste","es":"Timor Oriental","fr":"Timor oriental","ja":"東ティモール","it":"Timor Est","br":"Timor Leste","pt":"Timor Leste","nl":"Oost-Timor","hr":"Istočni Timor","fa":"تیمور شرقی"},"flag":"https://restcountries.eu/data/tls.svg","regionalBlocs":[],"cioc":"TLS"} +{"name":"Togo","topLevelDomain":[".tg"],"alpha2Code":"TG","alpha3Code":"TGO","callingCodes":["228"],"capital":"Lomé","altSpellings":["TG","Togolese","Togolese Republic","République Togolaise"],"region":"Africa","subregion":"Western Africa","population":7143000,"latlng":[8.0,1.16666666],"demonym":"Togolese","area":56785.0,"gini":34.4,"timezones":["UTC"],"borders":["BEN","BFA","GHA"],"nativeName":"Togo","numericCode":"768","currencies":[{"code":"XOF","name":"West African CFA franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Togo","es":"Togo","fr":"Togo","ja":"トーゴ","it":"Togo","br":"Togo","pt":"Togo","nl":"Togo","hr":"Togo","fa":"توگو"},"flag":"https://restcountries.eu/data/tgo.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"TOG"} +{"name":"Tokelau","topLevelDomain":[".tk"],"alpha2Code":"TK","alpha3Code":"TKL","callingCodes":["690"],"capital":"Fakaofo","altSpellings":["TK"],"region":"Oceania","subregion":"Polynesia","population":1411,"latlng":[-9.0,-172.0],"demonym":"Tokelauan","area":12.0,"gini":null,"timezones":["UTC+13:00"],"borders":[],"nativeName":"Tokelau","numericCode":"772","currencies":[{"code":"NZD","name":"New Zealand dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Tokelau","es":"Islas Tokelau","fr":"Tokelau","ja":"トケラウ","it":"Isole Tokelau","br":"Tokelau","pt":"Toquelau","nl":"Tokelau","hr":"Tokelau","fa":"توکلائو"},"flag":"https://restcountries.eu/data/tkl.svg","regionalBlocs":[],"cioc":""} +{"name":"Tonga","topLevelDomain":[".to"],"alpha2Code":"TO","alpha3Code":"TON","callingCodes":["676"],"capital":"Nuku'alofa","altSpellings":["TO"],"region":"Oceania","subregion":"Polynesia","population":103252,"latlng":[-20.0,-175.0],"demonym":"Tongan","area":747.0,"gini":null,"timezones":["UTC+13:00"],"borders":[],"nativeName":"Tonga","numericCode":"776","currencies":[{"code":"TOP","name":"Tongan paʻanga","symbol":"T$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"to","iso639_2":"ton","name":"Tonga (Tonga Islands)","nativeName":"faka Tonga"}],"translations":{"de":"Tonga","es":"Tonga","fr":"Tonga","ja":"トンガ","it":"Tonga","br":"Tonga","pt":"Tonga","nl":"Tonga","hr":"Tonga","fa":"تونگا"},"flag":"https://restcountries.eu/data/ton.svg","regionalBlocs":[],"cioc":"TGA"} +{"name":"Trinidad and Tobago","topLevelDomain":[".tt"],"alpha2Code":"TT","alpha3Code":"TTO","callingCodes":["1868"],"capital":"Port of Spain","altSpellings":["TT","Republic of Trinidad and Tobago"],"region":"Americas","subregion":"Caribbean","population":1349667,"latlng":[11.0,-61.0],"demonym":"Trinidadian","area":5130.0,"gini":40.3,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Trinidad and Tobago","numericCode":"780","currencies":[{"code":"TTD","name":"Trinidad and Tobago dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Trinidad und Tobago","es":"Trinidad y Tobago","fr":"Trinité et Tobago","ja":"トリニダード・トバゴ","it":"Trinidad e Tobago","br":"Trinidad e Tobago","pt":"Trindade e Tobago","nl":"Trinidad en Tobago","hr":"Trinidad i Tobago","fa":"ترینیداد و توباگو"},"flag":"https://restcountries.eu/data/tto.svg","regionalBlocs":[{"acronym":"CARICOM","name":"Caribbean Community","otherAcronyms":[],"otherNames":["Comunidad del Caribe","Communauté Caribéenne","Caribische Gemeenschap"]}],"cioc":"TTO"} +{"name":"Tunisia","topLevelDomain":[".tn"],"alpha2Code":"TN","alpha3Code":"TUN","callingCodes":["216"],"capital":"Tunis","altSpellings":["TN","Republic of Tunisia","al-Jumhūriyyah at-Tūnisiyyah"],"region":"Africa","subregion":"Northern Africa","population":11154400,"latlng":[34.0,9.0],"demonym":"Tunisian","area":163610.0,"gini":41.4,"timezones":["UTC+01:00"],"borders":["DZA","LBY"],"nativeName":"تونس","numericCode":"788","currencies":[{"code":"TND","name":"Tunisian dinar","symbol":"د.ت"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Tunesien","es":"Túnez","fr":"Tunisie","ja":"チュニジア","it":"Tunisia","br":"Tunísia","pt":"Tunísia","nl":"Tunesië","hr":"Tunis","fa":"تونس"},"flag":"https://restcountries.eu/data/tun.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]},{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"TUN"} +{"name":"Turkey","topLevelDomain":[".tr"],"alpha2Code":"TR","alpha3Code":"TUR","callingCodes":["90"],"capital":"Ankara","altSpellings":["TR","Turkiye","Republic of Turkey","Türkiye Cumhuriyeti"],"region":"Asia","subregion":"Western Asia","population":78741053,"latlng":[39.0,35.0],"demonym":"Turkish","area":783562.0,"gini":39.0,"timezones":["UTC+03:00"],"borders":["ARM","AZE","BGR","GEO","GRC","IRN","IRQ","SYR"],"nativeName":"Türkiye","numericCode":"792","currencies":[{"code":"TRY","name":"Turkish lira","symbol":null}],"languages":[{"iso639_1":"tr","iso639_2":"tur","name":"Turkish","nativeName":"Türkçe"}],"translations":{"de":"Türkei","es":"Turquía","fr":"Turquie","ja":"トルコ","it":"Turchia","br":"Turquia","pt":"Turquia","nl":"Turkije","hr":"Turska","fa":"ترکیه"},"flag":"https://restcountries.eu/data/tur.svg","regionalBlocs":[],"cioc":"TUR"} +{"name":"Turkmenistan","topLevelDomain":[".tm"],"alpha2Code":"TM","alpha3Code":"TKM","callingCodes":["993"],"capital":"Ashgabat","altSpellings":["TM"],"region":"Asia","subregion":"Central Asia","population":4751120,"latlng":[40.0,60.0],"demonym":"Turkmen","area":488100.0,"gini":40.8,"timezones":["UTC+05:00"],"borders":["AFG","IRN","KAZ","UZB"],"nativeName":"Türkmenistan","numericCode":"795","currencies":[{"code":"TMT","name":"Turkmenistan manat","symbol":"m"}],"languages":[{"iso639_1":"tk","iso639_2":"tuk","name":"Turkmen","nativeName":"Türkmen"},{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Turkmenistan","es":"Turkmenistán","fr":"Turkménistan","ja":"トルクメニスタン","it":"Turkmenistan","br":"Turcomenistão","pt":"Turquemenistão","nl":"Turkmenistan","hr":"Turkmenistan","fa":"ترکمنستان"},"flag":"https://restcountries.eu/data/tkm.svg","regionalBlocs":[],"cioc":"TKM"} +{"name":"Turks and Caicos Islands","topLevelDomain":[".tc"],"alpha2Code":"TC","alpha3Code":"TCA","callingCodes":["1649"],"capital":"Cockburn Town","altSpellings":["TC"],"region":"Americas","subregion":"Caribbean","population":31458,"latlng":[21.75,-71.58333333],"demonym":"Turks and Caicos Islander","area":948.0,"gini":null,"timezones":["UTC-04:00"],"borders":[],"nativeName":"Turks and Caicos Islands","numericCode":"796","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Turks- und Caicosinseln","es":"Islas Turks y Caicos","fr":"Îles Turques-et-Caïques","ja":"タークス・カイコス諸島","it":"Isole Turks e Caicos","br":"Ilhas Turcas e Caicos","pt":"Ilhas Turcas e Caicos","nl":"Turks- en Caicoseilanden","hr":"Otoci Turks i Caicos","fa":"جزایر تورکس و کایکوس"},"flag":"https://restcountries.eu/data/tca.svg","regionalBlocs":[],"cioc":""} +{"name":"Tuvalu","topLevelDomain":[".tv"],"alpha2Code":"TV","alpha3Code":"TUV","callingCodes":["688"],"capital":"Funafuti","altSpellings":["TV"],"region":"Oceania","subregion":"Polynesia","population":10640,"latlng":[-8.0,178.0],"demonym":"Tuvaluan","area":26.0,"gini":null,"timezones":["UTC+12:00"],"borders":[],"nativeName":"Tuvalu","numericCode":"798","currencies":[{"code":"AUD","name":"Australian dollar","symbol":"$"},{"code":"TVD[G]","name":"Tuvaluan dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Tuvalu","es":"Tuvalu","fr":"Tuvalu","ja":"ツバル","it":"Tuvalu","br":"Tuvalu","pt":"Tuvalu","nl":"Tuvalu","hr":"Tuvalu","fa":"تووالو"},"flag":"https://restcountries.eu/data/tuv.svg","regionalBlocs":[],"cioc":"TUV"} +{"name":"Uganda","topLevelDomain":[".ug"],"alpha2Code":"UG","alpha3Code":"UGA","callingCodes":["256"],"capital":"Kampala","altSpellings":["UG","Republic of Uganda","Jamhuri ya Uganda"],"region":"Africa","subregion":"Eastern Africa","population":33860700,"latlng":[1.0,32.0],"demonym":"Ugandan","area":241550.0,"gini":44.3,"timezones":["UTC+03:00"],"borders":["COD","KEN","RWA","SSD","TZA"],"nativeName":"Uganda","numericCode":"800","currencies":[{"code":"UGX","name":"Ugandan shilling","symbol":"Sh"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"sw","iso639_2":"swa","name":"Swahili","nativeName":"Kiswahili"}],"translations":{"de":"Uganda","es":"Uganda","fr":"Uganda","ja":"ウガンダ","it":"Uganda","br":"Uganda","pt":"Uganda","nl":"Oeganda","hr":"Uganda","fa":"اوگاندا"},"flag":"https://restcountries.eu/data/uga.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"UGA"} +{"name":"Ukraine","topLevelDomain":[".ua"],"alpha2Code":"UA","alpha3Code":"UKR","callingCodes":["380"],"capital":"Kiev","altSpellings":["UA","Ukrayina"],"region":"Europe","subregion":"Eastern Europe","population":42692393,"latlng":[49.0,32.0],"demonym":"Ukrainian","area":603700.0,"gini":26.4,"timezones":["UTC+02:00"],"borders":["BLR","HUN","MDA","POL","ROU","RUS","SVK"],"nativeName":"Україна","numericCode":"804","currencies":[{"code":"UAH","name":"Ukrainian hryvnia","symbol":"₴"}],"languages":[{"iso639_1":"uk","iso639_2":"ukr","name":"Ukrainian","nativeName":"Українська"}],"translations":{"de":"Ukraine","es":"Ucrania","fr":"Ukraine","ja":"ウクライナ","it":"Ucraina","br":"Ucrânia","pt":"Ucrânia","nl":"Oekraïne","hr":"Ukrajina","fa":"وکراین"},"flag":"https://restcountries.eu/data/ukr.svg","regionalBlocs":[],"cioc":"UKR"} +{"name":"United Arab Emirates","topLevelDomain":[".ae"],"alpha2Code":"AE","alpha3Code":"ARE","callingCodes":["971"],"capital":"Abu Dhabi","altSpellings":["AE","UAE"],"region":"Asia","subregion":"Western Asia","population":9856000,"latlng":[24.0,54.0],"demonym":"Emirati","area":83600.0,"gini":null,"timezones":["UTC+04"],"borders":["OMN","SAU"],"nativeName":"دولة الإمارات العربية المتحدة","numericCode":"784","currencies":[{"code":"AED","name":"United Arab Emirates dirham","symbol":"د.إ"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Vereinigte Arabische Emirate","es":"Emiratos Árabes Unidos","fr":"Émirats arabes unis","ja":"アラブ首長国連邦","it":"Emirati Arabi Uniti","br":"Emirados árabes Unidos","pt":"Emirados árabes Unidos","nl":"Verenigde Arabische Emiraten","hr":"Ujedinjeni Arapski Emirati","fa":"امارات متحده عربی"},"flag":"https://restcountries.eu/data/are.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"UAE"} +{"name":"United Kingdom of Great Britain and Northern Ireland","topLevelDomain":[".uk"],"alpha2Code":"GB","alpha3Code":"GBR","callingCodes":["44"],"capital":"London","altSpellings":["GB","UK","Great Britain"],"region":"Europe","subregion":"Northern Europe","population":65110000,"latlng":[54.0,-2.0],"demonym":"British","area":242900.0,"gini":34.0,"timezones":["UTC-08:00","UTC-05:00","UTC-04:00","UTC-03:00","UTC-02:00","UTC","UTC+01:00","UTC+02:00","UTC+06:00"],"borders":["IRL"],"nativeName":"United Kingdom","numericCode":"826","currencies":[{"code":"GBP","name":"British pound","symbol":"£"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Vereinigtes Königreich","es":"Reino Unido","fr":"Royaume-Uni","ja":"イギリス","it":"Regno Unito","br":"Reino Unido","pt":"Reino Unido","nl":"Verenigd Koninkrijk","hr":"Ujedinjeno Kraljevstvo","fa":"بریتانیای کبیر و ایرلند شمالی"},"flag":"https://restcountries.eu/data/gbr.svg","regionalBlocs":[{"acronym":"EU","name":"European Union","otherAcronyms":[],"otherNames":[]}],"cioc":"GBR"} +{"name":"United States of America","topLevelDomain":[".us"],"alpha2Code":"US","alpha3Code":"USA","callingCodes":["1"],"capital":"Washington, D.C.","altSpellings":["US","USA","United States of America"],"region":"Americas","subregion":"Northern America","population":323947000,"latlng":[38.0,-97.0],"demonym":"American","area":9629091.0,"gini":48.0,"timezones":["UTC-12:00","UTC-11:00","UTC-10:00","UTC-09:00","UTC-08:00","UTC-07:00","UTC-06:00","UTC-05:00","UTC-04:00","UTC+10:00","UTC+12:00"],"borders":["CAN","MEX"],"nativeName":"United States","numericCode":"840","currencies":[{"code":"USD","name":"United States dollar","symbol":"$"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Vereinigte Staaten von Amerika","es":"Estados Unidos","fr":"États-Unis","ja":"アメリカ合衆国","it":"Stati Uniti D'America","br":"Estados Unidos","pt":"Estados Unidos","nl":"Verenigde Staten","hr":"Sjedinjene Američke Države","fa":"ایالات متحده آمریکا"},"flag":"https://restcountries.eu/data/usa.svg","regionalBlocs":[{"acronym":"NAFTA","name":"North American Free Trade Agreement","otherAcronyms":[],"otherNames":["Tratado de Libre Comercio de América del Norte","Accord de Libre-échange Nord-Américain"]}],"cioc":"USA"} +{"name":"Uruguay","topLevelDomain":[".uy"],"alpha2Code":"UY","alpha3Code":"URY","callingCodes":["598"],"capital":"Montevideo","altSpellings":["UY","Oriental Republic of Uruguay","República Oriental del Uruguay"],"region":"Americas","subregion":"South America","population":3480222,"latlng":[-33.0,-56.0],"demonym":"Uruguayan","area":181034.0,"gini":39.7,"timezones":["UTC-03:00"],"borders":["ARG","BRA"],"nativeName":"Uruguay","numericCode":"858","currencies":[{"code":"UYU","name":"Uruguayan peso","symbol":"$"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Uruguay","es":"Uruguay","fr":"Uruguay","ja":"ウルグアイ","it":"Uruguay","br":"Uruguai","pt":"Uruguai","nl":"Uruguay","hr":"Urugvaj","fa":"اروگوئه"},"flag":"https://restcountries.eu/data/ury.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"URU"} +{"name":"Uzbekistan","topLevelDomain":[".uz"],"alpha2Code":"UZ","alpha3Code":"UZB","callingCodes":["998"],"capital":"Tashkent","altSpellings":["UZ","Republic of Uzbekistan","O‘zbekiston Respublikasi","Ўзбекистон Республикаси"],"region":"Asia","subregion":"Central Asia","population":31576400,"latlng":[41.0,64.0],"demonym":"Uzbekistani","area":447400.0,"gini":36.7,"timezones":["UTC+05:00"],"borders":["AFG","KAZ","KGZ","TJK","TKM"],"nativeName":"O‘zbekiston","numericCode":"860","currencies":[{"code":"UZS","name":"Uzbekistani so'm","symbol":null}],"languages":[{"iso639_1":"uz","iso639_2":"uzb","name":"Uzbek","nativeName":"Oʻzbek"},{"iso639_1":"ru","iso639_2":"rus","name":"Russian","nativeName":"Русский"}],"translations":{"de":"Usbekistan","es":"Uzbekistán","fr":"Ouzbékistan","ja":"ウズベキスタン","it":"Uzbekistan","br":"Uzbequistão","pt":"Usbequistão","nl":"Oezbekistan","hr":"Uzbekistan","fa":"ازبکستان"},"flag":"https://restcountries.eu/data/uzb.svg","regionalBlocs":[],"cioc":"UZB"} +{"name":"Vanuatu","topLevelDomain":[".vu"],"alpha2Code":"VU","alpha3Code":"VUT","callingCodes":["678"],"capital":"Port Vila","altSpellings":["VU","Republic of Vanuatu","Ripablik blong Vanuatu","République de Vanuatu"],"region":"Oceania","subregion":"Melanesia","population":277500,"latlng":[-16.0,167.0],"demonym":"Ni-Vanuatu","area":12189.0,"gini":null,"timezones":["UTC+11:00"],"borders":[],"nativeName":"Vanuatu","numericCode":"548","currencies":[{"code":"VUV","name":"Vanuatu vatu","symbol":"Vt"}],"languages":[{"iso639_1":"bi","iso639_2":"bis","name":"Bislama","nativeName":"Bislama"},{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Vanuatu","es":"Vanuatu","fr":"Vanuatu","ja":"バヌアツ","it":"Vanuatu","br":"Vanuatu","pt":"Vanuatu","nl":"Vanuatu","hr":"Vanuatu","fa":"وانواتو"},"flag":"https://restcountries.eu/data/vut.svg","regionalBlocs":[],"cioc":"VAN"} +{"name":"Venezuela (Bolivarian Republic of)","topLevelDomain":[".ve"],"alpha2Code":"VE","alpha3Code":"VEN","callingCodes":["58"],"capital":"Caracas","altSpellings":["VE","Bolivarian Republic of Venezuela","República Bolivariana de Venezuela"],"region":"Americas","subregion":"South America","population":31028700,"latlng":[8.0,-66.0],"demonym":"Venezuelan","area":916445.0,"gini":44.8,"timezones":["UTC-04:00"],"borders":["BRA","COL","GUY"],"nativeName":"Venezuela","numericCode":"862","currencies":[{"code":"VEF","name":"Venezuelan bolívar","symbol":"Bs F"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Venezuela","es":"Venezuela","fr":"Venezuela","ja":"ベネズエラ・ボリバル共和国","it":"Venezuela","br":"Venezuela","pt":"Venezuela","nl":"Venezuela","hr":"Venezuela","fa":"ونزوئلا"},"flag":"https://restcountries.eu/data/ven.svg","regionalBlocs":[{"acronym":"USAN","name":"Union of South American Nations","otherAcronyms":["UNASUR","UNASUL","UZAN"],"otherNames":["Unión de Naciones Suramericanas","União de Nações Sul-Americanas","Unie van Zuid-Amerikaanse Naties","South American Union"]}],"cioc":"VEN"} +{"name":"Viet Nam","topLevelDomain":[".vn"],"alpha2Code":"VN","alpha3Code":"VNM","callingCodes":["84"],"capital":"Hanoi","altSpellings":["VN","Socialist Republic of Vietnam","Cộng hòa Xã hội chủ nghĩa Việt Nam"],"region":"Asia","subregion":"South-Eastern Asia","population":92700000,"latlng":[16.16666666,107.83333333],"demonym":"Vietnamese","area":331212.0,"gini":35.6,"timezones":["UTC+07:00"],"borders":["KHM","CHN","LAO"],"nativeName":"Việt Nam","numericCode":"704","currencies":[{"code":"VND","name":"Vietnamese đồng","symbol":"₫"}],"languages":[{"iso639_1":"vi","iso639_2":"vie","name":"Vietnamese","nativeName":"Tiếng Việt"}],"translations":{"de":"Vietnam","es":"Vietnam","fr":"Viêt Nam","ja":"ベトナム","it":"Vietnam","br":"Vietnã","pt":"Vietname","nl":"Vietnam","hr":"Vijetnam","fa":"ویتنام"},"flag":"https://restcountries.eu/data/vnm.svg","regionalBlocs":[{"acronym":"ASEAN","name":"Association of Southeast Asian Nations","otherAcronyms":[],"otherNames":[]}],"cioc":"VIE"} +{"name":"Wallis and Futuna","topLevelDomain":[".wf"],"alpha2Code":"WF","alpha3Code":"WLF","callingCodes":["681"],"capital":"Mata-Utu","altSpellings":["WF","Territory of the Wallis and Futuna Islands","Territoire des îles Wallis et Futuna"],"region":"Oceania","subregion":"Polynesia","population":11750,"latlng":[-13.3,-176.2],"demonym":"Wallis and Futuna Islander","area":142.0,"gini":null,"timezones":["UTC+12:00"],"borders":[],"nativeName":"Wallis et Futuna","numericCode":"876","currencies":[{"code":"XPF","name":"CFP franc","symbol":"Fr"}],"languages":[{"iso639_1":"fr","iso639_2":"fra","name":"French","nativeName":"français"}],"translations":{"de":"Wallis und Futuna","es":"Wallis y Futuna","fr":"Wallis-et-Futuna","ja":"ウォリス・フツナ","it":"Wallis e Futuna","br":"Wallis e Futuna","pt":"Wallis e Futuna","nl":"Wallis en Futuna","hr":"Wallis i Fortuna","fa":"والیس و فوتونا"},"flag":"https://restcountries.eu/data/wlf.svg","regionalBlocs":[],"cioc":""} +{"name":"Western Sahara","topLevelDomain":[".eh"],"alpha2Code":"EH","alpha3Code":"ESH","callingCodes":["212"],"capital":"El Aaiún","altSpellings":["EH","Taneẓroft Tutrimt"],"region":"Africa","subregion":"Northern Africa","population":510713,"latlng":[24.5,-13.0],"demonym":"Sahrawi","area":266000.0,"gini":null,"timezones":["UTC+00:00"],"borders":["DZA","MRT","MAR"],"nativeName":"الصحراء الغربية","numericCode":"732","currencies":[{"code":"MAD","name":"Moroccan dirham","symbol":"د.م."},{"code":"DZD","name":"Algerian dinar","symbol":"د.ج"}],"languages":[{"iso639_1":"es","iso639_2":"spa","name":"Spanish","nativeName":"Español"}],"translations":{"de":"Westsahara","es":"Sahara Occidental","fr":"Sahara Occidental","ja":"西サハラ","it":"Sahara Occidentale","br":"Saara Ocidental","pt":"Saara Ocidental","nl":"Westelijke Sahara","hr":"Zapadna Sahara","fa":"جمهوری دموکراتیک عربی صحرا"},"flag":"https://restcountries.eu/data/esh.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":""} +{"name":"Yemen","topLevelDomain":[".ye"],"alpha2Code":"YE","alpha3Code":"YEM","callingCodes":["967"],"capital":"Sana'a","altSpellings":["YE","Yemeni Republic","al-Jumhūriyyah al-Yamaniyyah"],"region":"Asia","subregion":"Western Asia","population":27478000,"latlng":[15.0,48.0],"demonym":"Yemeni","area":527968.0,"gini":37.7,"timezones":["UTC+03:00"],"borders":["OMN","SAU"],"nativeName":"اليَمَن","numericCode":"887","currencies":[{"code":"YER","name":"Yemeni rial","symbol":"﷼"}],"languages":[{"iso639_1":"ar","iso639_2":"ara","name":"Arabic","nativeName":"العربية"}],"translations":{"de":"Jemen","es":"Yemen","fr":"Yémen","ja":"イエメン","it":"Yemen","br":"Iêmen","pt":"Iémen","nl":"Jemen","hr":"Jemen","fa":"یمن"},"flag":"https://restcountries.eu/data/yem.svg","regionalBlocs":[{"acronym":"AL","name":"Arab League","otherAcronyms":[],"otherNames":["جامعة الدول العربية","Jāmiʻat ad-Duwal al-ʻArabīyah","League of Arab States"]}],"cioc":"YEM"} +{"name":"Zambia","topLevelDomain":[".zm"],"alpha2Code":"ZM","alpha3Code":"ZMB","callingCodes":["260"],"capital":"Lusaka","altSpellings":["ZM","Republic of Zambia"],"region":"Africa","subregion":"Eastern Africa","population":15933883,"latlng":[-15.0,30.0],"demonym":"Zambian","area":752612.0,"gini":54.6,"timezones":["UTC+02:00"],"borders":["AGO","BWA","COD","MWI","MOZ","NAM","TZA","ZWE"],"nativeName":"Zambia","numericCode":"894","currencies":[{"code":"ZMW","name":"Zambian kwacha","symbol":"ZK"}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"}],"translations":{"de":"Sambia","es":"Zambia","fr":"Zambie","ja":"ザンビア","it":"Zambia","br":"Zâmbia","pt":"Zâmbia","nl":"Zambia","hr":"Zambija","fa":"زامبیا"},"flag":"https://restcountries.eu/data/zmb.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"ZAM"} +{"name":"Zimbabwe","topLevelDomain":[".zw"],"alpha2Code":"ZW","alpha3Code":"ZWE","callingCodes":["263"],"capital":"Harare","altSpellings":["ZW","Republic of Zimbabwe"],"region":"Africa","subregion":"Eastern Africa","population":14240168,"latlng":[-20.0,30.0],"demonym":"Zimbabwean","area":390757.0,"gini":null,"timezones":["UTC+02:00"],"borders":["BWA","MOZ","ZAF","ZMB"],"nativeName":"Zimbabwe","numericCode":"716","currencies":[{"code":"BWP","name":"Botswana pula","symbol":"P"},{"code":"GBP","name":"British pound","symbol":"£"},{"code":"CNY","name":"Chinese yuan","symbol":"¥"},{"code":"EUR","name":"Euro","symbol":"€"},{"code":"INR","name":"Indian rupee","symbol":"₹"},{"code":"JPY","name":"Japanese yen","symbol":"¥"},{"code":"ZAR","name":"South African rand","symbol":"Rs"},{"code":"USD","name":"United States dollar","symbol":"$"},{"code":"(none)","name":null,"symbol":null}],"languages":[{"iso639_1":"en","iso639_2":"eng","name":"English","nativeName":"English"},{"iso639_1":"sn","iso639_2":"sna","name":"Shona","nativeName":"chiShona"},{"iso639_1":"nd","iso639_2":"nde","name":"Northern Ndebele","nativeName":"isiNdebele"}],"translations":{"de":"Simbabwe","es":"Zimbabue","fr":"Zimbabwe","ja":"ジンバブエ","it":"Zimbabwe","br":"Zimbabwe","pt":"Zimbabué","nl":"Zimbabwe","hr":"Zimbabve","fa":"زیمباوه"},"flag":"https://restcountries.eu/data/zwe.svg","regionalBlocs":[{"acronym":"AU","name":"African Union","otherAcronyms":[],"otherNames":["الاتحاد الأفريقي","Union africaine","União Africana","Unión Africana","Umoja wa Afrika"]}],"cioc":"ZIM"} \ No newline at end of file diff --git a/persistence-modules/jnosql/jnosql-diana/pom.xml b/persistence-modules/jnosql/jnosql-diana/pom.xml index 22e066d36d..79c455646c 100644 --- a/persistence-modules/jnosql/jnosql-diana/pom.xml +++ b/persistence-modules/jnosql/jnosql-diana/pom.xml @@ -55,7 +55,7 @@ org.codehaus.mojo exec-maven-plugin - 1.6.0 + ${exec-maven-plugin.version} document diff --git a/persistence-modules/jnosql/pom.xml b/persistence-modules/jnosql/pom.xml index b96722de18..fb7ac72b05 100644 --- a/persistence-modules/jnosql/pom.xml +++ b/persistence-modules/jnosql/pom.xml @@ -11,9 +11,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ @@ -22,8 +21,6 @@ - 1.8 - 1.8 0.0.5 diff --git a/persistence-modules/jpa-hibernate-cascade-type/pom.xml b/persistence-modules/jpa-hibernate-cascade-type/pom.xml index a545723746..1fc119592c 100644 --- a/persistence-modules/jpa-hibernate-cascade-type/pom.xml +++ b/persistence-modules/jpa-hibernate-cascade-type/pom.xml @@ -4,13 +4,10 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 jpa-hibernate-cascade-type - 1.0.0-SNAPSHOT - com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ @@ -48,24 +45,12 @@ - - jpa-hibernate-cascade-type - - - src/test/resources - true - - - - 5.4.3.Final 3.12.2 6.0.17.Final 3.0.0 3.0.1-b11 - 1.8 - 1.8 \ No newline at end of file diff --git a/persistence-modules/liquibase/pom.xml b/persistence-modules/liquibase/pom.xml index 39e86b5186..af1af2259e 100644 --- a/persistence-modules/liquibase/pom.xml +++ b/persistence-modules/liquibase/pom.xml @@ -7,9 +7,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ diff --git a/persistence-modules/orientdb/pom.xml b/persistence-modules/orientdb/pom.xml index 7b0bef7fc5..5b28fb01b0 100644 --- a/persistence-modules/orientdb/pom.xml +++ b/persistence-modules/orientdb/pom.xml @@ -10,9 +10,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ diff --git a/persistence-modules/persistence-libraries/pom.xml b/persistence-modules/persistence-libraries/pom.xml index 74ff262637..a72654f2aa 100644 --- a/persistence-modules/persistence-libraries/pom.xml +++ b/persistence-modules/persistence-libraries/pom.xml @@ -10,7 +10,6 @@ com.baeldung persistence-modules 1.0.0-SNAPSHOT - .. @@ -25,30 +24,10 @@ ${hsqldb.version} test - - junit - junit - ${junit.version} - test - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 8 - 8 - - - - - 2.4.0 - 4.12 1.6.0 diff --git a/persistence-modules/pom.xml b/persistence-modules/pom.xml index c0f7c07b70..15b62d5d77 100644 --- a/persistence-modules/pom.xml +++ b/persistence-modules/pom.xml @@ -10,7 +10,6 @@ com.baeldung parent-modules 1.0.0-SNAPSHOT - .. @@ -42,7 +41,7 @@ redis solr - spring-boot-jdbi + spring-boot-persistence-2 spring-boot-mysql spring-boot-persistence spring-boot-persistence-h2 diff --git a/persistence-modules/querydsl/README.md b/persistence-modules/querydsl/README.md index 77b9fd6baf..03e113795d 100644 --- a/persistence-modules/querydsl/README.md +++ b/persistence-modules/querydsl/README.md @@ -1,3 +1,3 @@ ### Relevant Articles: -- [Intro to Querydsl](http://www.baeldung.com/intro-to-querydsl) -- [A Guide to Querydsl with JPA](http://www.baeldung.com/querydsl-with-jpa-tutorial) +- [Intro to Querydsl](https://www.baeldung.com/intro-to-querydsl) +- [A Guide to Querydsl with JPA](https://www.baeldung.com/querydsl-with-jpa-tutorial) diff --git a/persistence-modules/querydsl/pom.xml b/persistence-modules/querydsl/pom.xml index 690e65d737..9f6802ff77 100644 --- a/persistence-modules/querydsl/pom.xml +++ b/persistence-modules/querydsl/pom.xml @@ -6,13 +6,11 @@ 0.1-SNAPSHOT querydsl jar - http://maven.apache.org com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ diff --git a/persistence-modules/querydsl/src/main/java/org/baeldung/dao/PersonDao.java b/persistence-modules/querydsl/src/main/java/com/baeldung/dao/PersonDao.java similarity index 88% rename from persistence-modules/querydsl/src/main/java/org/baeldung/dao/PersonDao.java rename to persistence-modules/querydsl/src/main/java/com/baeldung/dao/PersonDao.java index 7df4ebb22d..fb39821981 100644 --- a/persistence-modules/querydsl/src/main/java/org/baeldung/dao/PersonDao.java +++ b/persistence-modules/querydsl/src/main/java/com/baeldung/dao/PersonDao.java @@ -1,9 +1,9 @@ -package org.baeldung.dao; +package com.baeldung.dao; import java.util.List; import java.util.Map; -import org.baeldung.entity.Person; +import com.baeldung.entity.Person; public interface PersonDao { diff --git a/persistence-modules/querydsl/src/main/java/org/baeldung/dao/PersonDaoImpl.java b/persistence-modules/querydsl/src/main/java/com/baeldung/dao/PersonDaoImpl.java similarity index 95% rename from persistence-modules/querydsl/src/main/java/org/baeldung/dao/PersonDaoImpl.java rename to persistence-modules/querydsl/src/main/java/com/baeldung/dao/PersonDaoImpl.java index 9acaf1dd18..20ebe0e3fe 100644 --- a/persistence-modules/querydsl/src/main/java/org/baeldung/dao/PersonDaoImpl.java +++ b/persistence-modules/querydsl/src/main/java/com/baeldung/dao/PersonDaoImpl.java @@ -1,17 +1,15 @@ -package org.baeldung.dao; +package com.baeldung.dao; -import java.util.List; -import java.util.Map; +import com.baeldung.entity.Person; +import com.baeldung.entity.QPerson; +import com.querydsl.core.group.GroupBy; +import com.querydsl.jpa.impl.JPAQuery; +import org.springframework.stereotype.Repository; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; - -import org.baeldung.entity.Person; -import org.baeldung.entity.QPerson; -import org.springframework.stereotype.Repository; - -import com.querydsl.core.group.GroupBy; -import com.querydsl.jpa.impl.JPAQuery; +import java.util.List; +import java.util.Map; @Repository public class PersonDaoImpl implements PersonDao { diff --git a/persistence-modules/querydsl/src/main/java/org/baeldung/entity/Person.java b/persistence-modules/querydsl/src/main/java/com/baeldung/entity/Person.java similarity index 97% rename from persistence-modules/querydsl/src/main/java/org/baeldung/entity/Person.java rename to persistence-modules/querydsl/src/main/java/com/baeldung/entity/Person.java index 6f04210d90..310f21ab2a 100644 --- a/persistence-modules/querydsl/src/main/java/org/baeldung/entity/Person.java +++ b/persistence-modules/querydsl/src/main/java/com/baeldung/entity/Person.java @@ -1,4 +1,4 @@ -package org.baeldung.entity; +package com.baeldung.entity; import javax.persistence.Column; import javax.persistence.Entity; diff --git a/persistence-modules/querydsl/src/main/java/org/baeldung/querydsl/intro/entities/BlogPost.java b/persistence-modules/querydsl/src/main/java/com/baeldung/querydsl/intro/entities/BlogPost.java similarity index 95% rename from persistence-modules/querydsl/src/main/java/org/baeldung/querydsl/intro/entities/BlogPost.java rename to persistence-modules/querydsl/src/main/java/com/baeldung/querydsl/intro/entities/BlogPost.java index 241bc50b03..6712ad08d5 100644 --- a/persistence-modules/querydsl/src/main/java/org/baeldung/querydsl/intro/entities/BlogPost.java +++ b/persistence-modules/querydsl/src/main/java/com/baeldung/querydsl/intro/entities/BlogPost.java @@ -1,7 +1,7 @@ /* * (c) Центр ИТ, 2016. Все права защищены. */ -package org.baeldung.querydsl.intro.entities; +package com.baeldung.querydsl.intro.entities; import javax.persistence.Entity; import javax.persistence.GeneratedValue; diff --git a/persistence-modules/querydsl/src/main/java/org/baeldung/querydsl/intro/entities/User.java b/persistence-modules/querydsl/src/main/java/com/baeldung/querydsl/intro/entities/User.java similarity index 95% rename from persistence-modules/querydsl/src/main/java/org/baeldung/querydsl/intro/entities/User.java rename to persistence-modules/querydsl/src/main/java/com/baeldung/querydsl/intro/entities/User.java index c0681e15d1..4111284d5a 100644 --- a/persistence-modules/querydsl/src/main/java/org/baeldung/querydsl/intro/entities/User.java +++ b/persistence-modules/querydsl/src/main/java/com/baeldung/querydsl/intro/entities/User.java @@ -1,7 +1,7 @@ /* * (c) Центр ИТ, 2016. Все права защищены. */ -package org.baeldung.querydsl.intro.entities; +package com.baeldung.querydsl.intro.entities; import java.util.HashSet; import java.util.Set; diff --git a/persistence-modules/querydsl/src/main/resources/META-INF/persistence.xml b/persistence-modules/querydsl/src/main/resources/META-INF/persistence.xml index 2964382d48..4b51cb444b 100644 --- a/persistence-modules/querydsl/src/main/resources/META-INF/persistence.xml +++ b/persistence-modules/querydsl/src/main/resources/META-INF/persistence.xml @@ -17,7 +17,7 @@ - + org.hibernate.jpa.HibernatePersistenceProvider diff --git a/persistence-modules/querydsl/src/test/java/org/baeldung/dao/PersonDaoIntegrationTest.java b/persistence-modules/querydsl/src/test/java/com/baeldung/dao/PersonDaoIntegrationTest.java similarity index 97% rename from persistence-modules/querydsl/src/test/java/org/baeldung/dao/PersonDaoIntegrationTest.java rename to persistence-modules/querydsl/src/test/java/com/baeldung/dao/PersonDaoIntegrationTest.java index a666aea8da..cf4e9ab872 100644 --- a/persistence-modules/querydsl/src/test/java/org/baeldung/dao/PersonDaoIntegrationTest.java +++ b/persistence-modules/querydsl/src/test/java/com/baeldung/dao/PersonDaoIntegrationTest.java @@ -1,8 +1,8 @@ -package org.baeldung.dao; +package com.baeldung.dao; import java.util.Map; -import org.baeldung.entity.Person; +import com.baeldung.entity.Person; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; diff --git a/persistence-modules/querydsl/src/test/java/org/baeldung/querydsl/intro/QueryDSLIntegrationTest.java b/persistence-modules/querydsl/src/test/java/com/baeldung/querydsl/intro/QueryDSLIntegrationTest.java similarity index 94% rename from persistence-modules/querydsl/src/test/java/org/baeldung/querydsl/intro/QueryDSLIntegrationTest.java rename to persistence-modules/querydsl/src/test/java/com/baeldung/querydsl/intro/QueryDSLIntegrationTest.java index 15a32b8df5..7ae97c2880 100644 --- a/persistence-modules/querydsl/src/test/java/org/baeldung/querydsl/intro/QueryDSLIntegrationTest.java +++ b/persistence-modules/querydsl/src/test/java/com/baeldung/querydsl/intro/QueryDSLIntegrationTest.java @@ -1,17 +1,17 @@ /* * (c) Центр ИТ, 2016. Все права защищены. */ -package org.baeldung.querydsl.intro; +package com.baeldung.querydsl.intro; +import com.baeldung.querydsl.intro.entities.BlogPost; +import com.baeldung.querydsl.intro.entities.QBlogPost; +import com.baeldung.querydsl.intro.entities.QUser; +import com.baeldung.querydsl.intro.entities.User; import com.querydsl.core.Tuple; import com.querydsl.core.types.dsl.Expressions; import com.querydsl.core.types.dsl.NumberPath; import com.querydsl.jpa.JPAExpressions; import com.querydsl.jpa.impl.JPAQueryFactory; -import org.baeldung.querydsl.intro.entities.BlogPost; -import org.baeldung.querydsl.intro.entities.QBlogPost; -import org.baeldung.querydsl.intro.entities.QUser; -import org.baeldung.querydsl.intro.entities.User; import org.junit.*; import javax.persistence.EntityManager; @@ -31,7 +31,7 @@ public class QueryDSLIntegrationTest { @BeforeClass public static void populateDatabase() { - emf = Persistence.createEntityManagerFactory("org.baeldung.querydsl.intro"); + emf = Persistence.createEntityManagerFactory("com.baeldung.querydsl.intro"); EntityManager em = emf.createEntityManager(); em.getTransaction().begin(); diff --git a/persistence-modules/querydsl/src/test/resources/test-context.xml b/persistence-modules/querydsl/src/test/resources/test-context.xml index 13d823a857..1503364320 100644 --- a/persistence-modules/querydsl/src/test/resources/test-context.xml +++ b/persistence-modules/querydsl/src/test/resources/test-context.xml @@ -13,7 +13,7 @@ > - + diff --git a/persistence-modules/r2dbc/pom.xml b/persistence-modules/r2dbc/pom.xml index 2c06931487..55197ad560 100644 --- a/persistence-modules/r2dbc/pom.xml +++ b/persistence-modules/r2dbc/pom.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - org.baeldung.examples.r2dbc + com.baeldung.examples.r2dbc r2dbc-example 0.0.1-SNAPSHOT r2dbc-example diff --git a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/Account.java b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/Account.java similarity index 96% rename from persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/Account.java rename to persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/Account.java index 65bf33168e..0310cd94b6 100644 --- a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/Account.java +++ b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/Account.java @@ -1,4 +1,4 @@ -package org.baeldung.examples.r2dbc; +package com.baeldung.examples.r2dbc; import java.math.BigDecimal; diff --git a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/AccountResource.java b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/AccountResource.java similarity index 87% rename from persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/AccountResource.java rename to persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/AccountResource.java index 90816a7522..5b0d0cded3 100644 --- a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/AccountResource.java +++ b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/AccountResource.java @@ -1,12 +1,8 @@ /** * */ -package org.baeldung.examples.r2dbc; +package com.baeldung.examples.r2dbc; -import java.math.BigDecimal; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; @@ -15,8 +11,6 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; -import io.r2dbc.spi.Connection; -import io.r2dbc.spi.ConnectionFactory; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; diff --git a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/DatasourceConfig.java b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/DatasourceConfig.java similarity index 94% rename from persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/DatasourceConfig.java rename to persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/DatasourceConfig.java index 5b695f39f5..21cc0bc6d3 100644 --- a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/DatasourceConfig.java +++ b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/DatasourceConfig.java @@ -1,16 +1,14 @@ -package org.baeldung.examples.r2dbc; +package com.baeldung.examples.r2dbc; import org.springframework.boot.CommandLineRunner; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.util.StringUtils; import io.netty.util.internal.StringUtil; import io.r2dbc.spi.ConnectionFactories; import io.r2dbc.spi.ConnectionFactory; import io.r2dbc.spi.ConnectionFactoryOptions; import io.r2dbc.spi.ConnectionFactoryOptions.Builder; -import io.r2dbc.spi.Option; import reactor.core.publisher.Flux; import static io.r2dbc.spi.ConnectionFactoryOptions.*; diff --git a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/R2DBCConfigurationProperties.java b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/R2DBCConfigurationProperties.java similarity index 96% rename from persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/R2DBCConfigurationProperties.java rename to persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/R2DBCConfigurationProperties.java index 02733ebed9..b40c7ec2cd 100644 --- a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/R2DBCConfigurationProperties.java +++ b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/R2DBCConfigurationProperties.java @@ -1,4 +1,4 @@ -package org.baeldung.examples.r2dbc; +package com.baeldung.examples.r2dbc; import javax.validation.constraints.NotEmpty; diff --git a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/R2dbcExampleApplication.java b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/R2dbcExampleApplication.java similarity index 92% rename from persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/R2dbcExampleApplication.java rename to persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/R2dbcExampleApplication.java index 1147936e2d..11670a4154 100644 --- a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/R2dbcExampleApplication.java +++ b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/R2dbcExampleApplication.java @@ -1,4 +1,4 @@ -package org.baeldung.examples.r2dbc; +package com.baeldung.examples.r2dbc; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/ReactiveAccountDao.java b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/ReactiveAccountDao.java similarity index 95% rename from persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/ReactiveAccountDao.java rename to persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/ReactiveAccountDao.java index f9717d4b9b..6a7974aeb1 100644 --- a/persistence-modules/r2dbc/src/main/java/org/baeldung/examples/r2dbc/ReactiveAccountDao.java +++ b/persistence-modules/r2dbc/src/main/java/com/baeldung/examples/r2dbc/ReactiveAccountDao.java @@ -1,9 +1,7 @@ -package org.baeldung.examples.r2dbc; +package com.baeldung.examples.r2dbc; import java.math.BigDecimal; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; import io.r2dbc.spi.Connection; diff --git a/persistence-modules/r2dbc/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/persistence-modules/r2dbc/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 55eb5659a7..79d401392c 100644 --- a/persistence-modules/r2dbc/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/persistence-modules/r2dbc/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -1,5 +1,5 @@ {"properties": [{ "name": "r2dbc", - "type": "org.baeldung.examples.r2dbc.R2DBCConfigurationProperties", + "type": "com.baeldung.examples.r2dbc.R2DBCConfigurationProperties", "description": "R2DBC Connection properties" }]} \ No newline at end of file diff --git a/persistence-modules/r2dbc/src/test/java/org/baeldung/examples/r2dbc/R2dbcExampleApplicationTests.java b/persistence-modules/r2dbc/src/test/java/com/baeldung/examples/r2dbc/R2dbcExampleApplicationTests.java similarity index 92% rename from persistence-modules/r2dbc/src/test/java/org/baeldung/examples/r2dbc/R2dbcExampleApplicationTests.java rename to persistence-modules/r2dbc/src/test/java/com/baeldung/examples/r2dbc/R2dbcExampleApplicationTests.java index a1d433847b..3fb9e24a8e 100644 --- a/persistence-modules/r2dbc/src/test/java/org/baeldung/examples/r2dbc/R2dbcExampleApplicationTests.java +++ b/persistence-modules/r2dbc/src/test/java/com/baeldung/examples/r2dbc/R2dbcExampleApplicationTests.java @@ -1,19 +1,15 @@ -package org.baeldung.examples.r2dbc; +package com.baeldung.examples.r2dbc; import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.*; import java.util.List; -import org.hamcrest.core.IsNull; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.CommandLineRunner; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.reactive.server.WebTestClient; diff --git a/persistence-modules/redis/README.md b/persistence-modules/redis/README.md index 21cd048693..668b8d33f8 100644 --- a/persistence-modules/redis/README.md +++ b/persistence-modules/redis/README.md @@ -2,3 +2,4 @@ - [Intro to Jedis – the Java Redis Client Library](http://www.baeldung.com/jedis-java-redis-client-library) - [A Guide to Redis with Redisson](http://www.baeldung.com/redis-redisson) - [Introduction to Lettuce – the Java Redis Client](https://www.baeldung.com/java-redis-lettuce) +- [List All Available Redis Keys](https://www.baeldung.com/redis-list-available-keys) diff --git a/persistence-modules/redis/pom.xml b/persistence-modules/redis/pom.xml index c4a928bb4a..fffcfbb96b 100644 --- a/persistence-modules/redis/pom.xml +++ b/persistence-modules/redis/pom.xml @@ -9,9 +9,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ @@ -38,7 +37,7 @@ - 2.9.0 + 3.2.0 0.6 3.3.0 5.0.1.RELEASE diff --git a/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/client/RedisClient.java b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/client/RedisClient.java new file mode 100644 index 0000000000..72ff42ff74 --- /dev/null +++ b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/client/RedisClient.java @@ -0,0 +1,154 @@ +package com.baeldung.redis_scan.client; + +import com.baeldung.redis_scan.iterator.RedisIterator; +import com.baeldung.redis_scan.strategy.ScanStrategy; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import redis.clients.jedis.Jedis; +import redis.clients.jedis.JedisPool; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.*; + +public class RedisClient { + private static Logger log = LoggerFactory.getLogger(RedisClient.class); + + private static volatile RedisClient instance = null; + + private static JedisPool jedisPool; + + public static RedisClient getInstance(String ip, final int port) { + if (instance == null) { + synchronized (RedisClient.class) { + if (instance == null) { + instance = new RedisClient(ip, port); + } + } + } + return instance; + } + + private RedisClient(String ip, int port) { + try { + if (jedisPool == null) { + jedisPool = new JedisPool(new URI("http://" + ip + ":" + port)); + } + } catch (URISyntaxException e) { + log.error("Malformed server address", e); + } + } + + public Long lpush(final String key, final String[] strings) { + try (Jedis jedis = jedisPool.getResource()) { + return jedis.lpush(key, strings); + } catch (Exception ex) { + log.error("Exception caught in lpush", ex); + } + return null; + } + + public List lrange(final String key, final long start, final long stop) { + try (Jedis jedis = jedisPool.getResource()) { + return jedis.lrange(key, start, stop); + } catch (Exception ex) { + log.error("Exception caught in lrange", ex); + } + return new LinkedList(); + } + + public String hmset(final String key, final Map hash) { + try (Jedis jedis = jedisPool.getResource()) { + return jedis.hmset(key, hash); + } catch (Exception ex) { + log.error("Exception caught in hmset", ex); + } + return null; + } + + public Map hgetAll(final String key) { + try (Jedis jedis = jedisPool.getResource()) { + return jedis.hgetAll(key); + } catch (Exception ex) { + log.error("Exception caught in hgetAll", ex); + } + return new HashMap(); + } + + public Long sadd(final String key, final String... members) { + try (Jedis jedis = jedisPool.getResource()) { + return jedis.sadd(key, members); + } catch (Exception ex) { + log.error("Exception caught in sadd", ex); + } + return null; + } + + public Set smembers(final String key) { + try (Jedis jedis = jedisPool.getResource()) { + return jedis.smembers(key); + } catch (Exception ex) { + log.error("Exception caught in smembers", ex); + } + return new HashSet(); + } + + public Long zadd(final String key, final Map scoreMembers) { + try (Jedis jedis = jedisPool.getResource()) { + return jedis.zadd(key, scoreMembers); + } catch (Exception ex) { + log.error("Exception caught in zadd", ex); + } + return 0L; + } + + public Set zrange(final String key, final long start, final long stop) { + try (Jedis jedis = jedisPool.getResource()) { + return jedis.zrange(key, start, stop); + } catch (Exception ex) { + log.error("Exception caught in zrange", ex); + } + return new HashSet(); + } + + public String mset(final HashMap keysValues) { + try (Jedis jedis = jedisPool.getResource()) { + ArrayList keysValuesArrayList = new ArrayList(); + keysValues.forEach((key, value) -> { + keysValuesArrayList.add(key); + keysValuesArrayList.add(value); + }); + return jedis.mset((keysValuesArrayList.toArray(new String[keysValues.size()]))); + } catch (Exception ex) { + log.error("Exception caught in mset", ex); + } + return null; + } + + public Set keys(final String pattern) { + try (Jedis jedis = jedisPool.getResource()) { + return jedis.keys(pattern); + } catch (Exception ex) { + log.error("Exception caught in keys", ex); + } + return new HashSet(); + } + + public RedisIterator iterator(int initialScanCount, String pattern, ScanStrategy strategy) { + return new RedisIterator(jedisPool, initialScanCount, pattern, strategy); + } + + public void flushAll() { + try (Jedis jedis = jedisPool.getResource()) { + jedis.flushAll(); + } catch (Exception ex) { + log.error("Exception caught in flushAll", ex); + } + } + + public void destroyInstance() { + jedisPool = null; + instance = null; + } + +} diff --git a/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/iterator/RedisIterator.java b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/iterator/RedisIterator.java new file mode 100644 index 0000000000..5fbd798ac2 --- /dev/null +++ b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/iterator/RedisIterator.java @@ -0,0 +1,60 @@ +package com.baeldung.redis_scan.iterator; + +import com.baeldung.redis_scan.strategy.ScanStrategy; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import redis.clients.jedis.Jedis; +import redis.clients.jedis.JedisPool; +import redis.clients.jedis.ScanParams; +import redis.clients.jedis.ScanResult; + +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; + +public class RedisIterator implements Iterator> { + + private static Logger log = LoggerFactory.getLogger(RedisIterator.class); + private static final int DEFAULT_SCAN_COUNT = 10; + + private final JedisPool jedisPool; + private ScanParams scanParams; + private String cursor; + private ScanStrategy strategy; + + public RedisIterator(JedisPool jedisPool, int initialScanCount, String pattern, ScanStrategy strategy) { + super(); + this.jedisPool = jedisPool; + this.scanParams = new ScanParams().match(pattern).count(initialScanCount); + this.strategy = strategy; + } + + public RedisIterator(JedisPool jedisPool, String pattern, ScanStrategy strategy) { + super(); + this.jedisPool = jedisPool; + this.scanParams = new ScanParams().match(pattern).count(DEFAULT_SCAN_COUNT); + this.strategy = strategy; + } + + @Override + public boolean hasNext() { + return !"0".equals(cursor); + } + + @Override + public List next() { + if (cursor == null) { + cursor = "0"; + } + try (Jedis jedis = jedisPool.getResource()) { + ScanResult scanResult = strategy.scan(jedis, cursor, scanParams); + cursor = scanResult.getCursor(); + return scanResult.getResult(); + + } catch (Exception ex) { + log.error("Exception caught in next()", ex); + } + return new LinkedList(); + } + +} diff --git a/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/ScanStrategy.java b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/ScanStrategy.java new file mode 100644 index 0000000000..39d9e44a63 --- /dev/null +++ b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/ScanStrategy.java @@ -0,0 +1,9 @@ +package com.baeldung.redis_scan.strategy; + +import redis.clients.jedis.Jedis; +import redis.clients.jedis.ScanParams; +import redis.clients.jedis.ScanResult; + +public interface ScanStrategy { + ScanResult scan(Jedis jedis, String cursor, ScanParams scanParams); +} diff --git a/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Hscan.java b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Hscan.java new file mode 100644 index 0000000000..fd5ecd14ec --- /dev/null +++ b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Hscan.java @@ -0,0 +1,25 @@ +package com.baeldung.redis_scan.strategy.impl; + +import com.baeldung.redis_scan.strategy.ScanStrategy; +import redis.clients.jedis.Jedis; +import redis.clients.jedis.ScanParams; +import redis.clients.jedis.ScanResult; + +import java.util.Map; +import java.util.Map.Entry; + +public class Hscan implements ScanStrategy> { + + private String key; + + public Hscan(String key) { + super(); + this.key = key; + } + + @Override + public ScanResult> scan(Jedis jedis, String cursor, ScanParams scanParams) { + return jedis.hscan(key, cursor, scanParams); + } + +} diff --git a/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Scan.java b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Scan.java new file mode 100644 index 0000000000..f28b56e34c --- /dev/null +++ b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Scan.java @@ -0,0 +1,14 @@ +package com.baeldung.redis_scan.strategy.impl; + +import com.baeldung.redis_scan.strategy.ScanStrategy; +import redis.clients.jedis.Jedis; +import redis.clients.jedis.ScanParams; +import redis.clients.jedis.ScanResult; + +public class Scan implements ScanStrategy { + + + public ScanResult scan(Jedis jedis, String cursor, ScanParams scanParams) { + return jedis.scan(cursor, scanParams); + } +} diff --git a/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Sscan.java b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Sscan.java new file mode 100644 index 0000000000..ed47f7087e --- /dev/null +++ b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Sscan.java @@ -0,0 +1,29 @@ +package com.baeldung.redis_scan.strategy.impl; + +import com.baeldung.redis_scan.strategy.ScanStrategy; +import redis.clients.jedis.Jedis; +import redis.clients.jedis.ScanParams; +import redis.clients.jedis.ScanResult; + +public class Sscan implements ScanStrategy { + + private String key; + + + public Sscan(String key) { + super(); + this.key = key; + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public ScanResult scan(Jedis jedis, String cursor, ScanParams scanParams) { + return jedis.sscan(key, cursor, scanParams); + } +} diff --git a/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Zscan.java b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Zscan.java new file mode 100644 index 0000000000..bdffc15883 --- /dev/null +++ b/persistence-modules/redis/src/main/java/com/baeldung/redis_scan/strategy/impl/Zscan.java @@ -0,0 +1,25 @@ +package com.baeldung.redis_scan.strategy.impl; + +import com.baeldung.redis_scan.strategy.ScanStrategy; +import redis.clients.jedis.Jedis; +import redis.clients.jedis.ScanParams; +import redis.clients.jedis.ScanResult; +import redis.clients.jedis.Tuple; + +public class Zscan implements ScanStrategy { + + private String key; + + + public Zscan(String key) { + super(); + this.key = key; + } + + + @Override + public ScanResult scan(Jedis jedis, String cursor, ScanParams scanParams) { + return jedis.zscan(key, cursor, scanParams); + } + +} diff --git a/persistence-modules/redis/src/test/java/com/baeldung/redis_scan/NaiveApproachIntegrationTest.java b/persistence-modules/redis/src/test/java/com/baeldung/redis_scan/NaiveApproachIntegrationTest.java new file mode 100644 index 0000000000..9bf0b2b086 --- /dev/null +++ b/persistence-modules/redis/src/test/java/com/baeldung/redis_scan/NaiveApproachIntegrationTest.java @@ -0,0 +1,97 @@ +package com.baeldung.redis_scan; + +import com.baeldung.redis_scan.client.RedisClient; +import org.junit.*; +import redis.embedded.RedisServer; + +import java.io.IOException; +import java.net.ServerSocket; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +public class NaiveApproachIntegrationTest { + private static RedisServer redisServer; + private static int port; + private static RedisClient redisClient; + + @BeforeClass + public static void setUp() throws IOException { + + // Take an available port + ServerSocket s = new ServerSocket(0); + port = s.getLocalPort(); + s.close(); + + redisServer = new RedisServer(port); + } + + @AfterClass + public static void destroy() { + if (redisServer.isActive()) { + redisServer.stop(); + redisClient.destroyInstance(); + } + } + + @Before + public void init() { + if (!redisServer.isActive()) { + redisServer.start(); + } + redisClient = RedisClient.getInstance("127.0.0.1", port); + } + + @After + public void flushAll() { + redisClient.flushAll(); + } + + @Test + public void testKeys() { + HashMap keyValues = new HashMap(); + keyValues.put("balls:cricket", "160"); + keyValues.put("balls:football", "450"); + keyValues.put("balls:volleyball", "270"); + redisClient.mset(keyValues); + Set readKeys = redisClient.keys("ball*"); + Assert.assertEquals(keyValues.size(), readKeys.size()); + + } + + @Test + public void testSmembers() { + HashSet setMembers = new HashSet(); + setMembers.add("cricket_160"); + setMembers.add("football_450"); + setMembers.add("volleyball_270"); + redisClient.sadd("balls", setMembers.toArray(new String[setMembers.size()])); + Set readSetMembers = redisClient.smembers("balls"); + Assert.assertEquals(setMembers.size(), readSetMembers.size()); + } + + @Test + public void testHgetAll() { + HashMap keyValues = new HashMap(); + keyValues.put("balls:cricket", "160"); + keyValues.put("balls:football", "450"); + keyValues.put("balls:volleyball", "270"); + redisClient.hmset("balls", keyValues); + Map readHash = redisClient.hgetAll("balls"); + Assert.assertEquals(keyValues.size(), readHash.size()); + } + + @Test + public void testZRange() { + HashMap scoreMembers = new HashMap(); + scoreMembers.put("cricket", (double) 160); + scoreMembers.put("football", (double) 450); + scoreMembers.put("volleyball", (double) 270); + redisClient.zadd("balls", scoreMembers); + Set readSetMembers = redisClient.zrange("balls", 0, -1); + + Assert.assertEquals(readSetMembers.size(), scoreMembers.size()); + } + +} diff --git a/persistence-modules/redis/src/test/java/com/baeldung/redis_scan/ScanStrategyIntegrationTest.java b/persistence-modules/redis/src/test/java/com/baeldung/redis_scan/ScanStrategyIntegrationTest.java new file mode 100644 index 0000000000..9bde969b58 --- /dev/null +++ b/persistence-modules/redis/src/test/java/com/baeldung/redis_scan/ScanStrategyIntegrationTest.java @@ -0,0 +1,130 @@ +package com.baeldung.redis_scan; + +import com.baeldung.redis_scan.client.RedisClient; +import com.baeldung.redis_scan.iterator.RedisIterator; +import com.baeldung.redis_scan.strategy.ScanStrategy; +import com.baeldung.redis_scan.strategy.impl.Hscan; +import com.baeldung.redis_scan.strategy.impl.Scan; +import com.baeldung.redis_scan.strategy.impl.Sscan; +import com.baeldung.redis_scan.strategy.impl.Zscan; +import org.junit.*; +import redis.clients.jedis.Tuple; +import redis.embedded.RedisServer; + +import java.io.IOException; +import java.net.ServerSocket; +import java.util.*; + + +public class ScanStrategyIntegrationTest { + + private static RedisServer redisServer; + private static int port; + private static RedisClient redisClient; + + @BeforeClass + public static void setUp() throws IOException { + + // Take an available port + ServerSocket s = new ServerSocket(0); + String ip = "127.0.0.1"; + port = s.getLocalPort(); + s.close(); + + redisServer = new RedisServer(port); + } + + @AfterClass + public static void destroy() { + if (redisServer.isActive()) { + redisServer.stop(); + redisClient.destroyInstance(); + } + } + + @Before + public void init() { + if (!redisServer.isActive()) { + redisServer.start(); + } + redisClient = RedisClient.getInstance("127.0.0.1", port); + } + + @After + public void flushAll() { + redisClient.flushAll(); + } + + @Test + public void testScanStrategy() { + HashMap keyValues = new HashMap(); + keyValues.put("balls:cricket", "160"); + keyValues.put("balls:football", "450"); + keyValues.put("balls:volleyball", "270"); + redisClient.mset(keyValues); + + ScanStrategy scanStrategy = new Scan(); + int iterationCount = 2; + RedisIterator iterator = redisClient.iterator(iterationCount, "ball*", scanStrategy); + List results = new LinkedList(); + while (iterator.hasNext()) { + results.addAll(iterator.next()); + } + Assert.assertEquals(keyValues.size(), results.size()); + } + + @Test + public void testSscanStrategy() { + HashSet setMembers = new HashSet(); + setMembers.add("cricket_160"); + setMembers.add("football_450"); + setMembers.add("volleyball_270"); + redisClient.sadd("balls", setMembers.toArray(new String[setMembers.size()])); + + Sscan scanStrategy = new Sscan("balls"); + int iterationCount = 2; + RedisIterator iterator = redisClient.iterator(iterationCount, "*", scanStrategy); + List results = new LinkedList(); + while (iterator.hasNext()) { + results.addAll(iterator.next()); + } + Assert.assertEquals(setMembers.size(), results.size()); + } + + @Test + public void testHscanStrategy() { + HashMap hash = new HashMap(); + hash.put("cricket", "160"); + hash.put("football", "450"); + hash.put("volleyball", "270"); + redisClient.hmset("balls", hash); + + Hscan scanStrategy = new Hscan("balls"); + int iterationCount = 2; + RedisIterator iterator = redisClient.iterator(iterationCount, "*", scanStrategy); + List> results = new LinkedList>(); + while (iterator.hasNext()) { + results.addAll(iterator.next()); + } + Assert.assertEquals(hash.size(), results.size()); + } + + @Test + public void testZscanStrategy() { + HashMap memberScores = new HashMap(); + memberScores.put("cricket", (double) 160); + memberScores.put("football", (double) 450); + memberScores.put("volleyball", (double) 270); + redisClient.zadd("balls", memberScores); + + Zscan scanStrategy = new Zscan("balls"); + int iterationCount = 2; + RedisIterator iterator = redisClient.iterator(iterationCount, "*", scanStrategy); + List results = new LinkedList(); + while (iterator.hasNext()) { + results.addAll(iterator.next()); + } + Assert.assertEquals(memberScores.size(), results.size()); + } + +} diff --git a/persistence-modules/sirix/README.md b/persistence-modules/sirix/README.md index ab7fb65e44..923b111e7a 100644 --- a/persistence-modules/sirix/README.md +++ b/persistence-modules/sirix/README.md @@ -1,4 +1,3 @@ ## Relevant articles: -- [Introduction to Sirix](https://www.baeldung.com/introduction-to-sirix) - [A Guide to SirixDB](https://www.baeldung.com/sirix) diff --git a/persistence-modules/sirix/pom.xml b/persistence-modules/sirix/pom.xml index ccaec79775..d8e065ec2f 100644 --- a/persistence-modules/sirix/pom.xml +++ b/persistence-modules/sirix/pom.xml @@ -30,7 +30,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.0 + ${compiler.plugin.version} ${maven.release.version} ${project.build.sourceEncoding} @@ -39,7 +39,7 @@ org.ow2.asm asm - 6.1 + ${asm.version} @@ -50,6 +50,8 @@ UTF-8 11 0.9.3 + 3.8.0 + 6.1 diff --git a/persistence-modules/solr/pom.xml b/persistence-modules/solr/pom.xml index 5902d42a82..fd993e0c67 100644 --- a/persistence-modules/solr/pom.xml +++ b/persistence-modules/solr/pom.xml @@ -9,9 +9,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ diff --git a/persistence-modules/spring-boot-mysql/pom.xml b/persistence-modules/spring-boot-mysql/pom.xml index e4456b2eaf..9f6ec73522 100644 --- a/persistence-modules/spring-boot-mysql/pom.xml +++ b/persistence-modules/spring-boot-mysql/pom.xml @@ -37,18 +37,7 @@ - - spring-boot-mysql - - - src/main/resources - true - - - - - UTF-8 8.0.12 diff --git a/persistence-modules/spring-boot-jdbi/HELP.md b/persistence-modules/spring-boot-persistence-2/HELP.md similarity index 100% rename from persistence-modules/spring-boot-jdbi/HELP.md rename to persistence-modules/spring-boot-persistence-2/HELP.md diff --git a/persistence-modules/spring-boot-jdbi/README.md b/persistence-modules/spring-boot-persistence-2/README.md similarity index 100% rename from persistence-modules/spring-boot-jdbi/README.md rename to persistence-modules/spring-boot-persistence-2/README.md diff --git a/persistence-modules/spring-boot-jdbi/pom.xml b/persistence-modules/spring-boot-persistence-2/pom.xml similarity index 91% rename from persistence-modules/spring-boot-jdbi/pom.xml rename to persistence-modules/spring-boot-persistence-2/pom.xml index db36185acd..048dd45c7f 100644 --- a/persistence-modules/spring-boot-jdbi/pom.xml +++ b/persistence-modules/spring-boot-persistence-2/pom.xml @@ -3,17 +3,16 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.baeldung.boot.jdbi - spring-boot-jdbi + com.baeldung.boot.persistence + spring-boot-persistence-2 0.0.1-SNAPSHOT spring-boot-jdbi Sample SpringBoot JDBI Project com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../pom.xml @@ -21,7 +20,7 @@ org.springframework.boot spring-boot-dependencies - 2.1.8.RELEASE + ${spring.boot.dependencies} pom import @@ -95,8 +94,8 @@ - 1.8 3.9.1 + 2.1.8.RELEASE diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/JdbiConfiguration.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/JdbiConfiguration.java similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/JdbiConfiguration.java rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/JdbiConfiguration.java diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/SpringBootJdbiApplication.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/SpringBootJdbiApplication.java similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/SpringBootJdbiApplication.java rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/SpringBootJdbiApplication.java diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/dao/CarMakerDao.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/dao/CarMakerDao.java similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/dao/CarMakerDao.java rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/dao/CarMakerDao.java diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/dao/CarModelDao.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/dao/CarModelDao.java similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/dao/CarModelDao.java rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/dao/CarModelDao.java diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/domain/CarMaker.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/domain/CarMaker.java similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/domain/CarMaker.java rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/domain/CarMaker.java diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/domain/CarModel.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/domain/CarModel.java similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/domain/CarModel.java rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/domain/CarModel.java diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/mapper/CarMakerMapper.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/mapper/CarMakerMapper.java similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/mapper/CarMakerMapper.java rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/mapper/CarMakerMapper.java diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/mapper/CarModelMapper.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/mapper/CarModelMapper.java similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/mapper/CarModelMapper.java rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/mapper/CarModelMapper.java diff --git a/persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/service/CarMakerService.java b/persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/service/CarMakerService.java similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/main/java/com/baeldung/boot/jdbi/service/CarMakerService.java rename to persistence-modules/spring-boot-persistence-2/src/main/java/com/baeldung/boot/jdbi/service/CarMakerService.java diff --git a/persistence-modules/spring-boot-jdbi/src/main/resources/application.yml b/persistence-modules/spring-boot-persistence-2/src/main/resources/application.yml similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/main/resources/application.yml rename to persistence-modules/spring-boot-persistence-2/src/main/resources/application.yml diff --git a/persistence-modules/spring-boot-jdbi/src/main/resources/com/baeldung/boot/jdbi/dao/CarMakerDao/findById.sql b/persistence-modules/spring-boot-persistence-2/src/main/resources/com/baeldung/boot/jdbi/dao/CarMakerDao/findById.sql similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/main/resources/com/baeldung/boot/jdbi/dao/CarMakerDao/findById.sql rename to persistence-modules/spring-boot-persistence-2/src/main/resources/com/baeldung/boot/jdbi/dao/CarMakerDao/findById.sql diff --git a/persistence-modules/spring-boot-jdbi/src/main/resources/com/baeldung/boot/jdbi/dao/CarMakerDao/insert.sql b/persistence-modules/spring-boot-persistence-2/src/main/resources/com/baeldung/boot/jdbi/dao/CarMakerDao/insert.sql similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/main/resources/com/baeldung/boot/jdbi/dao/CarMakerDao/insert.sql rename to persistence-modules/spring-boot-persistence-2/src/main/resources/com/baeldung/boot/jdbi/dao/CarMakerDao/insert.sql diff --git a/persistence-modules/spring-boot-jdbi/src/main/resources/com/baeldung/boot/jdbi/dao/CarModelDao/findByMakerIdAndSku.sql b/persistence-modules/spring-boot-persistence-2/src/main/resources/com/baeldung/boot/jdbi/dao/CarModelDao/findByMakerIdAndSku.sql similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/main/resources/com/baeldung/boot/jdbi/dao/CarModelDao/findByMakerIdAndSku.sql rename to persistence-modules/spring-boot-persistence-2/src/main/resources/com/baeldung/boot/jdbi/dao/CarModelDao/findByMakerIdAndSku.sql diff --git a/persistence-modules/spring-boot-jdbi/src/main/resources/com/baeldung/boot/jdbi/dao/CarModelDao/insert.sql b/persistence-modules/spring-boot-persistence-2/src/main/resources/com/baeldung/boot/jdbi/dao/CarModelDao/insert.sql similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/main/resources/com/baeldung/boot/jdbi/dao/CarModelDao/insert.sql rename to persistence-modules/spring-boot-persistence-2/src/main/resources/com/baeldung/boot/jdbi/dao/CarModelDao/insert.sql diff --git a/persistence-modules/spring-boot-jdbi/src/test/java/com/baeldung/boot/jdbi/SpringBootJdbiApplicationUnitTest.java b/persistence-modules/spring-boot-persistence-2/src/test/java/com/baeldung/boot/jdbi/SpringBootJdbiApplicationUnitTest.java similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/test/java/com/baeldung/boot/jdbi/SpringBootJdbiApplicationUnitTest.java rename to persistence-modules/spring-boot-persistence-2/src/test/java/com/baeldung/boot/jdbi/SpringBootJdbiApplicationUnitTest.java diff --git a/persistence-modules/spring-boot-jdbi/src/test/resources/data.sql b/persistence-modules/spring-boot-persistence-2/src/test/resources/data.sql similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/test/resources/data.sql rename to persistence-modules/spring-boot-persistence-2/src/test/resources/data.sql diff --git a/persistence-modules/spring-boot-jdbi/src/test/resources/schema.sql b/persistence-modules/spring-boot-persistence-2/src/test/resources/schema.sql similarity index 100% rename from persistence-modules/spring-boot-jdbi/src/test/resources/schema.sql rename to persistence-modules/spring-boot-persistence-2/src/test/resources/schema.sql diff --git a/persistence-modules/spring-boot-persistence-h2/pom.xml b/persistence-modules/spring-boot-persistence-h2/pom.xml index 9a0a72ba23..5b5e255211 100644 --- a/persistence-modules/spring-boot-persistence-h2/pom.xml +++ b/persistence-modules/spring-boot-persistence-h2/pom.xml @@ -5,7 +5,6 @@ 4.0.0 com.baeldung.h2db spring-boot-persistence-h2 - 0.0.1-SNAPSHOT spring-boot-persistence-h2 jar Demo Spring Boot applications that starts H2 in memory database @@ -32,19 +31,7 @@ - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - UTF-8 - UTF-8 - 1.8 com.baeldung.h2db.demo.server.SpringBootApp 2.0.4.RELEASE diff --git a/persistence-modules/spring-boot-persistence-mongodb/pom.xml b/persistence-modules/spring-boot-persistence-mongodb/pom.xml index da48f066f9..de52a4b2d6 100644 --- a/persistence-modules/spring-boot-persistence-mongodb/pom.xml +++ b/persistence-modules/spring-boot-persistence-mongodb/pom.xml @@ -34,80 +34,6 @@ de.flapdoodle.embed.mongo test - - - org.junit.jupiter - junit-jupiter-api - test - - - org.junit.jupiter - junit-jupiter-engine - test - - - - - org.junit.platform - junit-platform-launcher - ${junit-platform.version} - test - - - org.springframework.boot - spring-boot-starter-test - test - - - spring-boot-persistence-mongodb - - - src/main/resources - true - - - - - org.apache.maven.plugins - maven-war-plugin - - - - - - - autoconfiguration - - - - org.apache.maven.plugins - maven-surefire-plugin - - - integration-test - - test - - - - **/*LiveTest.java - **/*IntegrationTest.java - **/*IntTest.java - - - - - - - json - - - - - - - - - + \ 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 049e7225ac..c58e8dbf86 100644 --- a/persistence-modules/spring-boot-persistence/pom.xml +++ b/persistence-modules/spring-boot-persistence/pom.xml @@ -1,6 +1,7 @@ - + 4.0.0 spring-boot-persistence 0.1.0 @@ -17,17 +18,14 @@ org.springframework.boot spring-boot-starter-web - ${spring-boot.version} org.springframework.boot spring-boot-starter-thymeleaf - ${spring-boot.version} org.springframework.boot spring-boot-starter-data-jpa - ${spring-boot.version} com.zaxxer @@ -38,7 +36,6 @@ org.springframework.boot spring-boot-starter-test - ${spring-boot.version} org.mockito @@ -61,7 +58,6 @@ javax.validation validation-api - ${validation-api.version} org.xerial @@ -70,39 +66,17 @@ org.apache.derby derby - ${derby.version} org.hsqldb hsqldb - ${hsqldb.version} - - spring-boot-persistence - - - src/main/resources - true - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - UTF-8 - 8.0.12 - 9.0.10 2.23.0 2.0.1.Final - 10.13.1.1 - 2.3.4 2.1.7.RELEASE diff --git a/persistence-modules/spring-data-cassandra-reactive/pom.xml b/persistence-modules/spring-data-cassandra-reactive/pom.xml index a57ebbe703..70a5f556e2 100644 --- a/persistence-modules/spring-data-cassandra-reactive/pom.xml +++ b/persistence-modules/spring-data-cassandra-reactive/pom.xml @@ -1,10 +1,8 @@ - + 4.0.0 spring-data-cassandra-reactive - 0.0.1-SNAPSHOT spring-data-cassandra-reactive jar Spring Data Cassandra reactive @@ -20,7 +18,6 @@ org.springframework.data spring-data-cassandra - ${spring-data-cassandra.version} io.projectreactor @@ -54,10 +51,6 @@ - UTF-8 - UTF-8 - - 2.1.2.RELEASE 3.11.2.0 diff --git a/persistence-modules/spring-data-cassandra/README.md b/persistence-modules/spring-data-cassandra/README.md index 456eefcf18..9c6745470b 100644 --- a/persistence-modules/spring-data-cassandra/README.md +++ b/persistence-modules/spring-data-cassandra/README.md @@ -1,8 +1,8 @@ ## Spring Data Cassandra ### Relevant Articles: -- [Introduction to Spring Data Cassandra](http://www.baeldung.com/spring-data-cassandra-tutorial) -- [Using the CassandraTemplate from Spring Data](http://www.baeldung.com/spring-data-cassandratemplate-cqltemplate) +- [Introduction to Spring Data Cassandra](https://www.baeldung.com/spring-data-cassandra-tutorial) +- [Using the CassandraTemplate from Spring Data](https://www.baeldung.com/spring-data-cassandratemplate-cqltemplate) ### Build the Project with Tests Running ``` diff --git a/persistence-modules/spring-data-cassandra/pom.xml b/persistence-modules/spring-data-cassandra/pom.xml index 9ea39f3f55..0f0aae4ebf 100644 --- a/persistence-modules/spring-data-cassandra/pom.xml +++ b/persistence-modules/spring-data-cassandra/pom.xml @@ -3,7 +3,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-data-cassandra - 0.0.1-SNAPSHOT spring-data-cassandra jar @@ -80,7 +79,6 @@ 2.1.9.2 2.1.9.2 2.0-0 - 19.0 diff --git a/persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/config/CassandraConfig.java b/persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/config/CassandraConfig.java similarity index 94% rename from persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/config/CassandraConfig.java rename to persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/config/CassandraConfig.java index 2edd5551a5..3614c2a9f6 100644 --- a/persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/config/CassandraConfig.java +++ b/persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/config/CassandraConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.spring.data.cassandra.config; +package com.baeldung.spring.data.cassandra.config; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -15,7 +15,7 @@ import org.springframework.data.cassandra.repository.config.EnableCassandraRepos @Configuration @PropertySource(value = { "classpath:cassandra.properties" }) -@EnableCassandraRepositories(basePackages = "org.baeldung.spring.data.cassandra.repository") +@EnableCassandraRepositories(basePackages = "com.baeldung.spring.data.cassandra.repository") public class CassandraConfig extends AbstractCassandraConfiguration { private static final Log LOGGER = LogFactory.getLog(CassandraConfig.class); diff --git a/persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/model/Book.java b/persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/model/Book.java similarity index 97% rename from persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/model/Book.java rename to persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/model/Book.java index a8ec81d6b5..d347a36184 100644 --- a/persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/model/Book.java +++ b/persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/model/Book.java @@ -1,4 +1,4 @@ -package org.baeldung.spring.data.cassandra.model; +package com.baeldung.spring.data.cassandra.model; import java.util.HashSet; import java.util.Set; diff --git a/persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/repository/BookRepository.java b/persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/repository/BookRepository.java similarity index 79% rename from persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/repository/BookRepository.java rename to persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/repository/BookRepository.java index 66d656ac3a..ad144f3125 100644 --- a/persistence-modules/spring-data-cassandra/src/main/java/org/baeldung/spring/data/cassandra/repository/BookRepository.java +++ b/persistence-modules/spring-data-cassandra/src/main/java/com/baeldung/spring/data/cassandra/repository/BookRepository.java @@ -1,6 +1,6 @@ -package org.baeldung.spring.data.cassandra.repository; +package com.baeldung.spring.data.cassandra.repository; -import org.baeldung.spring.data.cassandra.model.Book; +import com.baeldung.spring.data.cassandra.model.Book; import org.springframework.data.cassandra.repository.CassandraRepository; import org.springframework.data.cassandra.repository.Query; import org.springframework.stereotype.Repository; diff --git a/persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/SpringContextTest.java b/persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/SpringContextTest.java similarity index 94% rename from persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/SpringContextTest.java rename to persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/SpringContextTest.java index 89e729da86..22bd5c6551 100644 --- a/persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/SpringContextTest.java +++ b/persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/SpringContextTest.java @@ -1,12 +1,12 @@ -package org.baeldung; +package com.baeldung; import java.io.IOException; import java.util.HashMap; import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.thrift.transport.TTransportException; -import org.baeldung.spring.data.cassandra.config.CassandraConfig; -import org.baeldung.spring.data.cassandra.model.Book; +import com.baeldung.spring.data.cassandra.config.CassandraConfig; +import com.baeldung.spring.data.cassandra.model.Book; import org.cassandraunit.utils.EmbeddedCassandraServerHelper; import org.junit.After; import org.junit.AfterClass; diff --git a/persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/BookRepositoryIntegrationTest.java b/persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/BookRepositoryIntegrationTest.java similarity index 96% rename from persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/BookRepositoryIntegrationTest.java rename to persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/BookRepositoryIntegrationTest.java index 8cbcdc3195..55e968d6f2 100644 --- a/persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/BookRepositoryIntegrationTest.java +++ b/persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/BookRepositoryIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.spring.data.cassandra.repository; +package com.baeldung.spring.data.cassandra.repository; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; @@ -6,12 +6,12 @@ import static org.junit.Assert.assertNotEquals; import java.io.IOException; import java.util.HashMap; +import com.baeldung.spring.data.cassandra.model.Book; import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.thrift.transport.TTransportException; -import org.baeldung.spring.data.cassandra.config.CassandraConfig; -import org.baeldung.spring.data.cassandra.model.Book; +import com.baeldung.spring.data.cassandra.config.CassandraConfig; import org.cassandraunit.utils.EmbeddedCassandraServerHelper; import org.junit.After; import org.junit.AfterClass; diff --git a/persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/CassandraTemplateIntegrationTest.java b/persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/CassandraTemplateIntegrationTest.java similarity index 97% rename from persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/CassandraTemplateIntegrationTest.java rename to persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/CassandraTemplateIntegrationTest.java index e331ac3cd4..90ae68ba98 100644 --- a/persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/CassandraTemplateIntegrationTest.java +++ b/persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/CassandraTemplateIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.spring.data.cassandra.repository; +package com.baeldung.spring.data.cassandra.repository; import static junit.framework.TestCase.assertNull; import static org.hamcrest.CoreMatchers.is; @@ -10,12 +10,12 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import com.baeldung.spring.data.cassandra.config.CassandraConfig; +import com.baeldung.spring.data.cassandra.model.Book; import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.thrift.transport.TTransportException; -import org.baeldung.spring.data.cassandra.config.CassandraConfig; -import org.baeldung.spring.data.cassandra.model.Book; import org.cassandraunit.utils.EmbeddedCassandraServerHelper; import org.junit.After; import org.junit.AfterClass; diff --git a/persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/CqlQueriesIntegrationTest.java b/persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/CqlQueriesIntegrationTest.java similarity index 96% rename from persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/CqlQueriesIntegrationTest.java rename to persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/CqlQueriesIntegrationTest.java index f7e42ae23b..f948218807 100644 --- a/persistence-modules/spring-data-cassandra/src/test/java/org/baeldung/spring/data/cassandra/repository/CqlQueriesIntegrationTest.java +++ b/persistence-modules/spring-data-cassandra/src/test/java/com/baeldung/spring/data/cassandra/repository/CqlQueriesIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.spring.data.cassandra.repository; +package com.baeldung.spring.data.cassandra.repository; import static junit.framework.TestCase.assertEquals; @@ -12,8 +12,8 @@ import org.apache.cassandra.exceptions.ConfigurationException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.thrift.transport.TTransportException; -import org.baeldung.spring.data.cassandra.config.CassandraConfig; -import org.baeldung.spring.data.cassandra.model.Book; +import com.baeldung.spring.data.cassandra.config.CassandraConfig; +import com.baeldung.spring.data.cassandra.model.Book; import org.cassandraunit.utils.EmbeddedCassandraServerHelper; import org.junit.After; import org.junit.AfterClass; diff --git a/persistence-modules/spring-data-couchbase-2/pom.xml b/persistence-modules/spring-data-couchbase-2/pom.xml index 56456fc04b..484561ddaa 100644 --- a/persistence-modules/spring-data-couchbase-2/pom.xml +++ b/persistence-modules/spring-data-couchbase-2/pom.xml @@ -11,9 +11,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ diff --git a/persistence-modules/spring-data-dynamodb/pom.xml b/persistence-modules/spring-data-dynamodb/pom.xml index 871f99125a..fceceb40ba 100644 --- a/persistence-modules/spring-data-dynamodb/pom.xml +++ b/persistence-modules/spring-data-dynamodb/pom.xml @@ -138,19 +138,7 @@ - spring-data-dynamodb - - - src/main/resources - true - - - - - org.apache.maven.plugins - maven-war-plugin - org.apache.maven.plugins maven-dependency-plugin diff --git a/persistence-modules/spring-data-eclipselink/pom.xml b/persistence-modules/spring-data-eclipselink/pom.xml index bb596d4a8a..4ae43de07a 100644 --- a/persistence-modules/spring-data-eclipselink/pom.xml +++ b/persistence-modules/spring-data-eclipselink/pom.xml @@ -7,9 +7,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ diff --git a/persistence-modules/spring-data-elasticsearch/pom.xml b/persistence-modules/spring-data-elasticsearch/pom.xml index ccd2f94e59..3446528323 100644 --- a/persistence-modules/spring-data-elasticsearch/pom.xml +++ b/persistence-modules/spring-data-elasticsearch/pom.xml @@ -2,7 +2,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-data-elasticsearch - 0.0.1-SNAPSHOT spring-data-elasticsearch jar @@ -89,8 +88,6 @@ - 1.8 - 1.8 3.0.8.RELEASE 4.5.2 5.6.0 diff --git a/persistence-modules/spring-data-gemfire/pom.xml b/persistence-modules/spring-data-gemfire/pom.xml index 6bd689192c..a0cc4d5360 100644 --- a/persistence-modules/spring-data-gemfire/pom.xml +++ b/persistence-modules/spring-data-gemfire/pom.xml @@ -8,9 +8,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ diff --git a/persistence-modules/spring-data-geode/pom.xml b/persistence-modules/spring-data-geode/pom.xml index 2a9cbe35e9..557d09376a 100644 --- a/persistence-modules/spring-data-geode/pom.xml +++ b/persistence-modules/spring-data-geode/pom.xml @@ -9,16 +9,15 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ org.springframework.boot spring-boot-starter - 2.1.9.RELEASE + ${spring.boot.starter.version} org.springframework.boot @@ -89,6 +88,7 @@ UTF-8 com.baeldung.springdatageode.app.ClientCacheApp 1.1.1.RELEASE + 2.1.9.RELEASE \ No newline at end of file diff --git a/persistence-modules/spring-data-jpa-3/pom.xml b/persistence-modules/spring-data-jpa-3/pom.xml index 8a949b3008..d02d089ba3 100644 --- a/persistence-modules/spring-data-jpa-3/pom.xml +++ b/persistence-modules/spring-data-jpa-3/pom.xml @@ -52,34 +52,6 @@ runtime - - - org.springframework.boot - spring-boot-starter-test - test - - - junit - junit - - - - - org.junit.jupiter - junit-jupiter-api - test - - - org.junit.jupiter - junit-jupiter-engine - test - - - org.junit.platform - junit-platform-launcher - test - - org.testcontainers @@ -94,9 +66,6 @@ 1.4.1 21.0 1.12.2 - 42.2.8 - 1.12.2 - 1.4.200 diff --git a/persistence-modules/spring-data-jpa-3/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java b/persistence-modules/spring-data-jpa-3/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java index 17ee6a94ba..b2581b8034 100644 --- a/persistence-modules/spring-data-jpa-3/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java +++ b/persistence-modules/spring-data-jpa-3/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java @@ -266,7 +266,7 @@ public class UserRepositoryCommon { userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS)); userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS)); - List usersSortByName = userRepository.findAll(new Sort(Sort.Direction.ASC, "name")); + List usersSortByName = userRepository.findAll(Sort.by(Sort.Direction.ASC, "name")); assertThat(usersSortByName.get(0) .getName()).isEqualTo(USER_NAME_ADAM); @@ -278,7 +278,7 @@ public class UserRepositoryCommon { userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS)); userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS)); - userRepository.findAll(new Sort(Sort.Direction.ASC, "name")); + userRepository.findAll(Sort.by(Sort.Direction.ASC, "name")); List usersSortByNameLength = userRepository.findAll(Sort.by("LENGTH(name)")); diff --git a/persistence-modules/spring-data-jpa-4/README.md b/persistence-modules/spring-data-jpa-4/README.md index 63aec5c46b..42e4619a59 100644 --- a/persistence-modules/spring-data-jpa-4/README.md +++ b/persistence-modules/spring-data-jpa-4/README.md @@ -3,6 +3,8 @@ - [LIKE Queries in Spring JPA Repositories](https://www.baeldung.com/spring-jpa-like-queries) - [A Guide to Spring’s Open Session In View](https://www.baeldung.com/spring-open-session-in-view) - [Programmatic Transaction Management in Spring](https://www.baeldung.com/spring-programmatic-transaction-management) +- [JPA Entity Lifecycle Events](https://www.baeldung.com/jpa-entity-lifecycle-events) +- [Working with Lazy Element Collections in JPA](https://www.baeldung.com/java-jpa-lazy-collections) ### Eclipse Config After importing the project into Eclipse, you may see the following error: diff --git a/persistence-modules/spring-data-jpa-4/pom.xml b/persistence-modules/spring-data-jpa-4/pom.xml index 44b7c3c268..e0b441231e 100644 --- a/persistence-modules/spring-data-jpa-4/pom.xml +++ b/persistence-modules/spring-data-jpa-4/pom.xml @@ -27,12 +27,6 @@ com.h2database h2 - - - org.springframework.boot - spring-boot-starter-test - test - \ No newline at end of file diff --git a/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/ElementCollectionApplication.java b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/ElementCollectionApplication.java new file mode 100644 index 0000000000..3f152a6ffc --- /dev/null +++ b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/ElementCollectionApplication.java @@ -0,0 +1,11 @@ +package com.baeldung.elementcollection; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class ElementCollectionApplication { + public static void main(String[] args) { + SpringApplication.run(ElementCollectionApplication.class, args); + } +} diff --git a/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/model/Employee.java b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/model/Employee.java new file mode 100644 index 0000000000..8b98164d63 --- /dev/null +++ b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/model/Employee.java @@ -0,0 +1,68 @@ +package com.baeldung.elementcollection.model; + +import javax.persistence.*; +import java.util.List; +import java.util.Objects; + +@Entity +public class Employee { + @Id + private int id; + private String name; + @ElementCollection + @CollectionTable(name = "employee_phone", joinColumns = @JoinColumn(name = "employee_id")) + private List phones; + + public Employee() { + } + + public Employee(int id) { + this.id = id; + } + + public Employee(int id, String name) { + this.id = id; + this.name = name; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public List getPhones() { + return phones; + } + + public void setPhones(List phones) { + this.phones = phones; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Employee)) { + return false; + } + Employee user = (Employee) o; + return getId() == user.getId(); + } + + @Override + public int hashCode() { + return Objects.hash(getId()); + } +} diff --git a/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/model/Phone.java b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/model/Phone.java new file mode 100644 index 0000000000..d73d30c47a --- /dev/null +++ b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/model/Phone.java @@ -0,0 +1,62 @@ +package com.baeldung.elementcollection.model; + +import javax.persistence.Embeddable; +import java.util.Objects; + +@Embeddable +public class Phone { + private String type; + private String areaCode; + private String number; + + public Phone() { + } + + public Phone(String type, String areaCode, String number) { + this.type = type; + this.areaCode = areaCode; + this.number = number; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getAreaCode() { + return areaCode; + } + + public void setAreaCode(String areaCode) { + this.areaCode = areaCode; + } + + public String getNumber() { + return number; + } + + public void setNumber(String number) { + this.number = number; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Phone)) { + return false; + } + Phone phone = (Phone) o; + return getType().equals(phone.getType()) && getAreaCode().equals(phone.getAreaCode()) + && getNumber().equals(phone.getNumber()); + } + + @Override + public int hashCode() { + return Objects.hash(getType(), getAreaCode(), getNumber()); + } +} diff --git a/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/repository/EmployeeRepository.java b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/repository/EmployeeRepository.java new file mode 100644 index 0000000000..49180c35eb --- /dev/null +++ b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/elementcollection/repository/EmployeeRepository.java @@ -0,0 +1,46 @@ +package com.baeldung.elementcollection.repository; + +import com.baeldung.elementcollection.model.Employee; +import org.springframework.stereotype.Repository; +import org.springframework.transaction.annotation.Transactional; + +import javax.persistence.EntityGraph; +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; +import java.util.HashMap; +import java.util.Map; + +@Repository +public class EmployeeRepository { + + @PersistenceContext + private EntityManager em; + + @Transactional + public void save(Employee employee) { + em.persist(employee); + } + + @Transactional + public void remove(int id) { + Employee employee = findById(id); + em.remove(employee); + } + + public Employee findById(int id) { + return em.find(Employee.class, id); + } + + public Employee findByJPQL(int id) { + return em.createQuery("SELECT u FROM Employee AS u JOIN FETCH u.phones WHERE u.id=:id", Employee.class) + .setParameter("id", id).getSingleResult(); + } + + public Employee findByEntityGraph(int id) { + EntityGraph entityGraph = em.createEntityGraph(Employee.class); + entityGraph.addAttributeNodes("name", "phones"); + Map properties = new HashMap<>(); + properties.put("javax.persistence.fetchgraph", entityGraph); + return em.find(Employee.class, id, properties); + } +} diff --git a/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/SpringBootLifecycleEventApplication.java b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/SpringBootLifecycleEventApplication.java new file mode 100644 index 0000000000..fbc861c5fe --- /dev/null +++ b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/SpringBootLifecycleEventApplication.java @@ -0,0 +1,11 @@ +package com.baeldung.lifecycleevents; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class SpringBootLifecycleEventApplication { + public static void main(String[] args) { + SpringApplication.run(SpringBootLifecycleEventApplication.class, args); + } +} diff --git a/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/model/AuditTrailListener.java b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/model/AuditTrailListener.java new file mode 100644 index 0000000000..26ebff42e4 --- /dev/null +++ b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/model/AuditTrailListener.java @@ -0,0 +1,39 @@ +package com.baeldung.lifecycleevents.model; + +import javax.persistence.PostLoad; +import javax.persistence.PostPersist; +import javax.persistence.PostRemove; +import javax.persistence.PostUpdate; +import javax.persistence.PrePersist; +import javax.persistence.PreRemove; +import javax.persistence.PreUpdate; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class AuditTrailListener { + private static Log log = LogFactory.getLog(AuditTrailListener.class); + + @PrePersist + @PreUpdate + @PreRemove + private void beforeAnyUpdate(User user) { + if (user.getId() == 0) { + log.info("[USER AUDIT] About to add a user"); + } else { + log.info("[USER AUDIT] About to update/delete user: " + user.getId()); + } + } + + @PostPersist + @PostUpdate + @PostRemove + private void afterAnyUpdate(User user) { + log.info("[USER AUDIT] add/update/delete complete for user: " + user.getId()); + } + + @PostLoad + private void afterLoad(User user) { + log.info("[USER AUDIT] user loaded from database: " + user.getId()); + } +} diff --git a/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/model/User.java b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/model/User.java new file mode 100644 index 0000000000..a080cb3bf2 --- /dev/null +++ b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/model/User.java @@ -0,0 +1,104 @@ +package com.baeldung.lifecycleevents.model; + +import javax.persistence.Entity; +import javax.persistence.EntityListeners; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.PostLoad; +import javax.persistence.PostPersist; +import javax.persistence.PostRemove; +import javax.persistence.PostUpdate; +import javax.persistence.PrePersist; +import javax.persistence.PreRemove; +import javax.persistence.PreUpdate; +import javax.persistence.Transient; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +@Entity +@EntityListeners(AuditTrailListener.class) +public class User { + private static Log log = LogFactory.getLog(User.class); + + @Id + @GeneratedValue + private int id; + + private String userName; + private String firstName; + private String lastName; + @Transient + private String fullName; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getFullName() { + return fullName; + } + + @PrePersist + public void logNewUserAttempt() { + log.info("Attempting to add new user with username: " + userName); + } + + @PostPersist + public void logNewUserAdded() { + log.info("Added user '" + userName + "' with ID: " + id); + } + + @PreRemove + public void logUserRemovalAttempt() { + log.info("Attempting to delete user: " + userName); + } + + @PostRemove + public void logUserRemoval() { + log.info("Deleted user: " + userName); + } + + @PreUpdate + public void logUserUpdateAttempt() { + log.info("Attempting to update user: " + userName); + } + + @PostUpdate + public void logUserUpdate() { + log.info("Updated user: " + userName); + } + + @PostLoad + public void logUserLoad() { + fullName = firstName + " " + lastName; + } +} diff --git a/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/repository/UserRepository.java b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/repository/UserRepository.java new file mode 100644 index 0000000000..af14117ebb --- /dev/null +++ b/persistence-modules/spring-data-jpa-4/src/main/java/com/baeldung/lifecycleevents/repository/UserRepository.java @@ -0,0 +1,9 @@ +package com.baeldung.lifecycleevents.repository; + +import org.springframework.data.jpa.repository.JpaRepository; + +import com.baeldung.lifecycleevents.model.User; + +public interface UserRepository extends JpaRepository { + public User findByUserName(String userName); +} diff --git a/persistence-modules/spring-data-jpa-4/src/test/java/com/baeldung/elementcollection/ElementCollectionIntegrationTest.java b/persistence-modules/spring-data-jpa-4/src/test/java/com/baeldung/elementcollection/ElementCollectionIntegrationTest.java new file mode 100644 index 0000000000..306798aa68 --- /dev/null +++ b/persistence-modules/spring-data-jpa-4/src/test/java/com/baeldung/elementcollection/ElementCollectionIntegrationTest.java @@ -0,0 +1,64 @@ +package com.baeldung.elementcollection; + +import com.baeldung.elementcollection.model.Employee; +import com.baeldung.elementcollection.model.Phone; +import com.baeldung.elementcollection.repository.EmployeeRepository; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; + +import static org.hamcrest.core.Is.is; +import static org.junit.Assert.assertThat; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = ElementCollectionApplication.class) +public class ElementCollectionIntegrationTest { + + @Autowired + private EmployeeRepository employeeRepository; + + @Before + public void init() { + Employee employee = new Employee(1, "Fred"); + employee.setPhones( + Arrays.asList(new Phone("work", "+55", "99999-9999"), new Phone("home", "+55", "98888-8888"))); + employeeRepository.save(employee); + } + + @After + public void clean() { + employeeRepository.remove(1); + } + + @Test(expected = org.hibernate.LazyInitializationException.class) + public void whenAccessLazyCollection_thenThrowLazyInitializationException() { + Employee employee = employeeRepository.findById(1); + assertThat(employee.getPhones().size(), is(2)); + } + + @Test + public void whenUseJPAQL_thenFetchResult() { + Employee employee = employeeRepository.findByJPQL(1); + assertThat(employee.getPhones().size(), is(2)); + } + + @Test + public void whenUseEntityGraph_thenFetchResult() { + Employee employee = employeeRepository.findByEntityGraph(1); + assertThat(employee.getPhones().size(), is(2)); + } + + @Test + @Transactional + public void whenUseTransaction_thenFetchResult() { + Employee employee = employeeRepository.findById(1); + assertThat(employee.getPhones().size(), is(2)); + } +} diff --git a/persistence-modules/spring-data-jpa-4/src/test/java/lifecycleevents/UserRepositoryIntegrationTest.java b/persistence-modules/spring-data-jpa-4/src/test/java/lifecycleevents/UserRepositoryIntegrationTest.java new file mode 100644 index 0000000000..078f437474 --- /dev/null +++ b/persistence-modules/spring-data-jpa-4/src/test/java/lifecycleevents/UserRepositoryIntegrationTest.java @@ -0,0 +1,80 @@ +package lifecycleevents; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +import com.baeldung.lifecycleevents.SpringBootLifecycleEventApplication; +import com.baeldung.lifecycleevents.model.User; +import com.baeldung.lifecycleevents.repository.UserRepository; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = SpringBootLifecycleEventApplication.class) +public class UserRepositoryIntegrationTest { + + @Autowired + private UserRepository userRepository; + + @Before + public void setup() { + User user = new User(); + user.setFirstName("Jane"); + user.setLastName("Smith"); + user.setUserName("jsmith123"); + userRepository.save(user); + } + + @After + public void cleanup() { + userRepository.deleteAll(); + } + + @Test + public void whenNewUserProvided_userIsAdded() { + User user = new User(); + user.setFirstName("John"); + user.setLastName("Doe"); + user.setUserName("jdoe123"); + user = userRepository.save(user); + assertTrue(user.getId() > 0); + } + + @Test + public void whenUserNameProvided_userIsLoaded() { + User user = userRepository.findByUserName("jsmith123"); + assertNotNull(user); + assertEquals("jsmith123", user.getUserName()); + } + + @Test + public void whenExistingUserProvided_userIsUpdated() { + User user = userRepository.findByUserName("jsmith123"); + user.setFirstName("Joe"); + user = userRepository.save(user); + assertEquals("Joe", user.getFirstName()); + } + + @Test + public void whenExistingUserDeleted_userIsDeleted() { + User user = userRepository.findByUserName("jsmith123"); + userRepository.delete(user); + user = userRepository.findByUserName("jsmith123"); + assertNull(user); + } + + @Test + public void whenExistingUserLoaded_fullNameIsAvailable() { + String expectedFullName = "Jane Smith"; + User user = userRepository.findByUserName("jsmith123"); + assertEquals(expectedFullName, user.getFullName()); + } +} diff --git a/persistence-modules/spring-data-jpa/pom.xml b/persistence-modules/spring-data-jpa/pom.xml index 27b8ce5eaf..ddd7e17dcd 100644 --- a/persistence-modules/spring-data-jpa/pom.xml +++ b/persistence-modules/spring-data-jpa/pom.xml @@ -1,7 +1,6 @@ - + 4.0.0 spring-data-jpa spring-data-jpa @@ -43,7 +42,6 @@ org.postgresql postgresql - ${postgresql.version} @@ -67,26 +65,6 @@ guava ${guava.version} - - - - org.junit.jupiter - junit-jupiter-api - test - - - org.junit.jupiter - junit-jupiter-engine - test - - - - - org.junit.platform - junit-platform-launcher - ${junit-platform.version} - test - diff --git a/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java index 17ee6a94ba..b2581b8034 100644 --- a/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java +++ b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java @@ -266,7 +266,7 @@ public class UserRepositoryCommon { userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS)); userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS)); - List usersSortByName = userRepository.findAll(new Sort(Sort.Direction.ASC, "name")); + List usersSortByName = userRepository.findAll(Sort.by(Sort.Direction.ASC, "name")); assertThat(usersSortByName.get(0) .getName()).isEqualTo(USER_NAME_ADAM); @@ -278,7 +278,7 @@ public class UserRepositoryCommon { userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS)); userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS)); - userRepository.findAll(new Sort(Sort.Direction.ASC, "name")); + userRepository.findAll(Sort.by(Sort.Direction.ASC, "name")); List usersSortByNameLength = userRepository.findAll(Sort.by("LENGTH(name)")); diff --git a/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java b/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java index 3eb1d0f66a..fe3c332f33 100644 --- a/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java +++ b/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java @@ -49,7 +49,7 @@ public class EmployeeServicesWithKeyValueTemplate implements EmployeeService { @Override public Iterable getSortedListOfEmployeesBySalary() { KeyValueQuery query = new KeyValueQuery(); - query.setSort(new Sort(Sort.Direction.DESC, "salary")); + query.setSort(Sort.by(Sort.Direction.DESC, "salary")); return keyValueTemplate.find(query, Employee.class); } diff --git a/persistence-modules/spring-data-neo4j/pom.xml b/persistence-modules/spring-data-neo4j/pom.xml index 625e2c5fc1..d827c32a3c 100644 --- a/persistence-modules/spring-data-neo4j/pom.xml +++ b/persistence-modules/spring-data-neo4j/pom.xml @@ -8,9 +8,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ diff --git a/persistence-modules/spring-data-redis/pom.xml b/persistence-modules/spring-data-redis/pom.xml index a304108fee..d2bf074d03 100644 --- a/persistence-modules/spring-data-redis/pom.xml +++ b/persistence-modules/spring-data-redis/pom.xml @@ -4,7 +4,7 @@ 4.0.0 spring-data-redis 1.0 - spring-data-redis + spring-data-redis jar @@ -62,7 +62,6 @@ redis.clients jedis - ${jedis.version} jar @@ -97,10 +96,9 @@ 3.2.4 - 2.9.0 0.10.0 - 2.0.3.RELEASE 0.6 + 2.1.9.RELEASE diff --git a/persistence-modules/spring-data-solr/pom.xml b/persistence-modules/spring-data-solr/pom.xml index 1a17a2e321..9d96c75082 100644 --- a/persistence-modules/spring-data-solr/pom.xml +++ b/persistence-modules/spring-data-solr/pom.xml @@ -3,7 +3,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-data-solr - 0.0.1-SNAPSHOT spring-data-solr jar diff --git a/persistence-modules/spring-hibernate-3/pom.xml b/persistence-modules/spring-hibernate-3/pom.xml index e677776a95..b28895f86d 100644 --- a/persistence-modules/spring-hibernate-3/pom.xml +++ b/persistence-modules/spring-hibernate-3/pom.xml @@ -8,9 +8,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ @@ -73,16 +72,6 @@ - - spring-hibernate-3 - - - src/main/resources - true - - - - 4.3.4.RELEASE diff --git a/persistence-modules/spring-hibernate-5/pom.xml b/persistence-modules/spring-hibernate-5/pom.xml index 546dcb1ce0..8a8b6c15e3 100644 --- a/persistence-modules/spring-hibernate-5/pom.xml +++ b/persistence-modules/spring-hibernate-5/pom.xml @@ -8,9 +8,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ @@ -125,16 +124,6 @@ - - spring-hibernate-5 - - - src/main/resources - true - - - - 5.0.2.RELEASE diff --git a/persistence-modules/spring-hibernate4/pom.xml b/persistence-modules/spring-hibernate4/pom.xml index 41c7fdb098..5e931d5cff 100644 --- a/persistence-modules/spring-hibernate4/pom.xml +++ b/persistence-modules/spring-hibernate4/pom.xml @@ -136,16 +136,6 @@ - - spring-hibernate4 - - - src/main/resources - true - - - - 4.3.4.RELEASE @@ -166,15 +156,6 @@ 19.0 - - 4.4.1 - 4.5 - - 2.9.0 - - - 2.7 - diff --git a/persistence-modules/spring-jpa/pom.xml b/persistence-modules/spring-jpa/pom.xml index 4972a20cf6..ef05269c92 100644 --- a/persistence-modules/spring-jpa/pom.xml +++ b/persistence-modules/spring-jpa/pom.xml @@ -9,9 +9,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ @@ -129,27 +128,6 @@ - - spring-jpa - - - src/main/resources - true - - - - - org.apache.maven.plugins - maven-war-plugin - ${maven-war-plugin.version} - - src/main/webapp - false - - - - - 5.1.5.RELEASE diff --git a/persistence-modules/spring-persistence-simple/pom.xml b/persistence-modules/spring-persistence-simple/pom.xml index 3ecb9c3d7d..8a03310048 100644 --- a/persistence-modules/spring-persistence-simple/pom.xml +++ b/persistence-modules/spring-persistence-simple/pom.xml @@ -8,9 +8,8 @@ com.baeldung - parent-modules + persistence-modules 1.0.0-SNAPSHOT - ../../ @@ -106,13 +105,6 @@ - spring-persistence-simple - - - src/main/resources - true - - com.mysema.maven diff --git a/podman/README.md b/podman/README.md new file mode 100644 index 0000000000..3102036f04 --- /dev/null +++ b/podman/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [An Introduction to Podman](https://www.baeldung.com/podman-intro) diff --git a/pom.xml b/pom.xml index e641aebe7d..ca5331b287 100644 --- a/pom.xml +++ b/pom.xml @@ -412,6 +412,7 @@ disruptor dozer drools + dropwizard dubbo ethereum @@ -447,6 +448,7 @@ immutables jackson-modules + jackson-simple java-blockchain java-collections-conversions @@ -536,6 +538,7 @@ netflix-modules ninja + open-liberty oauth2-framework-impl optaplanner @@ -550,7 +553,7 @@ protobuffer quarkus - + quarkus-extension rabbitmq @@ -635,50 +638,10 @@ spring-batch spring-bom - - spring-boot - spring-boot-admin - spring-boot-angular - spring-boot-artifacts - spring-boot-autoconfiguration - spring-boot-bootstrap - spring-boot-camel - - spring-boot-client - spring-boot-config-jpa-error - spring-boot-crud - spring-boot-ctx-fluent - spring-boot-custom-starter - spring-boot-data - spring-boot-deployment - spring-boot-di - spring-boot-environment - spring-boot-flowable - - spring-boot-jasypt - spring-boot-keycloak - spring-boot-kotlin - spring-boot-libraries - spring-boot-logging-log4j2 - spring-boot-mvc - spring-boot-mvc-2 - spring-boot-mvc-birt - spring-boot-nashorn + spring-boot-modules spring-boot-parent - spring-boot-performance - spring-boot-properties - spring-boot-property-exp - spring-boot-rest - spring-boot-runtime - spring-boot-runtime/disabling-console-jul - spring-boot-runtime/disabling-console-log4j2 - spring-boot-runtime/disabling-console-logback - spring-boot-security - spring-boot-springdoc - spring-boot-testing - spring-boot-vue - + spring-caching spring-cloud @@ -729,6 +692,7 @@ spring-mvc-forms-jsp spring-mvc-forms-thymeleaf spring-mvc-java + spring-mvc-java-2 spring-mvc-kotlin spring-mvc-velocity @@ -839,9 +803,6 @@ parent-java parent-kotlin - core-kotlin - core-kotlin-2 - jenkins/plugins jhipster jws @@ -962,6 +923,7 @@ disruptor dozer drools + dropwizard dubbo ethereum @@ -997,6 +959,7 @@ immutables jackson-modules + jackson-simple java-blockchain java-collections-conversions @@ -1085,6 +1048,7 @@ netflix-modules ninja + open-liberty oauth2-framework-impl optaplanner @@ -1099,7 +1063,7 @@ protobuffer quarkus - + quarkus-extension rabbitmq @@ -1176,49 +1140,9 @@ spring-batch spring-bom - - spring-boot - spring-boot-admin - spring-boot-angular - spring-boot-artifacts - spring-boot-autoconfiguration - spring-boot-bootstrap - spring-boot-camel - - spring-boot-client - spring-boot-config-jpa-error - spring-boot-crud - spring-boot-ctx-fluent - spring-boot-custom-starter - spring-boot-data - spring-boot-deployment - spring-boot-di - spring-boot-environment - spring-boot-flowable - - spring-boot-jasypt - spring-boot-keycloak - spring-boot-kotlin - spring-boot-libraries - spring-boot-logging-log4j2 - spring-boot-mvc - spring-boot-mvc-2 - spring-boot-mvc-birt - spring-boot-nashorn + spring-boot-modules spring-boot-parent - spring-boot-performance - spring-boot-properties - spring-boot-property-exp - spring-boot-rest - spring-boot-runtime - spring-boot-runtime/disabling-console-jul - spring-boot-runtime/disabling-console-log4j2 - spring-boot-runtime/disabling-console-logback - spring-boot-security - spring-boot-springdoc - spring-boot-testing - spring-boot-vue spring-caching @@ -1270,6 +1194,7 @@ spring-mvc-forms-jsp spring-mvc-forms-thymeleaf spring-mvc-java + spring-mvc-java-2 spring-mvc-kotlin spring-mvc-velocity @@ -1372,9 +1297,6 @@ parent-java parent-kotlin - core-kotlin - core-kotlin-2 - jenkins/plugins jhipster jws diff --git a/quarkus-extension/README.md b/quarkus-extension/README.md new file mode 100644 index 0000000000..782ec75957 --- /dev/null +++ b/quarkus-extension/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [How to Implement a Quarkus Extension](https://www.baeldung.com/quarkus-extension-java) diff --git a/quarkus-extension/pom.xml b/quarkus-extension/pom.xml index 38d7c3d548..394376e59e 100644 --- a/quarkus-extension/pom.xml +++ b/quarkus-extension/pom.xml @@ -9,6 +9,12 @@ quarkus-extension pom + + com.baeldung + parent-modules + 1.0.0-SNAPSHOT + + quarkus-liquibase quarkus-app diff --git a/quarkus-extension/quarkus-app/pom.xml b/quarkus-extension/quarkus-app/pom.xml index 6e4cce3ae7..6d3f4c7c28 100644 --- a/quarkus-extension/quarkus-app/pom.xml +++ b/quarkus-extension/quarkus-app/pom.xml @@ -5,7 +5,12 @@ 4.0.0 com.baeldung.quarkus.app quarkus-app - 1.0-SNAPSHOT + + + com.baeldung.quarkus.extension + quarkus-extension + 1.0-SNAPSHOT + @@ -22,13 +27,12 @@ com.baeldung.quarkus.liquibase - quarkus-liquibase - 1.0-SNAPSHOT + quarkus-liquibase-runtime + ${project.version} io.quarkus quarkus-jdbc-h2 - ${quarkus.version} @@ -46,31 +50,11 @@
- - maven-compiler-plugin - ${compiler-plugin.version} - - - maven-surefire-plugin - ${surefire-plugin.version} - - - org.jboss.logmanager.LogManager - - - - UTF-8 - 2.22.0 - true 1.0.0.Final - 3.8.1 - 1.8 - UTF-8 - 1.8 diff --git a/quarkus-extension/quarkus-liquibase/deployment/pom.xml b/quarkus-extension/quarkus-liquibase/deployment/pom.xml index f005ac4e8c..c85d986390 100644 --- a/quarkus-extension/quarkus-liquibase/deployment/pom.xml +++ b/quarkus-extension/quarkus-liquibase/deployment/pom.xml @@ -30,7 +30,7 @@ com.baeldung.quarkus.liquibase - quarkus-liquibase + quarkus-liquibase-runtime ${project.version} @@ -40,7 +40,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + ${compiler.plugin.version} @@ -54,4 +54,8 @@ + + 3.8.1 + + \ No newline at end of file diff --git a/quarkus-extension/quarkus-liquibase/pom.xml b/quarkus-extension/quarkus-liquibase/pom.xml index e1f3e243ab..9536561701 100644 --- a/quarkus-extension/quarkus-liquibase/pom.xml +++ b/quarkus-extension/quarkus-liquibase/pom.xml @@ -5,19 +5,21 @@ 4.0.0 com.baeldung.quarkus.liquibase quarkus-liquibase-parent - 1.0-SNAPSHOT quarkus-liquibase-parent pom + + com.baeldung.quarkus.extension + quarkus-extension + 1.0-SNAPSHOT + + runtime deployment - 1.8 - 1.8 - UTF-8 1.0.0.Final diff --git a/quarkus-extension/quarkus-liquibase/runtime/pom.xml b/quarkus-extension/quarkus-liquibase/runtime/pom.xml index a1d705c691..83f7c8d4cc 100644 --- a/quarkus-extension/quarkus-liquibase/runtime/pom.xml +++ b/quarkus-extension/quarkus-liquibase/runtime/pom.xml @@ -1,7 +1,6 @@ - + 4.0.0 quarkus-liquibase-runtime quarkus-liquibase-runtime @@ -26,7 +25,7 @@ org.liquibase liquibase-core - 3.8.1 + ${liquibase-core.version} @@ -42,7 +41,7 @@ extension-descriptor - ${project.groupId}:${project.artifactId}-deployment:${project.version} + ${project.groupId}:quarkus-liquibase-deployment:${project.version} @@ -51,7 +50,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + ${compiler.plugin.version} @@ -65,4 +64,10 @@ + + 3.8.1 + 3.8.1 + 3.8.1 + + \ No newline at end of file diff --git a/quarkus/pom.xml b/quarkus/pom.xml index de4c2ca9a3..09eb90d110 100644 --- a/quarkus/pom.xml +++ b/quarkus/pom.xml @@ -118,9 +118,6 @@ 2.22.0 0.15.0 - 1.8 - UTF-8 - 1.8 diff --git a/rabbitmq/pom.xml b/rabbitmq/pom.xml index b544da4c44..33ccf5402f 100644 --- a/rabbitmq/pom.xml +++ b/rabbitmq/pom.xml @@ -5,7 +5,6 @@ rabbitmq 0.1-SNAPSHOT rabbitmq - http://maven.apache.org com.baeldung diff --git a/ratpack/pom.xml b/ratpack/pom.xml index a00be905ee..9ad654fa7d 100644 --- a/ratpack/pom.xml +++ b/ratpack/pom.xml @@ -6,7 +6,6 @@ 1.0-SNAPSHOT ratpack jar - http://maven.apache.org com.baeldung @@ -85,18 +84,7 @@ - - ${project.artifactId} - - - src/main/resources - - - - - 1.8 - 1.8 1.5.4 4.5.3 4.4.6 diff --git a/restx/pom.xml b/restx/pom.xml index 17c25fcdc0..ee25c88047 100644 --- a/restx/pom.xml +++ b/restx/pom.xml @@ -148,8 +148,6 @@ - 1.8 - 1.8 0.35-rc4 1.2.3 diff --git a/rsocket/pom.xml b/rsocket/pom.xml index 70f21064b6..5b407c2bd0 100644 --- a/rsocket/pom.xml +++ b/rsocket/pom.xml @@ -24,43 +24,10 @@ rsocket-transport-netty ${rsocket.version} - - junit - junit - ${junit.version} - test - - - org.hamcrest - hamcrest-core - ${hamcrest.version} - test - - - ch.qos.logback - logback-classic - ${logback.version} - - - ch.qos.logback - logback-core - ${logback.version} - - - org.slf4j - slf4j-api - ${slf4j-api.version} - - 1.8 - 1.8 - 3.0.1 0.11.13 - 1.3 - 1.2.3 - 1.7.25 diff --git a/rule-engines/easy-rules/pom.xml b/rule-engines/easy-rules/pom.xml index c1ba829045..b9661cd1c3 100644 --- a/rule-engines/easy-rules/pom.xml +++ b/rule-engines/easy-rules/pom.xml @@ -9,9 +9,8 @@ com.baeldung - parent-modules + rule-engines 1.0.0-SNAPSHOT - ../.. diff --git a/rule-engines/openl-tablets/pom.xml b/rule-engines/openl-tablets/pom.xml index d1c7baabcc..25c4b8365a 100644 --- a/rule-engines/openl-tablets/pom.xml +++ b/rule-engines/openl-tablets/pom.xml @@ -9,9 +9,8 @@ com.baeldung - parent-modules + rule-engines 1.0.0-SNAPSHOT - ../.. diff --git a/rule-engines/pom.xml b/rule-engines/pom.xml index cc015c600b..d3d3127ce0 100644 --- a/rule-engines/pom.xml +++ b/rule-engines/pom.xml @@ -10,7 +10,6 @@ com.baeldung parent-modules 1.0.0-SNAPSHOT - .. diff --git a/rule-engines/rulebook/pom.xml b/rule-engines/rulebook/pom.xml index b021adea10..95ededa5f9 100644 --- a/rule-engines/rulebook/pom.xml +++ b/rule-engines/rulebook/pom.xml @@ -9,9 +9,8 @@ com.baeldung - parent-modules + rule-engines 1.0.0-SNAPSHOT - ../.. diff --git a/rxjava-core/README.md b/rxjava-core/README.md index 2773bd9423..95a374668d 100644 --- a/rxjava-core/README.md +++ b/rxjava-core/README.md @@ -13,4 +13,5 @@ This module contains articles about RxJava. - [RxJava Maybe](https://www.baeldung.com/rxjava-maybe) - [Combining RxJava Completables](https://www.baeldung.com/rxjava-completable) - [RxJava Hooks](https://www.baeldung.com/rxjava-hooks) +- [Introduction to rxjava-jdbc](https://www.baeldung.com/rxjava-jdbc) - More articles: [[next -->]](/rxjava-2) diff --git a/slack/README.md b/slack/README.md new file mode 100644 index 0000000000..fb3eff6290 --- /dev/null +++ b/slack/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [How to Create a Slack Plugin in Java](https://www.baeldung.com/java-slack-plugin) diff --git a/spf4j/spf4j-aspects-app/pom.xml b/spf4j/spf4j-aspects-app/pom.xml index 2458e2d8ad..db6a18f26a 100644 --- a/spf4j/spf4j-aspects-app/pom.xml +++ b/spf4j/spf4j-aspects-app/pom.xml @@ -39,16 +39,16 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.0 + ${compiler.plugin.version} - 1.8 - 1.8 + ${java.version} + ${java.version} org.apache.maven.plugins maven-dependency-plugin - 3.1.1 + ${dependency.plugin.version} copy-dependencies @@ -84,6 +84,8 @@ UTF-8 8.6.10 1.7.21 + 3.8.0 + 3.1.1 diff --git a/spf4j/spf4j-core-app/pom.xml b/spf4j/spf4j-core-app/pom.xml index 45300fd4a4..48cbf4a1c9 100644 --- a/spf4j/spf4j-core-app/pom.xml +++ b/spf4j/spf4j-core-app/pom.xml @@ -39,16 +39,16 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.0 + ${compiler.plugin.version} - 1.8 - 1.8 + ${java.version} + ${java.version} org.apache.maven.plugins maven-dependency-plugin - 3.1.1 + ${dependency.plugin.version} copy-dependencies @@ -84,6 +84,8 @@ UTF-8 8.6.10 1.7.21 + 3.8.0 + 3.1.1 diff --git a/spring-5-reactive-security/README.md b/spring-5-reactive-security/README.md index 4ea6fb644f..a0f47a503d 100644 --- a/spring-5-reactive-security/README.md +++ b/spring-5-reactive-security/README.md @@ -11,3 +11,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Spring Security 5 for Reactive Applications](https://www.baeldung.com/spring-security-5-reactive) - [Guide to Spring 5 WebFlux](https://www.baeldung.com/spring-webflux) - [Introduction to the Functional Web Framework in Spring 5](https://www.baeldung.com/spring-5-functional-web) +- [Guide to the AuthenticationManagerResolver in Spring Security](https://www.baeldung.com/spring-security-authenticationmanagerresolver) diff --git a/spring-5-security/README.md b/spring-5-security/README.md index 4cace0db8d..07f2d48b7f 100644 --- a/spring-5-security/README.md +++ b/spring-5-security/README.md @@ -8,4 +8,4 @@ This module contains articles about Spring Security 5 - [A Custom Spring SecurityConfigurer](https://www.baeldung.com/spring-security-custom-configurer) - [New Password Storage In Spring Security 5](https://www.baeldung.com/spring-security-5-password-storage) - [Default Password Encoder in Spring Security 5](https://www.baeldung.com/spring-security-5-default-password-encoder) - +- [Guide to the AuthenticationManagerResolver in Spring Security](https://www.baeldung.com/spring-security-authenticationmanagerresolver) diff --git a/spring-5/pom.xml b/spring-5/pom.xml index eadfb5e512..a242c29933 100644 --- a/spring-5/pom.xml +++ b/spring-5/pom.xml @@ -149,6 +149,7 @@ + 2.1.9.RELEASE 1.0 1.5.6 4.1 diff --git a/spring-amqp/README.md b/spring-amqp/README.md index 0ae4eda12e..6b09aec10a 100644 --- a/spring-amqp/README.md +++ b/spring-amqp/README.md @@ -5,4 +5,5 @@ This module contains articles about Spring with the AMQP messaging system ## Relevant articles: - [Messaging With Spring AMQP](https://www.baeldung.com/spring-amqp) -- [RabbitMQ Message Dispatching with Spring AMQP](https://www.baeldung.com/rabbitmq-spring-amqp) \ No newline at end of file +- [RabbitMQ Message Dispatching with Spring AMQP](https://www.baeldung.com/rabbitmq-spring-amqp) +- [Error Handling with Spring AMQP](https://www.baeldung.com/spring-amqp-error-handling) diff --git a/spring-boot-bootstrap/src/main/resources/application-mysql.properties b/spring-boot-bootstrap/src/main/resources/application-mysql.properties deleted file mode 100644 index a1823b5d7f..0000000000 --- a/spring-boot-bootstrap/src/main/resources/application-mysql.properties +++ /dev/null @@ -1 +0,0 @@ -spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect \ No newline at end of file diff --git a/spring-boot-gradle/gradle/wrapper/gradle-wrapper.jar b/spring-boot-gradle/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 1ce6e58f1c..0000000000 Binary files a/spring-boot-gradle/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/spring-boot-libraries/.mvn/wrapper/maven-wrapper.jar b/spring-boot-libraries/.mvn/wrapper/maven-wrapper.jar deleted file mode 100644 index 5fd4d5023f..0000000000 Binary files a/spring-boot-libraries/.mvn/wrapper/maven-wrapper.jar and /dev/null differ diff --git a/spring-boot-modules/README.md b/spring-boot-modules/README.md new file mode 100644 index 0000000000..cd916f48a7 --- /dev/null +++ b/spring-boot-modules/README.md @@ -0,0 +1,3 @@ +## Spring Boot Modules + +This module contains various modules of Spring Boot diff --git a/spring-boot-modules/pom.xml b/spring-boot-modules/pom.xml new file mode 100644 index 0000000000..0918aa9496 --- /dev/null +++ b/spring-boot-modules/pom.xml @@ -0,0 +1,55 @@ + + + 4.0.0 + com.baeldung.spring-boot-modules + spring-boot-modules + spring-boot-modules + pom + + + com.baeldung + parent-modules + 1.0.0-SNAPSHOT + + + + spring-boot + spring-boot-admin + spring-boot-angular + spring-boot-artifacts + spring-boot-autoconfiguration + spring-boot-bootstrap + spring-boot-client + spring-boot-config-jpa-error + spring-boot-ctx-fluent + spring-boot-deployment + spring-boot-di + spring-boot-camel + + spring-boot-custom-starter + spring-boot-crud + spring-boot-data + spring-boot-environment + spring-boot-flowable + + spring-boot-jasypt + spring-boot-keycloak + spring-boot-libraries + spring-boot-logging-log4j2 + spring-boot-kotlin + spring-boot-mvc + spring-boot-mvc-2 + spring-boot-mvc-birt + spring-boot-nashorn + spring-boot-performance + spring-boot-properties + spring-boot-property-exp + spring-boot-runtime + spring-boot-security + spring-boot-springdoc + spring-boot-testing + spring-boot-vue + + + diff --git a/spring-boot-admin/README.md b/spring-boot-modules/spring-boot-admin/README.md similarity index 100% rename from spring-boot-admin/README.md rename to spring-boot-modules/spring-boot-admin/README.md diff --git a/spring-boot-admin/pom.xml b/spring-boot-modules/spring-boot-admin/pom.xml similarity index 92% rename from spring-boot-admin/pom.xml rename to spring-boot-modules/spring-boot-admin/pom.xml index 8dbce0fd6c..f7dc98770a 100644 --- a/spring-boot-admin/pom.xml +++ b/spring-boot-modules/spring-boot-admin/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-admin/spring-boot-admin-client/.gitignore b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/.gitignore similarity index 100% rename from spring-boot-admin/spring-boot-admin-client/.gitignore rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-client/.gitignore diff --git a/spring-boot-admin/spring-boot-admin-client/pom.xml b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/pom.xml similarity index 95% rename from spring-boot-admin/spring-boot-admin-client/pom.xml rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-client/pom.xml index 47abfdddc2..8bb8c7bac3 100644 --- a/spring-boot-admin/spring-boot-admin-client/pom.xml +++ b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/pom.xml @@ -12,7 +12,6 @@ com.baeldung spring-boot-admin 0.0.1-SNAPSHOT - ../../spring-boot-admin @@ -59,7 +58,7 @@ - 2.1.6 + 2.2.2 2.0.4.RELEASE diff --git a/spring-boot-admin/spring-boot-admin-client/src/main/java/com/baeldung/springbootadminclient/SpringBootAdminClientApplication.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/main/java/com/baeldung/springbootadminclient/SpringBootAdminClientApplication.java similarity index 100% rename from spring-boot-admin/spring-boot-admin-client/src/main/java/com/baeldung/springbootadminclient/SpringBootAdminClientApplication.java rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/main/java/com/baeldung/springbootadminclient/SpringBootAdminClientApplication.java diff --git a/spring-boot-admin/spring-boot-admin-client/src/main/resources/application.properties b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/main/resources/application.properties similarity index 100% rename from spring-boot-admin/spring-boot-admin-client/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/main/resources/application.properties diff --git a/spring-boot-admin/spring-boot-admin-client/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/main/resources/logback.xml similarity index 100% rename from spring-boot-admin/spring-boot-admin-client/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/main/resources/logback.xml diff --git a/spring-boot-admin/spring-boot-admin-client/src/test/java/com/baeldung/springbootadminclient/SpringBootAdminClientApplicationIntegrationTest.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/test/java/com/baeldung/springbootadminclient/SpringBootAdminClientApplicationIntegrationTest.java similarity index 100% rename from spring-boot-admin/spring-boot-admin-client/src/test/java/com/baeldung/springbootadminclient/SpringBootAdminClientApplicationIntegrationTest.java rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/test/java/com/baeldung/springbootadminclient/SpringBootAdminClientApplicationIntegrationTest.java diff --git a/spring-boot-admin/spring-boot-admin-client/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-boot-admin/spring-boot-admin-client/src/test/java/org/baeldung/SpringContextTest.java rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-client/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-boot-admin/spring-boot-admin-server/.gitignore b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/.gitignore similarity index 100% rename from spring-boot-admin/spring-boot-admin-server/.gitignore rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/.gitignore diff --git a/spring-boot-admin/spring-boot-admin-server/pom.xml b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/pom.xml similarity index 94% rename from spring-boot-admin/spring-boot-admin-server/pom.xml rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/pom.xml index d0d2d7a1ef..118b270812 100644 --- a/spring-boot-admin/spring-boot-admin-server/pom.xml +++ b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/pom.xml @@ -12,7 +12,6 @@ com.baeldung spring-boot-admin 0.0.1-SNAPSHOT - ../../spring-boot-admin @@ -80,8 +79,8 @@ - 2.1.6 - 2.1.6 + 2.2.2 + 2.2.2 1.5.7 2.0.4.RELEASE diff --git a/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/SpringBootAdminServerApplication.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/SpringBootAdminServerApplication.java similarity index 100% rename from spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/SpringBootAdminServerApplication.java rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/SpringBootAdminServerApplication.java diff --git a/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/HazelcastConfig.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/HazelcastConfig.java similarity index 100% rename from spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/HazelcastConfig.java rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/HazelcastConfig.java diff --git a/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/NotifierConfiguration.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/NotifierConfiguration.java similarity index 100% rename from spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/NotifierConfiguration.java rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/NotifierConfiguration.java diff --git a/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/WebSecurityConfig.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/WebSecurityConfig.java similarity index 100% rename from spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/WebSecurityConfig.java rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/java/com/baeldung/springbootadminserver/configs/WebSecurityConfig.java diff --git a/spring-boot-admin/spring-boot-admin-server/src/main/resources/application.properties b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/resources/application.properties similarity index 100% rename from spring-boot-admin/spring-boot-admin-server/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/resources/application.properties diff --git a/spring-boot-admin/spring-boot-admin-server/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/resources/logback.xml similarity index 100% rename from spring-boot-admin/spring-boot-admin-server/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/main/resources/logback.xml diff --git a/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/HazelcastConfigIntegrationTest.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/HazelcastConfigIntegrationTest.java similarity index 100% rename from spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/HazelcastConfigIntegrationTest.java rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/HazelcastConfigIntegrationTest.java diff --git a/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/NotifierConfigurationIntegrationTest.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/NotifierConfigurationIntegrationTest.java similarity index 100% rename from spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/NotifierConfigurationIntegrationTest.java rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/NotifierConfigurationIntegrationTest.java diff --git a/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/WebSecurityConfigIntegrationTest.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/WebSecurityConfigIntegrationTest.java similarity index 100% rename from spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/WebSecurityConfigIntegrationTest.java rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/test/java/com/baeldung/springbootadminserver/WebSecurityConfigIntegrationTest.java diff --git a/spring-boot-admin/spring-boot-admin-server/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-boot-admin/spring-boot-admin-server/src/test/java/org/baeldung/SpringContextTest.java rename to spring-boot-modules/spring-boot-admin/spring-boot-admin-server/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-boot-angular/README.md b/spring-boot-modules/spring-boot-angular/README.md similarity index 100% rename from spring-boot-angular/README.md rename to spring-boot-modules/spring-boot-angular/README.md diff --git a/spring-boot-angular/pom.xml b/spring-boot-modules/spring-boot-angular/pom.xml similarity index 96% rename from spring-boot-angular/pom.xml rename to spring-boot-modules/spring-boot-angular/pom.xml index d78761e921..5cfc530100 100644 --- a/spring-boot-angular/pom.xml +++ b/spring-boot-modules/spring-boot-angular/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-angular/src/main/java/com/baeldung/application/Application.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/Application.java similarity index 97% rename from spring-boot-angular/src/main/java/com/baeldung/application/Application.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/Application.java index f1155c3106..0101ea3a3b 100644 --- a/spring-boot-angular/src/main/java/com/baeldung/application/Application.java +++ b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/Application.java @@ -1,28 +1,28 @@ -package com.baeldung.application; - -import com.baeldung.application.entities.User; -import com.baeldung.application.repositories.UserRepository; -import java.util.stream.Stream; -import org.springframework.boot.CommandLineRunner; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.Bean; - -@SpringBootApplication -public class Application { - - public static void main(String[] args) { - SpringApplication.run(Application.class, args); - } - - @Bean - CommandLineRunner init(UserRepository userRepository) { - return args -> { - Stream.of("John", "Julie", "Jennifer", "Helen", "Rachel").forEach(name -> { - User user = new User(name, name.toLowerCase() + "@domain.com"); - userRepository.save(user); - }); - userRepository.findAll().forEach(System.out::println); - }; - } -} +package com.baeldung.application; + +import com.baeldung.application.entities.User; +import com.baeldung.application.repositories.UserRepository; +import java.util.stream.Stream; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; + +@SpringBootApplication +public class Application { + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } + + @Bean + CommandLineRunner init(UserRepository userRepository) { + return args -> { + Stream.of("John", "Julie", "Jennifer", "Helen", "Rachel").forEach(name -> { + User user = new User(name, name.toLowerCase() + "@domain.com"); + userRepository.save(user); + }); + userRepository.findAll().forEach(System.out::println); + }; + } +} diff --git a/spring-boot-angular/src/main/java/com/baeldung/application/controllers/UserController.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/controllers/UserController.java similarity index 96% rename from spring-boot-angular/src/main/java/com/baeldung/application/controllers/UserController.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/controllers/UserController.java index 14c90d5b10..a87ac4e8d1 100644 --- a/spring-boot-angular/src/main/java/com/baeldung/application/controllers/UserController.java +++ b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/controllers/UserController.java @@ -1,31 +1,31 @@ -package com.baeldung.application.controllers; - -import com.baeldung.application.entities.User; -import com.baeldung.application.repositories.UserRepository; -import java.util.List; -import org.springframework.web.bind.annotation.CrossOrigin; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@CrossOrigin(origins = "http://localhost:4200") -public class UserController { - - private final UserRepository userRepository; - - public UserController(UserRepository userRepository) { - this.userRepository = userRepository; - } - - @GetMapping("/users") - public List getUsers() { - return (List) userRepository.findAll(); - } - - @PostMapping("/users") - void addUser(@RequestBody User user) { - userRepository.save(user); - } -} +package com.baeldung.application.controllers; + +import com.baeldung.application.entities.User; +import com.baeldung.application.repositories.UserRepository; +import java.util.List; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@CrossOrigin(origins = "http://localhost:4200") +public class UserController { + + private final UserRepository userRepository; + + public UserController(UserRepository userRepository) { + this.userRepository = userRepository; + } + + @GetMapping("/users") + public List getUsers() { + return (List) userRepository.findAll(); + } + + @PostMapping("/users") + void addUser(@RequestBody User user) { + userRepository.save(user); + } +} diff --git a/spring-boot-angular/src/main/java/com/baeldung/application/entities/User.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/entities/User.java similarity index 95% rename from spring-boot-angular/src/main/java/com/baeldung/application/entities/User.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/entities/User.java index 4c346fa5b9..ea23edc7e2 100644 --- a/spring-boot-angular/src/main/java/com/baeldung/application/entities/User.java +++ b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/entities/User.java @@ -1,43 +1,43 @@ -package com.baeldung.application.entities; - -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; - -@Entity -public class User { - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private long id; - private final String name; - private final String email; - - public User() { - this.name = ""; - this.email = ""; - } - - public User(String name, String email) { - this.name = name; - this.email = email; - } - - public long getId() { - return id; - } - - public String getName() { - return name; - } - - public String getEmail() { - return email; - } - - @Override - public String toString() { - return "User{" + "id=" + id + ", name=" + name + ", email=" + email + '}'; - } -} +package com.baeldung.application.entities; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +@Entity +public class User { + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private long id; + private final String name; + private final String email; + + public User() { + this.name = ""; + this.email = ""; + } + + public User(String name, String email) { + this.name = name; + this.email = email; + } + + public long getId() { + return id; + } + + public String getName() { + return name; + } + + public String getEmail() { + return email; + } + + @Override + public String toString() { + return "User{" + "id=" + id + ", name=" + name + ", email=" + email + '}'; + } +} diff --git a/spring-boot-angular/src/main/java/com/baeldung/application/repositories/UserRepository.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/repositories/UserRepository.java similarity index 97% rename from spring-boot-angular/src/main/java/com/baeldung/application/repositories/UserRepository.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/repositories/UserRepository.java index 5a81cadcbe..7bd71c2f86 100644 --- a/spring-boot-angular/src/main/java/com/baeldung/application/repositories/UserRepository.java +++ b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/application/repositories/UserRepository.java @@ -1,9 +1,9 @@ -package com.baeldung.application.repositories; - -import com.baeldung.application.entities.User; -import org.springframework.data.repository.CrudRepository; -import org.springframework.stereotype.Repository; -import org.springframework.web.bind.annotation.CrossOrigin; - -@Repository -public interface UserRepository extends CrudRepository{} +package com.baeldung.application.repositories; + +import com.baeldung.application.entities.User; +import org.springframework.data.repository.CrudRepository; +import org.springframework.stereotype.Repository; +import org.springframework.web.bind.annotation.CrossOrigin; + +@Repository +public interface UserRepository extends CrudRepository{} diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/EcommerceApplication.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/EcommerceApplication.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/EcommerceApplication.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/EcommerceApplication.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/controller/OrderController.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/controller/OrderController.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/controller/OrderController.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/controller/OrderController.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/controller/ProductController.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/controller/ProductController.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/controller/ProductController.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/controller/ProductController.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/dto/OrderProductDto.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/dto/OrderProductDto.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/dto/OrderProductDto.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/dto/OrderProductDto.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/exception/ApiExceptionHandler.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/exception/ApiExceptionHandler.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/exception/ApiExceptionHandler.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/exception/ApiExceptionHandler.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/exception/ResourceNotFoundException.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/exception/ResourceNotFoundException.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/exception/ResourceNotFoundException.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/exception/ResourceNotFoundException.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/Order.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/Order.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/Order.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/Order.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderProduct.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderProduct.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderProduct.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderProduct.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderProductPK.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderProductPK.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderProductPK.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderProductPK.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderStatus.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderStatus.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderStatus.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/OrderStatus.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/Product.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/Product.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/Product.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/model/Product.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/OrderProductRepository.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/OrderProductRepository.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/OrderProductRepository.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/OrderProductRepository.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/OrderRepository.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/OrderRepository.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/OrderRepository.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/OrderRepository.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/ProductRepository.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/ProductRepository.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/ProductRepository.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/repository/ProductRepository.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderProductService.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderProductService.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderProductService.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderProductService.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderProductServiceImpl.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderProductServiceImpl.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderProductServiceImpl.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderProductServiceImpl.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderService.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderService.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderService.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderService.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderServiceImpl.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderServiceImpl.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderServiceImpl.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/OrderServiceImpl.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/ProductService.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/ProductService.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/ProductService.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/ProductService.java diff --git a/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/ProductServiceImpl.java b/spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/ProductServiceImpl.java similarity index 100% rename from spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/ProductServiceImpl.java rename to spring-boot-modules/spring-boot-angular/src/main/java/com/baeldung/ecommerce/service/ProductServiceImpl.java diff --git a/spring-boot-angular/src/main/js/application/.angular-cli.json b/spring-boot-modules/spring-boot-angular/src/main/js/application/.angular-cli.json similarity index 100% rename from spring-boot-angular/src/main/js/application/.angular-cli.json rename to spring-boot-modules/spring-boot-angular/src/main/js/application/.angular-cli.json diff --git a/spring-boot-angular/src/main/js/application/.editorconfig b/spring-boot-modules/spring-boot-angular/src/main/js/application/.editorconfig similarity index 100% rename from spring-boot-angular/src/main/js/application/.editorconfig rename to spring-boot-modules/spring-boot-angular/src/main/js/application/.editorconfig diff --git a/spring-boot-angular/src/main/js/application/.gitignore b/spring-boot-modules/spring-boot-angular/src/main/js/application/.gitignore similarity index 100% rename from spring-boot-angular/src/main/js/application/.gitignore rename to spring-boot-modules/spring-boot-angular/src/main/js/application/.gitignore diff --git a/spring-boot-angular/src/main/js/application/README.md b/spring-boot-modules/spring-boot-angular/src/main/js/application/README.md similarity index 100% rename from spring-boot-angular/src/main/js/application/README.md rename to spring-boot-modules/spring-boot-angular/src/main/js/application/README.md diff --git a/spring-boot-angular/src/main/js/application/e2e/app.e2e-spec.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/e2e/app.e2e-spec.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/e2e/app.e2e-spec.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/e2e/app.e2e-spec.ts diff --git a/spring-boot-angular/src/main/js/application/e2e/app.po.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/e2e/app.po.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/e2e/app.po.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/e2e/app.po.ts diff --git a/spring-boot-angular/src/main/js/application/e2e/tsconfig.e2e.json b/spring-boot-modules/spring-boot-angular/src/main/js/application/e2e/tsconfig.e2e.json similarity index 100% rename from spring-boot-angular/src/main/js/application/e2e/tsconfig.e2e.json rename to spring-boot-modules/spring-boot-angular/src/main/js/application/e2e/tsconfig.e2e.json diff --git a/spring-boot-angular/src/main/js/application/karma.conf.js b/spring-boot-modules/spring-boot-angular/src/main/js/application/karma.conf.js similarity index 100% rename from spring-boot-angular/src/main/js/application/karma.conf.js rename to spring-boot-modules/spring-boot-angular/src/main/js/application/karma.conf.js diff --git a/spring-boot-angular/src/main/js/application/package-lock.json b/spring-boot-modules/spring-boot-angular/src/main/js/application/package-lock.json similarity index 100% rename from spring-boot-angular/src/main/js/application/package-lock.json rename to spring-boot-modules/spring-boot-angular/src/main/js/application/package-lock.json diff --git a/spring-boot-angular/src/main/js/application/package.json b/spring-boot-modules/spring-boot-angular/src/main/js/application/package.json similarity index 100% rename from spring-boot-angular/src/main/js/application/package.json rename to spring-boot-modules/spring-boot-angular/src/main/js/application/package.json diff --git a/spring-boot-angular/src/main/js/application/protractor.conf.js b/spring-boot-modules/spring-boot-angular/src/main/js/application/protractor.conf.js similarity index 100% rename from spring-boot-angular/src/main/js/application/protractor.conf.js rename to spring-boot-modules/spring-boot-angular/src/main/js/application/protractor.conf.js diff --git a/spring-boot-angular/src/main/js/application/src/app/app-routing.module.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app-routing.module.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/app-routing.module.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app-routing.module.ts diff --git a/spring-boot-angular/src/main/js/application/src/app/app.component.css b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.component.css similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/app.component.css rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.component.css diff --git a/spring-boot-angular/src/main/js/application/src/app/app.component.html b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.component.html similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/app.component.html rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.component.html diff --git a/spring-boot-angular/src/main/js/application/src/app/app.component.spec.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.component.spec.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/app.component.spec.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.component.spec.ts diff --git a/spring-boot-angular/src/main/js/application/src/app/app.component.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.component.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/app.component.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.component.ts diff --git a/spring-boot-angular/src/main/js/application/src/app/app.module.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.module.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/app.module.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/app.module.ts diff --git a/spring-boot-angular/src/main/js/application/src/app/model/user.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/model/user.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/model/user.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/model/user.ts diff --git a/spring-boot-angular/src/main/js/application/src/app/service/user.service.spec.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/service/user.service.spec.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/service/user.service.spec.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/service/user.service.spec.ts diff --git a/spring-boot-angular/src/main/js/application/src/app/service/user.service.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/service/user.service.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/service/user.service.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/service/user.service.ts diff --git a/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.css b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.css similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.css rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.css diff --git a/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.html b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.html similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.html rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.html diff --git a/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.spec.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.spec.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.spec.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.spec.ts diff --git a/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-form/user-form.component.ts diff --git a/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.css b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.css similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.css rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.css diff --git a/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.html b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.html similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.html rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.html diff --git a/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.spec.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.spec.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.spec.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.spec.ts diff --git a/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/app/user-list/user-list.component.ts diff --git a/spring-boot-angular/src/main/js/application/src/assets/.gitkeep b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/assets/.gitkeep similarity index 100% rename from spring-boot-angular/src/main/js/application/src/assets/.gitkeep rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/assets/.gitkeep diff --git a/spring-boot-angular/src/main/js/application/src/environments/environment.prod.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/environments/environment.prod.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/src/environments/environment.prod.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/environments/environment.prod.ts diff --git a/spring-boot-angular/src/main/js/application/src/environments/environment.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/environments/environment.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/src/environments/environment.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/environments/environment.ts diff --git a/spring-boot-angular/src/main/js/application/src/favicon.ico b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/favicon.ico similarity index 100% rename from spring-boot-angular/src/main/js/application/src/favicon.ico rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/favicon.ico diff --git a/spring-boot-angular/src/main/js/application/src/index.html b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/index.html similarity index 98% rename from spring-boot-angular/src/main/js/application/src/index.html rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/index.html index 1ce7ff1ca6..398190f439 100644 --- a/spring-boot-angular/src/main/js/application/src/index.html +++ b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/index.html @@ -14,4 +14,4 @@ - \ No newline at end of file + diff --git a/spring-boot-angular/src/main/js/application/src/main.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/main.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/src/main.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/main.ts diff --git a/spring-boot-angular/src/main/js/application/src/polyfills.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/polyfills.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/src/polyfills.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/polyfills.ts diff --git a/spring-boot-angular/src/main/js/application/src/styles.css b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/styles.css similarity index 100% rename from spring-boot-angular/src/main/js/application/src/styles.css rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/styles.css diff --git a/spring-boot-angular/src/main/js/application/src/tsconfig.app.json b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/tsconfig.app.json similarity index 100% rename from spring-boot-angular/src/main/js/application/src/tsconfig.app.json rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/tsconfig.app.json diff --git a/spring-boot-angular/src/main/js/application/src/tsconfig.spec.json b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/tsconfig.spec.json similarity index 100% rename from spring-boot-angular/src/main/js/application/src/tsconfig.spec.json rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/tsconfig.spec.json diff --git a/spring-boot-angular/src/main/js/application/src/typings.d.ts b/spring-boot-modules/spring-boot-angular/src/main/js/application/src/typings.d.ts similarity index 100% rename from spring-boot-angular/src/main/js/application/src/typings.d.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/application/src/typings.d.ts diff --git a/spring-boot-angular/src/main/js/application/tsconfig.json b/spring-boot-modules/spring-boot-angular/src/main/js/application/tsconfig.json similarity index 100% rename from spring-boot-angular/src/main/js/application/tsconfig.json rename to spring-boot-modules/spring-boot-angular/src/main/js/application/tsconfig.json diff --git a/spring-boot-angular/src/main/js/application/tslint.json b/spring-boot-modules/spring-boot-angular/src/main/js/application/tslint.json similarity index 100% rename from spring-boot-angular/src/main/js/application/tslint.json rename to spring-boot-modules/spring-boot-angular/src/main/js/application/tslint.json diff --git a/spring-boot-angular/src/main/js/ecommerce/.editorconfig b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/.editorconfig similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/.editorconfig rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/.editorconfig diff --git a/spring-boot-angular/src/main/js/ecommerce/README.md b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/README.md similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/README.md rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/README.md diff --git a/spring-boot-angular/src/main/js/ecommerce/angular.json b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/angular.json similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/angular.json rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/angular.json diff --git a/spring-boot-angular/src/main/js/ecommerce/e2e/protractor.conf.js b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/e2e/protractor.conf.js similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/e2e/protractor.conf.js rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/e2e/protractor.conf.js diff --git a/spring-boot-angular/src/main/js/ecommerce/e2e/src/app.e2e-spec.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/e2e/src/app.e2e-spec.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/e2e/src/app.e2e-spec.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/e2e/src/app.e2e-spec.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/e2e/src/app.po.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/e2e/src/app.po.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/e2e/src/app.po.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/e2e/src/app.po.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/e2e/tsconfig.e2e.json b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/e2e/tsconfig.e2e.json similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/e2e/tsconfig.e2e.json rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/e2e/tsconfig.e2e.json diff --git a/spring-boot-angular/src/main/js/ecommerce/package-lock.json b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/package-lock.json similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/package-lock.json rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/package-lock.json diff --git a/spring-boot-angular/src/main/js/ecommerce/package.json b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/package.json similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/package.json rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/package.json diff --git a/spring-boot-angular/src/main/js/ecommerce/proxy-conf.json b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/proxy-conf.json similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/proxy-conf.json rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/proxy-conf.json diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/app.component.css b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/app.component.css similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/app.component.css rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/app.component.css diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/app.component.html b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/app.component.html similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/app.component.html rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/app.component.html diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/app.component.spec.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/app.component.spec.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/app.component.spec.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/app.component.spec.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/app.component.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/app.component.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/app.component.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/app.component.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/app.module.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/app.module.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/app.module.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/app.module.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.css b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.css similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.css rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.css diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.html b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.html similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.html rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.html diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.spec.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.spec.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.spec.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.spec.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/ecommerce.component.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/models/product-order.model.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/models/product-order.model.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/models/product-order.model.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/models/product-order.model.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/models/product-orders.model.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/models/product-orders.model.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/models/product-orders.model.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/models/product-orders.model.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/models/product.model.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/models/product.model.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/models/product.model.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/models/product.model.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/orders/orders.component.css b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/orders/orders.component.css similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/orders/orders.component.css rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/orders/orders.component.css diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/orders/orders.component.html b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/orders/orders.component.html similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/orders/orders.component.html rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/orders/orders.component.html diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/orders/orders.component.spec.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/orders/orders.component.spec.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/orders/orders.component.spec.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/orders/orders.component.spec.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/orders/orders.component.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/orders/orders.component.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/orders/orders.component.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/orders/orders.component.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/products/products.component.css b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/products/products.component.css similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/products/products.component.css rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/products/products.component.css diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/products/products.component.html b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/products/products.component.html similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/products/products.component.html rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/products/products.component.html diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/products/products.component.spec.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/products/products.component.spec.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/products/products.component.spec.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/products/products.component.spec.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/products/products.component.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/products/products.component.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/products/products.component.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/products/products.component.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/services/EcommerceService.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/services/EcommerceService.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/services/EcommerceService.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/services/EcommerceService.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/shopping-cart/shopping-cart.component.css b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/shopping-cart/shopping-cart.component.css similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/shopping-cart/shopping-cart.component.css rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/shopping-cart/shopping-cart.component.css diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/shopping-cart/shopping-cart.component.html b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/shopping-cart/shopping-cart.component.html similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/shopping-cart/shopping-cart.component.html rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/shopping-cart/shopping-cart.component.html diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/shopping-cart/shopping-cart.component.spec.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/shopping-cart/shopping-cart.component.spec.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/shopping-cart/shopping-cart.component.spec.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/shopping-cart/shopping-cart.component.spec.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/shopping-cart/shopping-cart.component.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/shopping-cart/shopping-cart.component.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/shopping-cart/shopping-cart.component.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/app/ecommerce/shopping-cart/shopping-cart.component.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/assets/.gitkeep b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/assets/.gitkeep similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/assets/.gitkeep rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/assets/.gitkeep diff --git a/spring-boot-angular/src/main/js/ecommerce/src/browserslist b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/browserslist similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/browserslist rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/browserslist diff --git a/spring-boot-angular/src/main/js/ecommerce/src/environments/environment.prod.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/environments/environment.prod.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/environments/environment.prod.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/environments/environment.prod.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/environments/environment.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/environments/environment.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/environments/environment.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/environments/environment.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/favicon.ico b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/favicon.ico similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/favicon.ico rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/favicon.ico diff --git a/spring-boot-angular/src/main/js/ecommerce/src/index.html b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/index.html similarity index 69% rename from spring-boot-angular/src/main/js/ecommerce/src/index.html rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/index.html index 3faefb6e8c..2578673a0f 100644 --- a/spring-boot-angular/src/main/js/ecommerce/src/index.html +++ b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/index.html @@ -6,7 +6,7 @@ - + diff --git a/spring-boot-angular/src/main/js/ecommerce/src/karma.conf.js b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/karma.conf.js similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/karma.conf.js rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/karma.conf.js diff --git a/spring-boot-angular/src/main/js/ecommerce/src/main.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/main.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/main.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/main.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/polyfills.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/polyfills.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/polyfills.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/polyfills.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/styles.css b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/styles.css similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/styles.css rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/styles.css diff --git a/spring-boot-angular/src/main/js/ecommerce/src/test.ts b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/test.ts similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/test.ts rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/test.ts diff --git a/spring-boot-angular/src/main/js/ecommerce/src/tsconfig.app.json b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/tsconfig.app.json similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/tsconfig.app.json rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/tsconfig.app.json diff --git a/spring-boot-angular/src/main/js/ecommerce/src/tsconfig.spec.json b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/tsconfig.spec.json similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/tsconfig.spec.json rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/tsconfig.spec.json diff --git a/spring-boot-angular/src/main/js/ecommerce/src/tslint.json b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/tslint.json similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/src/tslint.json rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/src/tslint.json diff --git a/spring-boot-angular/src/main/js/ecommerce/tsconfig.json b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/tsconfig.json similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/tsconfig.json rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/tsconfig.json diff --git a/spring-boot-angular/src/main/js/ecommerce/tslint.json b/spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/tslint.json similarity index 100% rename from spring-boot-angular/src/main/js/ecommerce/tslint.json rename to spring-boot-modules/spring-boot-angular/src/main/js/ecommerce/tslint.json diff --git a/spring-boot-angular/src/main/resources/application.properties b/spring-boot-modules/spring-boot-angular/src/main/resources/application.properties similarity index 100% rename from spring-boot-angular/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-angular/src/main/resources/application.properties diff --git a/core-kotlin-2/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-angular/src/main/resources/logback.xml similarity index 100% rename from core-kotlin-2/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-angular/src/main/resources/logback.xml diff --git a/spring-boot-angular/src/test/java/com/baeldung/ecommerce/EcommerceApplicationIntegrationTest.java b/spring-boot-modules/spring-boot-angular/src/test/java/com/baeldung/ecommerce/EcommerceApplicationIntegrationTest.java similarity index 100% rename from spring-boot-angular/src/test/java/com/baeldung/ecommerce/EcommerceApplicationIntegrationTest.java rename to spring-boot-modules/spring-boot-angular/src/test/java/com/baeldung/ecommerce/EcommerceApplicationIntegrationTest.java diff --git a/spring-boot-angular/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-angular/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-boot-angular/src/test/java/org/baeldung/SpringContextTest.java rename to spring-boot-modules/spring-boot-angular/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-boot-artifacts/README.md b/spring-boot-modules/spring-boot-artifacts/README.md similarity index 79% rename from spring-boot-artifacts/README.md rename to spring-boot-modules/spring-boot-artifacts/README.md index 876954e858..cb77cfad4d 100644 --- a/spring-boot-artifacts/README.md +++ b/spring-boot-modules/spring-boot-artifacts/README.md @@ -9,3 +9,5 @@ This module contains articles about configuring the Spring Boot build process. - [Introduction to WebJars](https://www.baeldung.com/maven-webjars) - [A Quick Guide to Maven Wrapper](https://www.baeldung.com/maven-wrapper) - [Running a Spring Boot App with Maven vs an Executable War/Jar](https://www.baeldung.com/spring-boot-run-maven-vs-executable-jar) + - [Injecting Git Information Into Spring](https://www.baeldung.com/spring-git-information) + - [Guide to Creating and Running a Jar File in Java](https://www.baeldung.com/java-create-jar) diff --git a/spring-boot-artifacts/pom.xml b/spring-boot-modules/spring-boot-artifacts/pom.xml similarity index 84% rename from spring-boot-artifacts/pom.xml rename to spring-boot-modules/spring-boot-artifacts/pom.xml index 97d3c53b49..f7c8636593 100644 --- a/spring-boot-artifacts/pom.xml +++ b/spring-boot-modules/spring-boot-artifacts/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 @@ -139,6 +139,33 @@ + + + pl.project13.maven + git-commit-id-plugin + ${git-commit-id-plugin.version} + + + get-the-git-infos + + revision + + initialize + + + validate-the-git-infos + + validateRevision + + package + + + + true + ${project.build.outputDirectory}/git.properties + + + @@ -185,6 +212,7 @@ 3.1.1 3.3.7-1 2.2 + 2.2.4 18.0 3.1.7 2.0.2.RELEASE diff --git a/spring-boot/src/main/java/com/baeldung/git/CommitIdApplication.java b/spring-boot-modules/spring-boot-artifacts/src/main/java/com/baeldung/git/CommitIdApplication.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/git/CommitIdApplication.java rename to spring-boot-modules/spring-boot-artifacts/src/main/java/com/baeldung/git/CommitIdApplication.java diff --git a/spring-boot/src/main/java/com/baeldung/git/CommitInfoController.java b/spring-boot-modules/spring-boot-artifacts/src/main/java/com/baeldung/git/CommitInfoController.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/git/CommitInfoController.java rename to spring-boot-modules/spring-boot-artifacts/src/main/java/com/baeldung/git/CommitInfoController.java diff --git a/spring-boot-artifacts/src/main/java/com/baeldung/webjar/TestController.java b/spring-boot-modules/spring-boot-artifacts/src/main/java/com/baeldung/webjar/TestController.java similarity index 100% rename from spring-boot-artifacts/src/main/java/com/baeldung/webjar/TestController.java rename to spring-boot-modules/spring-boot-artifacts/src/main/java/com/baeldung/webjar/TestController.java diff --git a/spring-boot-artifacts/src/main/java/com/baeldung/webjar/WebjarsdemoApplication.java b/spring-boot-modules/spring-boot-artifacts/src/main/java/com/baeldung/webjar/WebjarsdemoApplication.java similarity index 100% rename from spring-boot-artifacts/src/main/java/com/baeldung/webjar/WebjarsdemoApplication.java rename to spring-boot-modules/spring-boot-artifacts/src/main/java/com/baeldung/webjar/WebjarsdemoApplication.java diff --git a/spring-boot-artifacts/src/main/resources/application.properties b/spring-boot-modules/spring-boot-artifacts/src/main/resources/application.properties similarity index 100% rename from spring-boot-artifacts/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-artifacts/src/main/resources/application.properties diff --git a/core-kotlin/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-artifacts/src/main/resources/logback.xml similarity index 100% rename from core-kotlin/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-artifacts/src/main/resources/logback.xml diff --git a/spring-boot-artifacts/src/main/resources/templates/index.html b/spring-boot-modules/spring-boot-artifacts/src/main/resources/templates/index.html similarity index 100% rename from spring-boot-artifacts/src/main/resources/templates/index.html rename to spring-boot-modules/spring-boot-artifacts/src/main/resources/templates/index.html diff --git a/spring-boot/src/test/java/com/baeldung/git/CommitIdIntegrationTest.java b/spring-boot-modules/spring-boot-artifacts/src/test/java/com/baeldung/git/CommitIdIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/git/CommitIdIntegrationTest.java rename to spring-boot-modules/spring-boot-artifacts/src/test/java/com/baeldung/git/CommitIdIntegrationTest.java diff --git a/spring-boot-artifacts/src/test/java/com/baeldung/webjar/WebjarsdemoApplicationIntegrationTest.java b/spring-boot-modules/spring-boot-artifacts/src/test/java/com/baeldung/webjar/WebjarsdemoApplicationIntegrationTest.java similarity index 100% rename from spring-boot-artifacts/src/test/java/com/baeldung/webjar/WebjarsdemoApplicationIntegrationTest.java rename to spring-boot-modules/spring-boot-artifacts/src/test/java/com/baeldung/webjar/WebjarsdemoApplicationIntegrationTest.java diff --git a/spring-boot-autoconfiguration/.gitignore b/spring-boot-modules/spring-boot-autoconfiguration/.gitignore similarity index 100% rename from spring-boot-autoconfiguration/.gitignore rename to spring-boot-modules/spring-boot-autoconfiguration/.gitignore diff --git a/spring-boot-autoconfiguration/README.md b/spring-boot-modules/spring-boot-autoconfiguration/README.md similarity index 82% rename from spring-boot-autoconfiguration/README.md rename to spring-boot-modules/spring-boot-autoconfiguration/README.md index b3a50ad7a5..d1b5fde7ed 100644 --- a/spring-boot-autoconfiguration/README.md +++ b/spring-boot-modules/spring-boot-autoconfiguration/README.md @@ -10,3 +10,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Create a Custom Auto-Configuration with Spring Boot](https://www.baeldung.com/spring-boot-custom-auto-configuration) - [Guide to ApplicationContextRunner in Spring Boot](https://www.baeldung.com/spring-boot-context-runner) - [A Guide to Spring Boot Configuration Metadata](https://www.baeldung.com/spring-boot-configuration-metadata) +- [Display Auto-Configuration Report in Spring Boot](https://www.baeldung.com/spring-boot-auto-configuration-report) \ No newline at end of file diff --git a/spring-boot-autoconfiguration/pom.xml b/spring-boot-modules/spring-boot-autoconfiguration/pom.xml similarity index 98% rename from spring-boot-autoconfiguration/pom.xml rename to spring-boot-modules/spring-boot-autoconfiguration/pom.xml index a39bf0f071..34db784176 100644 --- a/spring-boot-autoconfiguration/pom.xml +++ b/spring-boot-modules/spring-boot-autoconfiguration/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/MySQLAutoconfiguration.java b/spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/MySQLAutoconfiguration.java similarity index 100% rename from spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/MySQLAutoconfiguration.java rename to spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/MySQLAutoconfiguration.java diff --git a/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/annotationprocessor/AnnotationProcessorApplication.java b/spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/annotationprocessor/AnnotationProcessorApplication.java similarity index 100% rename from spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/annotationprocessor/AnnotationProcessorApplication.java rename to spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/annotationprocessor/AnnotationProcessorApplication.java diff --git a/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/annotationprocessor/DatabaseProperties.java b/spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/annotationprocessor/DatabaseProperties.java similarity index 100% rename from spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/annotationprocessor/DatabaseProperties.java rename to spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/annotationprocessor/DatabaseProperties.java diff --git a/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/example/AutoconfigurationApplication.java b/spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/example/AutoconfigurationApplication.java similarity index 100% rename from spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/example/AutoconfigurationApplication.java rename to spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/example/AutoconfigurationApplication.java diff --git a/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/example/MyUser.java b/spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/example/MyUser.java similarity index 100% rename from spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/example/MyUser.java rename to spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/example/MyUser.java diff --git a/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/example/MyUserRepository.java b/spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/example/MyUserRepository.java similarity index 100% rename from spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/example/MyUserRepository.java rename to spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/example/MyUserRepository.java diff --git a/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/service/CustomService.java b/spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/service/CustomService.java similarity index 100% rename from spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/service/CustomService.java rename to spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/service/CustomService.java diff --git a/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/service/DefaultService.java b/spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/service/DefaultService.java similarity index 100% rename from spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/service/DefaultService.java rename to spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/service/DefaultService.java diff --git a/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/service/SimpleService.java b/spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/service/SimpleService.java similarity index 100% rename from spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/service/SimpleService.java rename to spring-boot-modules/spring-boot-autoconfiguration/src/main/java/com/baeldung/autoconfiguration/service/SimpleService.java diff --git a/spring-boot-autoconfiguration/src/main/resources/META-INF/spring.factories b/spring-boot-modules/spring-boot-autoconfiguration/src/main/resources/META-INF/spring.factories similarity index 100% rename from spring-boot-autoconfiguration/src/main/resources/META-INF/spring.factories rename to spring-boot-modules/spring-boot-autoconfiguration/src/main/resources/META-INF/spring.factories diff --git a/spring-boot-autoconfiguration/src/main/resources/application.properties b/spring-boot-modules/spring-boot-autoconfiguration/src/main/resources/application.properties similarity index 100% rename from spring-boot-autoconfiguration/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-autoconfiguration/src/main/resources/application.properties diff --git a/spring-boot-angular/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-autoconfiguration/src/main/resources/logback.xml similarity index 100% rename from spring-boot-angular/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-autoconfiguration/src/main/resources/logback.xml diff --git a/spring-boot-autoconfiguration/src/main/resources/mysql.properties b/spring-boot-modules/spring-boot-autoconfiguration/src/main/resources/mysql.properties similarity index 100% rename from spring-boot-autoconfiguration/src/main/resources/mysql.properties rename to spring-boot-modules/spring-boot-autoconfiguration/src/main/resources/mysql.properties diff --git a/spring-boot-autoconfiguration/src/test/java/com/baeldung/SpringContextLiveTest.java b/spring-boot-modules/spring-boot-autoconfiguration/src/test/java/com/baeldung/SpringContextLiveTest.java similarity index 100% rename from spring-boot-autoconfiguration/src/test/java/com/baeldung/SpringContextLiveTest.java rename to spring-boot-modules/spring-boot-autoconfiguration/src/test/java/com/baeldung/SpringContextLiveTest.java diff --git a/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/AutoconfigurationLiveTest.java b/spring-boot-modules/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/AutoconfigurationLiveTest.java similarity index 100% rename from spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/AutoconfigurationLiveTest.java rename to spring-boot-modules/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/AutoconfigurationLiveTest.java diff --git a/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/ConditionalOnBeanIntegrationTest.java b/spring-boot-modules/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/ConditionalOnBeanIntegrationTest.java similarity index 100% rename from spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/ConditionalOnBeanIntegrationTest.java rename to spring-boot-modules/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/ConditionalOnBeanIntegrationTest.java diff --git a/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/ConditionalOnClassIntegrationTest.java b/spring-boot-modules/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/ConditionalOnClassIntegrationTest.java similarity index 100% rename from spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/ConditionalOnClassIntegrationTest.java rename to spring-boot-modules/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/ConditionalOnClassIntegrationTest.java diff --git a/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/ConditionalOnPropertyIntegrationTest.java b/spring-boot-modules/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/ConditionalOnPropertyIntegrationTest.java similarity index 100% rename from spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/ConditionalOnPropertyIntegrationTest.java rename to spring-boot-modules/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/ConditionalOnPropertyIntegrationTest.java diff --git a/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/SpringContextLiveTest.java b/spring-boot-modules/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/SpringContextLiveTest.java similarity index 100% rename from spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/SpringContextLiveTest.java rename to spring-boot-modules/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/SpringContextLiveTest.java diff --git a/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/annotationprocessor/DatabasePropertiesIntegrationTest.java b/spring-boot-modules/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/annotationprocessor/DatabasePropertiesIntegrationTest.java similarity index 100% rename from spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/annotationprocessor/DatabasePropertiesIntegrationTest.java rename to spring-boot-modules/spring-boot-autoconfiguration/src/test/java/com/baeldung/autoconfiguration/annotationprocessor/DatabasePropertiesIntegrationTest.java diff --git a/spring-boot-autoconfiguration/src/test/resources/ConditionalOnPropertyTest.properties b/spring-boot-modules/spring-boot-autoconfiguration/src/test/resources/ConditionalOnPropertyTest.properties similarity index 100% rename from spring-boot-autoconfiguration/src/test/resources/ConditionalOnPropertyTest.properties rename to spring-boot-modules/spring-boot-autoconfiguration/src/test/resources/ConditionalOnPropertyTest.properties diff --git a/spring-boot-autoconfiguration/src/test/resources/databaseproperties-test.properties b/spring-boot-modules/spring-boot-autoconfiguration/src/test/resources/databaseproperties-test.properties similarity index 100% rename from spring-boot-autoconfiguration/src/test/resources/databaseproperties-test.properties rename to spring-boot-modules/spring-boot-autoconfiguration/src/test/resources/databaseproperties-test.properties diff --git a/spring-boot-bootstrap/.gitignore b/spring-boot-modules/spring-boot-bootstrap/.gitignore similarity index 100% rename from spring-boot-bootstrap/.gitignore rename to spring-boot-modules/spring-boot-bootstrap/.gitignore diff --git a/spring-boot-bootstrap/README.md b/spring-boot-modules/spring-boot-bootstrap/README.md similarity index 100% rename from spring-boot-bootstrap/README.md rename to spring-boot-modules/spring-boot-bootstrap/README.md diff --git a/spring-boot-bootstrap/cloudfoundry/manifest.yml b/spring-boot-modules/spring-boot-bootstrap/cloudfoundry/manifest.yml similarity index 100% rename from spring-boot-bootstrap/cloudfoundry/manifest.yml rename to spring-boot-modules/spring-boot-bootstrap/cloudfoundry/manifest.yml diff --git a/spring-boot-bootstrap/openshift/configmap.yml b/spring-boot-modules/spring-boot-bootstrap/openshift/configmap.yml similarity index 100% rename from spring-boot-bootstrap/openshift/configmap.yml rename to spring-boot-modules/spring-boot-bootstrap/openshift/configmap.yml diff --git a/spring-boot-bootstrap/pom.xml b/spring-boot-modules/spring-boot-bootstrap/pom.xml similarity index 99% rename from spring-boot-bootstrap/pom.xml rename to spring-boot-modules/spring-boot-bootstrap/pom.xml index a81908d8b6..1dc75c7e61 100644 --- a/spring-boot-bootstrap/pom.xml +++ b/spring-boot-modules/spring-boot-bootstrap/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-bootstrap/src/main/appengine/app.yaml b/spring-boot-modules/spring-boot-bootstrap/src/main/appengine/app.yaml similarity index 100% rename from spring-boot-bootstrap/src/main/appengine/app.yaml rename to spring-boot-modules/spring-boot-bootstrap/src/main/appengine/app.yaml diff --git a/spring-boot-bootstrap/src/main/fabric8/deployment.yml b/spring-boot-modules/spring-boot-bootstrap/src/main/fabric8/deployment.yml similarity index 100% rename from spring-boot-bootstrap/src/main/fabric8/deployment.yml rename to spring-boot-modules/spring-boot-bootstrap/src/main/fabric8/deployment.yml diff --git a/spring-boot-bootstrap/src/main/java/com/baeldung/Application.java b/spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/Application.java similarity index 100% rename from spring-boot-bootstrap/src/main/java/com/baeldung/Application.java rename to spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/Application.java diff --git a/spring-boot-bootstrap/src/main/java/com/baeldung/cloud/config/CloudDataSourceConfig.java b/spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/cloud/config/CloudDataSourceConfig.java similarity index 100% rename from spring-boot-bootstrap/src/main/java/com/baeldung/cloud/config/CloudDataSourceConfig.java rename to spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/cloud/config/CloudDataSourceConfig.java diff --git a/spring-boot-bootstrap/src/main/java/com/baeldung/config/SecurityConfig.java b/spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/config/SecurityConfig.java similarity index 100% rename from spring-boot-bootstrap/src/main/java/com/baeldung/config/SecurityConfig.java rename to spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/config/SecurityConfig.java diff --git a/spring-boot-bootstrap/src/main/java/com/baeldung/persistence/model/Book.java b/spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/persistence/model/Book.java similarity index 100% rename from spring-boot-bootstrap/src/main/java/com/baeldung/persistence/model/Book.java rename to spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/persistence/model/Book.java diff --git a/spring-boot-bootstrap/src/main/java/com/baeldung/persistence/repo/BookRepository.java b/spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/persistence/repo/BookRepository.java similarity index 100% rename from spring-boot-bootstrap/src/main/java/com/baeldung/persistence/repo/BookRepository.java rename to spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/persistence/repo/BookRepository.java diff --git a/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/Application.java b/spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/Application.java similarity index 100% rename from spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/Application.java rename to spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/Application.java diff --git a/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/PersonService.java b/spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/PersonService.java similarity index 100% rename from spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/PersonService.java rename to spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/PersonService.java diff --git a/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/PersonServiceImpl.java b/spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/PersonServiceImpl.java similarity index 100% rename from spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/PersonServiceImpl.java rename to spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/springbootconfiguration/PersonServiceImpl.java diff --git a/spring-boot-bootstrap/src/main/java/com/baeldung/web/BookController.java b/spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/web/BookController.java similarity index 100% rename from spring-boot-bootstrap/src/main/java/com/baeldung/web/BookController.java rename to spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/web/BookController.java diff --git a/spring-boot-bootstrap/src/main/java/com/baeldung/web/RestExceptionHandler.java b/spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/web/RestExceptionHandler.java similarity index 100% rename from spring-boot-bootstrap/src/main/java/com/baeldung/web/RestExceptionHandler.java rename to spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/web/RestExceptionHandler.java diff --git a/spring-boot-bootstrap/src/main/java/com/baeldung/web/SimpleController.java b/spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/web/SimpleController.java similarity index 100% rename from spring-boot-bootstrap/src/main/java/com/baeldung/web/SimpleController.java rename to spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/web/SimpleController.java diff --git a/spring-boot-bootstrap/src/main/java/com/baeldung/web/exception/BookIdMismatchException.java b/spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/web/exception/BookIdMismatchException.java similarity index 100% rename from spring-boot-bootstrap/src/main/java/com/baeldung/web/exception/BookIdMismatchException.java rename to spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/web/exception/BookIdMismatchException.java diff --git a/spring-boot-bootstrap/src/main/java/com/baeldung/web/exception/BookNotFoundException.java b/spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/web/exception/BookNotFoundException.java similarity index 100% rename from spring-boot-bootstrap/src/main/java/com/baeldung/web/exception/BookNotFoundException.java rename to spring-boot-modules/spring-boot-bootstrap/src/main/java/com/baeldung/web/exception/BookNotFoundException.java diff --git a/spring-boot-bootstrap/src/main/resources/application-beanstalk.properties b/spring-boot-modules/spring-boot-bootstrap/src/main/resources/application-beanstalk.properties similarity index 100% rename from spring-boot-bootstrap/src/main/resources/application-beanstalk.properties rename to spring-boot-modules/spring-boot-bootstrap/src/main/resources/application-beanstalk.properties diff --git a/spring-boot-bootstrap/src/main/resources/application-gcp.properties b/spring-boot-modules/spring-boot-bootstrap/src/main/resources/application-gcp.properties similarity index 100% rename from spring-boot-bootstrap/src/main/resources/application-gcp.properties rename to spring-boot-modules/spring-boot-bootstrap/src/main/resources/application-gcp.properties diff --git a/spring-boot-bootstrap/src/main/resources/application-local.properties b/spring-boot-modules/spring-boot-bootstrap/src/main/resources/application-local.properties similarity index 100% rename from spring-boot-bootstrap/src/main/resources/application-local.properties rename to spring-boot-modules/spring-boot-bootstrap/src/main/resources/application-local.properties diff --git a/spring-boot-modules/spring-boot-bootstrap/src/main/resources/application-mysql.properties b/spring-boot-modules/spring-boot-bootstrap/src/main/resources/application-mysql.properties new file mode 100644 index 0000000000..069bf2e9d6 --- /dev/null +++ b/spring-boot-modules/spring-boot-bootstrap/src/main/resources/application-mysql.properties @@ -0,0 +1,4 @@ +spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect +spring.application.name = spring-boot-bootstrap +spring.datasource.username = ${SPRING_DATASOURCE_USER} +spring.datasource.password = ${SPRING_DATASOURCE_PASSWORD} \ No newline at end of file diff --git a/spring-boot-bootstrap/src/main/resources/application.properties b/spring-boot-modules/spring-boot-bootstrap/src/main/resources/application.properties similarity index 100% rename from spring-boot-bootstrap/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-bootstrap/src/main/resources/application.properties diff --git a/spring-boot-bootstrap/src/main/resources/logback-gcp.xml b/spring-boot-modules/spring-boot-bootstrap/src/main/resources/logback-gcp.xml similarity index 100% rename from spring-boot-bootstrap/src/main/resources/logback-gcp.xml rename to spring-boot-modules/spring-boot-bootstrap/src/main/resources/logback-gcp.xml diff --git a/spring-boot-artifacts/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-bootstrap/src/main/resources/logback.xml similarity index 100% rename from spring-boot-artifacts/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-bootstrap/src/main/resources/logback.xml diff --git a/spring-boot-bootstrap/src/main/resources/spring-cloud-bootstrap.properties b/spring-boot-modules/spring-boot-bootstrap/src/main/resources/spring-cloud-bootstrap.properties similarity index 100% rename from spring-boot-bootstrap/src/main/resources/spring-cloud-bootstrap.properties rename to spring-boot-modules/spring-boot-bootstrap/src/main/resources/spring-cloud-bootstrap.properties diff --git a/spring-boot-bootstrap/src/main/resources/templates/error.html b/spring-boot-modules/spring-boot-bootstrap/src/main/resources/templates/error.html similarity index 100% rename from spring-boot-bootstrap/src/main/resources/templates/error.html rename to spring-boot-modules/spring-boot-bootstrap/src/main/resources/templates/error.html diff --git a/spring-boot-bootstrap/src/main/resources/templates/home.html b/spring-boot-modules/spring-boot-bootstrap/src/main/resources/templates/home.html similarity index 100% rename from spring-boot-bootstrap/src/main/resources/templates/home.html rename to spring-boot-modules/spring-boot-bootstrap/src/main/resources/templates/home.html diff --git a/spring-boot-bootstrap/src/test/java/com/baeldung/SpringBootBootstrapLiveTest.java b/spring-boot-modules/spring-boot-bootstrap/src/test/java/com/baeldung/SpringBootBootstrapLiveTest.java similarity index 100% rename from spring-boot-bootstrap/src/test/java/com/baeldung/SpringBootBootstrapLiveTest.java rename to spring-boot-modules/spring-boot-bootstrap/src/test/java/com/baeldung/SpringBootBootstrapLiveTest.java diff --git a/spring-boot-bootstrap/src/test/java/com/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-bootstrap/src/test/java/com/baeldung/SpringContextTest.java similarity index 100% rename from spring-boot-bootstrap/src/test/java/com/baeldung/SpringContextTest.java rename to spring-boot-modules/spring-boot-bootstrap/src/test/java/com/baeldung/SpringContextTest.java diff --git a/spring-boot-camel/README.md b/spring-boot-modules/spring-boot-camel/README.md similarity index 100% rename from spring-boot-camel/README.md rename to spring-boot-modules/spring-boot-camel/README.md diff --git a/spring-boot-camel/pom.xml b/spring-boot-modules/spring-boot-camel/pom.xml similarity index 95% rename from spring-boot-camel/pom.xml rename to spring-boot-modules/spring-boot-camel/pom.xml index 8bab0ed5c8..7c1e28b3ee 100644 --- a/spring-boot-camel/pom.xml +++ b/spring-boot-modules/spring-boot-camel/pom.xml @@ -8,8 +8,8 @@ spring-boot-camel - com.baeldung - parent-modules + com.baeldung.spring-boot-modules + spring-boot-modules 1.0.0-SNAPSHOT diff --git a/spring-boot-camel/src/main/java/com/baeldung/camel/Application.java b/spring-boot-modules/spring-boot-camel/src/main/java/com/baeldung/camel/Application.java similarity index 100% rename from spring-boot-camel/src/main/java/com/baeldung/camel/Application.java rename to spring-boot-modules/spring-boot-camel/src/main/java/com/baeldung/camel/Application.java diff --git a/spring-boot-camel/src/main/java/com/baeldung/camel/ExampleServices.java b/spring-boot-modules/spring-boot-camel/src/main/java/com/baeldung/camel/ExampleServices.java similarity index 100% rename from spring-boot-camel/src/main/java/com/baeldung/camel/ExampleServices.java rename to spring-boot-modules/spring-boot-camel/src/main/java/com/baeldung/camel/ExampleServices.java diff --git a/spring-boot-camel/src/main/java/com/baeldung/camel/MyBean.java b/spring-boot-modules/spring-boot-camel/src/main/java/com/baeldung/camel/MyBean.java similarity index 100% rename from spring-boot-camel/src/main/java/com/baeldung/camel/MyBean.java rename to spring-boot-modules/spring-boot-camel/src/main/java/com/baeldung/camel/MyBean.java diff --git a/spring-boot-camel/src/main/resources/application.properties b/spring-boot-modules/spring-boot-camel/src/main/resources/application.properties similarity index 100% rename from spring-boot-camel/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-camel/src/main/resources/application.properties diff --git a/spring-boot-camel/src/main/resources/application.yml b/spring-boot-modules/spring-boot-camel/src/main/resources/application.yml similarity index 100% rename from spring-boot-camel/src/main/resources/application.yml rename to spring-boot-modules/spring-boot-camel/src/main/resources/application.yml diff --git a/spring-boot-camel/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-camel/src/main/resources/logback.xml similarity index 100% rename from spring-boot-camel/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-camel/src/main/resources/logback.xml diff --git a/spring-boot-camel/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-camel/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-boot-camel/src/test/java/org/baeldung/SpringContextTest.java rename to spring-boot-modules/spring-boot-camel/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-boot-cli/README.md b/spring-boot-modules/spring-boot-cli/README.md similarity index 100% rename from spring-boot-cli/README.md rename to spring-boot-modules/spring-boot-cli/README.md diff --git a/spring-boot-cli/bash/groovy.sh b/spring-boot-modules/spring-boot-cli/bash/groovy.sh similarity index 100% rename from spring-boot-cli/bash/groovy.sh rename to spring-boot-modules/spring-boot-cli/bash/groovy.sh diff --git a/spring-boot-cli/bash/setup.sh b/spring-boot-modules/spring-boot-cli/bash/setup.sh similarity index 100% rename from spring-boot-cli/bash/setup.sh rename to spring-boot-modules/spring-boot-cli/bash/setup.sh diff --git a/spring-boot-cli/groovy/data/DataConfig.groovy b/spring-boot-modules/spring-boot-cli/groovy/data/DataConfig.groovy similarity index 100% rename from spring-boot-cli/groovy/data/DataConfig.groovy rename to spring-boot-modules/spring-boot-cli/groovy/data/DataConfig.groovy diff --git a/spring-boot-cli/groovy/security/Security.groovy b/spring-boot-modules/spring-boot-cli/groovy/security/Security.groovy similarity index 100% rename from spring-boot-cli/groovy/security/Security.groovy rename to spring-boot-modules/spring-boot-cli/groovy/security/Security.groovy diff --git a/spring-boot-cli/groovy/test/Test.groovy b/spring-boot-modules/spring-boot-cli/groovy/test/Test.groovy similarity index 100% rename from spring-boot-cli/groovy/test/Test.groovy rename to spring-boot-modules/spring-boot-cli/groovy/test/Test.groovy diff --git a/spring-boot-cli/groovy/yml/Application.groovy b/spring-boot-modules/spring-boot-cli/groovy/yml/Application.groovy similarity index 100% rename from spring-boot-cli/groovy/yml/Application.groovy rename to spring-boot-modules/spring-boot-cli/groovy/yml/Application.groovy diff --git a/spring-boot-cli/groovy/yml/config/application.yml b/spring-boot-modules/spring-boot-cli/groovy/yml/config/application.yml similarity index 100% rename from spring-boot-cli/groovy/yml/config/application.yml rename to spring-boot-modules/spring-boot-cli/groovy/yml/config/application.yml diff --git a/spring-boot-client/.gitignore b/spring-boot-modules/spring-boot-client/.gitignore similarity index 100% rename from spring-boot-client/.gitignore rename to spring-boot-modules/spring-boot-client/.gitignore diff --git a/spring-boot-client/README.MD b/spring-boot-modules/spring-boot-client/README.MD similarity index 100% rename from spring-boot-client/README.MD rename to spring-boot-modules/spring-boot-client/README.MD diff --git a/spring-boot-client/pom.xml b/spring-boot-modules/spring-boot-client/pom.xml similarity index 98% rename from spring-boot-client/pom.xml rename to spring-boot-modules/spring-boot-client/pom.xml index 2cfd413e93..40a8690953 100644 --- a/spring-boot-client/pom.xml +++ b/spring-boot-modules/spring-boot-client/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-client/src/main/java/org/baeldung/boot/Application.java b/spring-boot-modules/spring-boot-client/src/main/java/org/baeldung/boot/Application.java similarity index 100% rename from spring-boot-client/src/main/java/org/baeldung/boot/Application.java rename to spring-boot-modules/spring-boot-client/src/main/java/org/baeldung/boot/Application.java diff --git a/spring-boot-client/src/main/java/org/baeldung/boot/client/Details.java b/spring-boot-modules/spring-boot-client/src/main/java/org/baeldung/boot/client/Details.java similarity index 100% rename from spring-boot-client/src/main/java/org/baeldung/boot/client/Details.java rename to spring-boot-modules/spring-boot-client/src/main/java/org/baeldung/boot/client/Details.java diff --git a/spring-boot-client/src/main/java/org/baeldung/boot/client/DetailsServiceClient.java b/spring-boot-modules/spring-boot-client/src/main/java/org/baeldung/boot/client/DetailsServiceClient.java similarity index 100% rename from spring-boot-client/src/main/java/org/baeldung/boot/client/DetailsServiceClient.java rename to spring-boot-modules/spring-boot-client/src/main/java/org/baeldung/boot/client/DetailsServiceClient.java diff --git a/spring-boot-client/src/main/java/org/baeldung/websocket/client/Message.java b/spring-boot-modules/spring-boot-client/src/main/java/org/baeldung/websocket/client/Message.java similarity index 100% rename from spring-boot-client/src/main/java/org/baeldung/websocket/client/Message.java rename to spring-boot-modules/spring-boot-client/src/main/java/org/baeldung/websocket/client/Message.java diff --git a/spring-boot-client/src/main/java/org/baeldung/websocket/client/MyStompSessionHandler.java b/spring-boot-modules/spring-boot-client/src/main/java/org/baeldung/websocket/client/MyStompSessionHandler.java similarity index 100% rename from spring-boot-client/src/main/java/org/baeldung/websocket/client/MyStompSessionHandler.java rename to spring-boot-modules/spring-boot-client/src/main/java/org/baeldung/websocket/client/MyStompSessionHandler.java diff --git a/spring-boot-client/src/main/java/org/baeldung/websocket/client/StompClient.java b/spring-boot-modules/spring-boot-client/src/main/java/org/baeldung/websocket/client/StompClient.java similarity index 100% rename from spring-boot-client/src/main/java/org/baeldung/websocket/client/StompClient.java rename to spring-boot-modules/spring-boot-client/src/main/java/org/baeldung/websocket/client/StompClient.java diff --git a/spring-boot-client/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-client/src/main/resources/logback.xml similarity index 100% rename from spring-boot-client/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-client/src/main/resources/logback.xml diff --git a/spring-boot-client/src/test/java/com/baeldung/websocket/client/MyStompSessionHandlerIntegrationTest.java b/spring-boot-modules/spring-boot-client/src/test/java/com/baeldung/websocket/client/MyStompSessionHandlerIntegrationTest.java similarity index 100% rename from spring-boot-client/src/test/java/com/baeldung/websocket/client/MyStompSessionHandlerIntegrationTest.java rename to spring-boot-modules/spring-boot-client/src/test/java/com/baeldung/websocket/client/MyStompSessionHandlerIntegrationTest.java diff --git a/spring-boot-client/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-client/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-boot-client/src/test/java/org/baeldung/SpringContextTest.java rename to spring-boot-modules/spring-boot-client/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-boot-client/src/test/java/org/baeldung/boot/client/DetailsServiceClientIntegrationTest.java b/spring-boot-modules/spring-boot-client/src/test/java/org/baeldung/boot/client/DetailsServiceClientIntegrationTest.java similarity index 100% rename from spring-boot-client/src/test/java/org/baeldung/boot/client/DetailsServiceClientIntegrationTest.java rename to spring-boot-modules/spring-boot-client/src/test/java/org/baeldung/boot/client/DetailsServiceClientIntegrationTest.java diff --git a/spring-boot-config-jpa-error/README.md b/spring-boot-modules/spring-boot-config-jpa-error/README.md similarity index 100% rename from spring-boot-config-jpa-error/README.md rename to spring-boot-modules/spring-boot-config-jpa-error/README.md diff --git a/spring-boot-config-jpa-error/data-jpa-application/README.md b/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-application/README.md similarity index 100% rename from spring-boot-config-jpa-error/data-jpa-application/README.md rename to spring-boot-modules/spring-boot-config-jpa-error/data-jpa-application/README.md diff --git a/spring-boot-config-jpa-error/data-jpa-application/pom.xml b/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-application/pom.xml similarity index 100% rename from spring-boot-config-jpa-error/data-jpa-application/pom.xml rename to spring-boot-modules/spring-boot-config-jpa-error/data-jpa-application/pom.xml diff --git a/spring-boot-config-jpa-error/data-jpa-application/src/main/java/com/baeldung/data/jpa/ApplicationFound.java b/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-application/src/main/java/com/baeldung/data/jpa/ApplicationFound.java similarity index 100% rename from spring-boot-config-jpa-error/data-jpa-application/src/main/java/com/baeldung/data/jpa/ApplicationFound.java rename to spring-boot-modules/spring-boot-config-jpa-error/data-jpa-application/src/main/java/com/baeldung/data/jpa/ApplicationFound.java diff --git a/spring-boot-config-jpa-error/data-jpa-application/src/main/java/com/baeldung/data/jpa/application/ApplicationNotFound.java b/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-application/src/main/java/com/baeldung/data/jpa/application/ApplicationNotFound.java similarity index 100% rename from spring-boot-config-jpa-error/data-jpa-application/src/main/java/com/baeldung/data/jpa/application/ApplicationNotFound.java rename to spring-boot-modules/spring-boot-config-jpa-error/data-jpa-application/src/main/java/com/baeldung/data/jpa/application/ApplicationNotFound.java diff --git a/spring-boot-config-jpa-error/data-jpa-application/src/test/java/com/baeldung/data/jpa/DataJpaUnitTest.java b/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-application/src/test/java/com/baeldung/data/jpa/DataJpaUnitTest.java similarity index 100% rename from spring-boot-config-jpa-error/data-jpa-application/src/test/java/com/baeldung/data/jpa/DataJpaUnitTest.java rename to spring-boot-modules/spring-boot-config-jpa-error/data-jpa-application/src/test/java/com/baeldung/data/jpa/DataJpaUnitTest.java diff --git a/spring-boot-config-jpa-error/data-jpa-library/README.md b/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-library/README.md similarity index 100% rename from spring-boot-config-jpa-error/data-jpa-library/README.md rename to spring-boot-modules/spring-boot-config-jpa-error/data-jpa-library/README.md diff --git a/spring-boot-config-jpa-error/data-jpa-library/pom.xml b/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-library/pom.xml similarity index 100% rename from spring-boot-config-jpa-error/data-jpa-library/pom.xml rename to spring-boot-modules/spring-boot-config-jpa-error/data-jpa-library/pom.xml diff --git a/spring-boot-config-jpa-error/data-jpa-library/src/main/java/com/baeldung/data/jpa/libarary/model/Example.java b/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-library/src/main/java/com/baeldung/data/jpa/libarary/model/Example.java similarity index 100% rename from spring-boot-config-jpa-error/data-jpa-library/src/main/java/com/baeldung/data/jpa/libarary/model/Example.java rename to spring-boot-modules/spring-boot-config-jpa-error/data-jpa-library/src/main/java/com/baeldung/data/jpa/libarary/model/Example.java diff --git a/spring-boot-config-jpa-error/data-jpa-library/src/test/java/com/baeldung/data/jpa/TestApplication.java b/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-library/src/test/java/com/baeldung/data/jpa/TestApplication.java similarity index 100% rename from spring-boot-config-jpa-error/data-jpa-library/src/test/java/com/baeldung/data/jpa/TestApplication.java rename to spring-boot-modules/spring-boot-config-jpa-error/data-jpa-library/src/test/java/com/baeldung/data/jpa/TestApplication.java diff --git a/spring-boot-config-jpa-error/data-jpa-library/src/test/java/com/baeldung/data/jpa/libarary/DataJpaUnitTest.java b/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-library/src/test/java/com/baeldung/data/jpa/libarary/DataJpaUnitTest.java similarity index 100% rename from spring-boot-config-jpa-error/data-jpa-library/src/test/java/com/baeldung/data/jpa/libarary/DataJpaUnitTest.java rename to spring-boot-modules/spring-boot-config-jpa-error/data-jpa-library/src/test/java/com/baeldung/data/jpa/libarary/DataJpaUnitTest.java diff --git a/spring-boot-config-jpa-error/pom.xml b/spring-boot-modules/spring-boot-config-jpa-error/pom.xml similarity index 96% rename from spring-boot-config-jpa-error/pom.xml rename to spring-boot-modules/spring-boot-config-jpa-error/pom.xml index 4b99f9be93..f578957a1a 100644 --- a/spring-boot-config-jpa-error/pom.xml +++ b/spring-boot-modules/spring-boot-config-jpa-error/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2/pom.xml + ../../parent-boot-2/pom.xml diff --git a/spring-boot-crud/README.md b/spring-boot-modules/spring-boot-crud/README.md similarity index 100% rename from spring-boot-crud/README.md rename to spring-boot-modules/spring-boot-crud/README.md diff --git a/spring-boot-crud/pom.xml b/spring-boot-modules/spring-boot-crud/pom.xml similarity index 95% rename from spring-boot-crud/pom.xml rename to spring-boot-modules/spring-boot-crud/pom.xml index e78e939f0c..676d522f84 100644 --- a/spring-boot-crud/pom.xml +++ b/spring-boot-modules/spring-boot-crud/pom.xml @@ -1,86 +1,86 @@ - - - 4.0.0 - spring-boot-crud - spring-boot-crud - - - com.baeldung - parent-boot-2 - 0.0.1-SNAPSHOT - ../parent-boot-2 - - - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - org.springframework.boot - spring-boot-starter-data-jpa - - - org.springframework.boot - spring-boot-starter-test - - - org.mockito - mockito-core - test - - - com.h2database - h2 - runtime - - - - - spring-boot-crud - - - src/main/resources - true - - - - - org.springframework.boot - spring-boot-maven-plugin - - exec - - - - org.apache.maven.plugins - maven-assembly-plugin - - - jar-with-dependencies - - - - - make-assembly - package - - single - - - - - - - - - UTF-8 - - - + + + 4.0.0 + spring-boot-crud + spring-boot-crud + + + com.baeldung + parent-boot-2 + 0.0.1-SNAPSHOT + ../../parent-boot-2 + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.springframework.boot + spring-boot-starter-test + + + org.mockito + mockito-core + test + + + com.h2database + h2 + runtime + + + + + spring-boot-crud + + + src/main/resources + true + + + + + org.springframework.boot + spring-boot-maven-plugin + + exec + + + + org.apache.maven.plugins + maven-assembly-plugin + + + jar-with-dependencies + + + + + make-assembly + package + + single + + + + + + + + + UTF-8 + + + diff --git a/spring-boot-crud/src/main/java/com/baeldung/crud/Application.java b/spring-boot-modules/spring-boot-crud/src/main/java/com/baeldung/crud/Application.java similarity index 97% rename from spring-boot-crud/src/main/java/com/baeldung/crud/Application.java rename to spring-boot-modules/spring-boot-crud/src/main/java/com/baeldung/crud/Application.java index 0b686e90e9..a56a2a04c0 100644 --- a/spring-boot-crud/src/main/java/com/baeldung/crud/Application.java +++ b/spring-boot-modules/spring-boot-crud/src/main/java/com/baeldung/crud/Application.java @@ -1,23 +1,23 @@ -package com.baeldung.crud; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.autoconfigure.domain.EntityScan; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -@SpringBootApplication -@EnableAutoConfiguration -@ComponentScan(basePackages={"com.baeldung.crud"}) -@EnableJpaRepositories(basePackages="com.baeldung.crud.repositories") -@EnableTransactionManagement -@EntityScan(basePackages="com.baeldung.crud.entities") -public class Application { - - public static void main(String[] args) { - SpringApplication.run(Application.class, args); - } - -} +package com.baeldung.crud; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.domain.EntityScan; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +@SpringBootApplication +@EnableAutoConfiguration +@ComponentScan(basePackages={"com.baeldung.crud"}) +@EnableJpaRepositories(basePackages="com.baeldung.crud.repositories") +@EnableTransactionManagement +@EntityScan(basePackages="com.baeldung.crud.entities") +public class Application { + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } + +} diff --git a/spring-boot-crud/src/main/java/com/baeldung/crud/controllers/UserController.java b/spring-boot-modules/spring-boot-crud/src/main/java/com/baeldung/crud/controllers/UserController.java similarity index 97% rename from spring-boot-crud/src/main/java/com/baeldung/crud/controllers/UserController.java rename to spring-boot-modules/spring-boot-crud/src/main/java/com/baeldung/crud/controllers/UserController.java index 9a6cb477aa..726be6a384 100644 --- a/spring-boot-crud/src/main/java/com/baeldung/crud/controllers/UserController.java +++ b/spring-boot-modules/spring-boot-crud/src/main/java/com/baeldung/crud/controllers/UserController.java @@ -1,68 +1,68 @@ -package com.baeldung.crud.controllers; - -import javax.validation.Valid; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.validation.BindingResult; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; - -import com.baeldung.crud.entities.User; -import com.baeldung.crud.repositories.UserRepository; - -@Controller -public class UserController { - - private final UserRepository userRepository; - - @Autowired - public UserController(UserRepository userRepository) { - this.userRepository = userRepository; - } - - @GetMapping("/signup") - public String showSignUpForm(User user) { - return "add-user"; - } - - @PostMapping("/adduser") - public String addUser(@Valid User user, BindingResult result, Model model) { - if (result.hasErrors()) { - return "add-user"; - } - - userRepository.save(user); - model.addAttribute("users", userRepository.findAll()); - return "index"; - } - - @GetMapping("/edit/{id}") - public String showUpdateForm(@PathVariable("id") long id, Model model) { - User user = userRepository.findById(id).orElseThrow(() -> new IllegalArgumentException("Invalid user Id:" + id)); - model.addAttribute("user", user); - return "update-user"; - } - - @PostMapping("/update/{id}") - public String updateUser(@PathVariable("id") long id, @Valid User user, BindingResult result, Model model) { - if (result.hasErrors()) { - user.setId(id); - return "update-user"; - } - - userRepository.save(user); - model.addAttribute("users", userRepository.findAll()); - return "index"; - } - - @GetMapping("/delete/{id}") - public String deleteUser(@PathVariable("id") long id, Model model) { - User user = userRepository.findById(id).orElseThrow(() -> new IllegalArgumentException("Invalid user Id:" + id)); - userRepository.delete(user); - model.addAttribute("users", userRepository.findAll()); - return "index"; - } -} +package com.baeldung.crud.controllers; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; + +import com.baeldung.crud.entities.User; +import com.baeldung.crud.repositories.UserRepository; + +@Controller +public class UserController { + + private final UserRepository userRepository; + + @Autowired + public UserController(UserRepository userRepository) { + this.userRepository = userRepository; + } + + @GetMapping("/signup") + public String showSignUpForm(User user) { + return "add-user"; + } + + @PostMapping("/adduser") + public String addUser(@Valid User user, BindingResult result, Model model) { + if (result.hasErrors()) { + return "add-user"; + } + + userRepository.save(user); + model.addAttribute("users", userRepository.findAll()); + return "index"; + } + + @GetMapping("/edit/{id}") + public String showUpdateForm(@PathVariable("id") long id, Model model) { + User user = userRepository.findById(id).orElseThrow(() -> new IllegalArgumentException("Invalid user Id:" + id)); + model.addAttribute("user", user); + return "update-user"; + } + + @PostMapping("/update/{id}") + public String updateUser(@PathVariable("id") long id, @Valid User user, BindingResult result, Model model) { + if (result.hasErrors()) { + user.setId(id); + return "update-user"; + } + + userRepository.save(user); + model.addAttribute("users", userRepository.findAll()); + return "index"; + } + + @GetMapping("/delete/{id}") + public String deleteUser(@PathVariable("id") long id, Model model) { + User user = userRepository.findById(id).orElseThrow(() -> new IllegalArgumentException("Invalid user Id:" + id)); + userRepository.delete(user); + model.addAttribute("users", userRepository.findAll()); + return "index"; + } +} diff --git a/spring-boot-crud/src/main/java/com/baeldung/crud/entities/User.java b/spring-boot-modules/spring-boot-crud/src/main/java/com/baeldung/crud/entities/User.java similarity index 95% rename from spring-boot-crud/src/main/java/com/baeldung/crud/entities/User.java rename to spring-boot-modules/spring-boot-crud/src/main/java/com/baeldung/crud/entities/User.java index 2074268179..372327532f 100644 --- a/spring-boot-crud/src/main/java/com/baeldung/crud/entities/User.java +++ b/spring-boot-modules/spring-boot-crud/src/main/java/com/baeldung/crud/entities/User.java @@ -1,56 +1,56 @@ -package com.baeldung.crud.entities; - -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.validation.constraints.NotBlank; - -@Entity -public class User { - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private long id; - @NotBlank(message = "Name is mandatory") - private String name; - - @NotBlank(message = "Email is mandatory") - private String email; - - public User() {} - - public User(String name, String email) { - this.name = name; - this.email = email; - } - - public void setId(long id) { - this.id = id; - } - - public long getId() { - return id; - } - - public void setName(String name) { - this.name = name; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getName() { - return name; - } - - public String getEmail() { - return email; - } - - @Override - public String toString() { - return "User{" + "id=" + id + ", name=" + name + ", email=" + email + '}'; - } -} +package com.baeldung.crud.entities; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.validation.constraints.NotBlank; + +@Entity +public class User { + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private long id; + @NotBlank(message = "Name is mandatory") + private String name; + + @NotBlank(message = "Email is mandatory") + private String email; + + public User() {} + + public User(String name, String email) { + this.name = name; + this.email = email; + } + + public void setId(long id) { + this.id = id; + } + + public long getId() { + return id; + } + + public void setName(String name) { + this.name = name; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getName() { + return name; + } + + public String getEmail() { + return email; + } + + @Override + public String toString() { + return "User{" + "id=" + id + ", name=" + name + ", email=" + email + '}'; + } +} diff --git a/spring-boot-crud/src/main/java/com/baeldung/crud/repositories/UserRepository.java b/spring-boot-modules/spring-boot-crud/src/main/java/com/baeldung/crud/repositories/UserRepository.java similarity index 96% rename from spring-boot-crud/src/main/java/com/baeldung/crud/repositories/UserRepository.java rename to spring-boot-modules/spring-boot-crud/src/main/java/com/baeldung/crud/repositories/UserRepository.java index 72348463f2..c17ebc56ba 100644 --- a/spring-boot-crud/src/main/java/com/baeldung/crud/repositories/UserRepository.java +++ b/spring-boot-modules/spring-boot-crud/src/main/java/com/baeldung/crud/repositories/UserRepository.java @@ -1,13 +1,13 @@ -package com.baeldung.crud.repositories; - -import com.baeldung.crud.entities.User; -import java.util.List; -import org.springframework.data.repository.CrudRepository; -import org.springframework.stereotype.Repository; - -@Repository -public interface UserRepository extends CrudRepository { - - List findByName(String name); - -} +package com.baeldung.crud.repositories; + +import com.baeldung.crud.entities.User; +import java.util.List; +import org.springframework.data.repository.CrudRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface UserRepository extends CrudRepository { + + List findByName(String name); + +} diff --git a/spring-boot-crud/src/main/resources/css/shards.min.css b/spring-boot-modules/spring-boot-crud/src/main/resources/css/shards.min.css similarity index 100% rename from spring-boot-crud/src/main/resources/css/shards.min.css rename to spring-boot-modules/spring-boot-crud/src/main/resources/css/shards.min.css diff --git a/spring-boot-crud/src/main/resources/templates/add-user.html b/spring-boot-modules/spring-boot-crud/src/main/resources/templates/add-user.html similarity index 100% rename from spring-boot-crud/src/main/resources/templates/add-user.html rename to spring-boot-modules/spring-boot-crud/src/main/resources/templates/add-user.html diff --git a/spring-boot-crud/src/main/resources/templates/index.html b/spring-boot-modules/spring-boot-crud/src/main/resources/templates/index.html similarity index 100% rename from spring-boot-crud/src/main/resources/templates/index.html rename to spring-boot-modules/spring-boot-crud/src/main/resources/templates/index.html diff --git a/spring-boot-crud/src/main/resources/templates/update-user.html b/spring-boot-modules/spring-boot-crud/src/main/resources/templates/update-user.html similarity index 100% rename from spring-boot-crud/src/main/resources/templates/update-user.html rename to spring-boot-modules/spring-boot-crud/src/main/resources/templates/update-user.html diff --git a/spring-boot-crud/src/test/java/com/baeldung/crud/UserControllerUnitTest.java b/spring-boot-modules/spring-boot-crud/src/test/java/com/baeldung/crud/UserControllerUnitTest.java similarity index 97% rename from spring-boot-crud/src/test/java/com/baeldung/crud/UserControllerUnitTest.java rename to spring-boot-modules/spring-boot-crud/src/test/java/com/baeldung/crud/UserControllerUnitTest.java index 2de0828ae5..033108c195 100644 --- a/spring-boot-crud/src/test/java/com/baeldung/crud/UserControllerUnitTest.java +++ b/spring-boot-modules/spring-boot-crud/src/test/java/com/baeldung/crud/UserControllerUnitTest.java @@ -1,83 +1,83 @@ -package com.baeldung.crud; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import org.junit.BeforeClass; -import org.junit.Test; -import org.springframework.ui.Model; -import org.springframework.validation.BindingResult; - -import com.baeldung.crud.controllers.UserController; -import com.baeldung.crud.entities.User; -import com.baeldung.crud.repositories.UserRepository; - -public class UserControllerUnitTest { - - private static UserController userController; - private static UserRepository mockedUserRepository; - private static BindingResult mockedBindingResult; - private static Model mockedModel; - - @BeforeClass - public static void setUpUserControllerInstance() { - mockedUserRepository = mock(UserRepository.class); - mockedBindingResult = mock(BindingResult.class); - mockedModel = mock(Model.class); - userController = new UserController(mockedUserRepository); - } - - @Test - public void whenCalledshowSignUpForm_thenCorrect() { - User user = new User("John", "john@domain.com"); - - assertThat(userController.showSignUpForm(user)).isEqualTo("add-user"); - } - - @Test - public void whenCalledaddUserAndValidUser_thenCorrect() { - User user = new User("John", "john@domain.com"); - - when(mockedBindingResult.hasErrors()).thenReturn(false); - - assertThat(userController.addUser(user, mockedBindingResult, mockedModel)).isEqualTo("index"); - } - - @Test - public void whenCalledaddUserAndInValidUser_thenCorrect() { - User user = new User("John", "john@domain.com"); - - when(mockedBindingResult.hasErrors()).thenReturn(true); - - assertThat(userController.addUser(user, mockedBindingResult, mockedModel)).isEqualTo("add-user"); - } - - @Test(expected = IllegalArgumentException.class) - public void whenCalledshowUpdateForm_thenIllegalArgumentException() { - assertThat(userController.showUpdateForm(0, mockedModel)).isEqualTo("update-user"); - } - - @Test - public void whenCalledupdateUserAndValidUser_thenCorrect() { - User user = new User("John", "john@domain.com"); - - when(mockedBindingResult.hasErrors()).thenReturn(false); - - assertThat(userController.updateUser(1l, user, mockedBindingResult, mockedModel)).isEqualTo("index"); - } - - @Test - public void whenCalledupdateUserAndInValidUser_thenCorrect() { - User user = new User("John", "john@domain.com"); - - when(mockedBindingResult.hasErrors()).thenReturn(true); - - assertThat(userController.updateUser(1l, user, mockedBindingResult, mockedModel)).isEqualTo("update-user"); - } - - @Test(expected = IllegalArgumentException.class) - public void whenCalleddeleteUser_thenIllegalArgumentException() { - assertThat(userController.deleteUser(1l, mockedModel)).isEqualTo("index"); - } -} +package com.baeldung.crud; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import org.junit.BeforeClass; +import org.junit.Test; +import org.springframework.ui.Model; +import org.springframework.validation.BindingResult; + +import com.baeldung.crud.controllers.UserController; +import com.baeldung.crud.entities.User; +import com.baeldung.crud.repositories.UserRepository; + +public class UserControllerUnitTest { + + private static UserController userController; + private static UserRepository mockedUserRepository; + private static BindingResult mockedBindingResult; + private static Model mockedModel; + + @BeforeClass + public static void setUpUserControllerInstance() { + mockedUserRepository = mock(UserRepository.class); + mockedBindingResult = mock(BindingResult.class); + mockedModel = mock(Model.class); + userController = new UserController(mockedUserRepository); + } + + @Test + public void whenCalledshowSignUpForm_thenCorrect() { + User user = new User("John", "john@domain.com"); + + assertThat(userController.showSignUpForm(user)).isEqualTo("add-user"); + } + + @Test + public void whenCalledaddUserAndValidUser_thenCorrect() { + User user = new User("John", "john@domain.com"); + + when(mockedBindingResult.hasErrors()).thenReturn(false); + + assertThat(userController.addUser(user, mockedBindingResult, mockedModel)).isEqualTo("index"); + } + + @Test + public void whenCalledaddUserAndInValidUser_thenCorrect() { + User user = new User("John", "john@domain.com"); + + when(mockedBindingResult.hasErrors()).thenReturn(true); + + assertThat(userController.addUser(user, mockedBindingResult, mockedModel)).isEqualTo("add-user"); + } + + @Test(expected = IllegalArgumentException.class) + public void whenCalledshowUpdateForm_thenIllegalArgumentException() { + assertThat(userController.showUpdateForm(0, mockedModel)).isEqualTo("update-user"); + } + + @Test + public void whenCalledupdateUserAndValidUser_thenCorrect() { + User user = new User("John", "john@domain.com"); + + when(mockedBindingResult.hasErrors()).thenReturn(false); + + assertThat(userController.updateUser(1l, user, mockedBindingResult, mockedModel)).isEqualTo("index"); + } + + @Test + public void whenCalledupdateUserAndInValidUser_thenCorrect() { + User user = new User("John", "john@domain.com"); + + when(mockedBindingResult.hasErrors()).thenReturn(true); + + assertThat(userController.updateUser(1l, user, mockedBindingResult, mockedModel)).isEqualTo("update-user"); + } + + @Test(expected = IllegalArgumentException.class) + public void whenCalleddeleteUser_thenIllegalArgumentException() { + assertThat(userController.deleteUser(1l, mockedModel)).isEqualTo("index"); + } +} diff --git a/spring-boot-crud/src/test/java/com/baeldung/crud/UserUnitTest.java b/spring-boot-modules/spring-boot-crud/src/test/java/com/baeldung/crud/UserUnitTest.java similarity index 96% rename from spring-boot-crud/src/test/java/com/baeldung/crud/UserUnitTest.java rename to spring-boot-modules/spring-boot-crud/src/test/java/com/baeldung/crud/UserUnitTest.java index 565f6727c3..3e33e868ad 100644 --- a/spring-boot-crud/src/test/java/com/baeldung/crud/UserUnitTest.java +++ b/spring-boot-modules/spring-boot-crud/src/test/java/com/baeldung/crud/UserUnitTest.java @@ -1,48 +1,48 @@ -package com.baeldung.crud; - -import static org.assertj.core.api.Assertions.assertThat; - -import org.junit.Test; - -import com.baeldung.crud.entities.User; - -public class UserUnitTest { - - @Test - public void whenCalledGetName_thenCorrect() { - User user = new User("Julie", "julie@domain.com"); - - assertThat(user.getName()).isEqualTo("Julie"); - } - - @Test - public void whenCalledGetEmail_thenCorrect() { - User user = new User("Julie", "julie@domain.com"); - - assertThat(user.getEmail()).isEqualTo("julie@domain.com"); - } - - @Test - public void whenCalledSetName_thenCorrect() { - User user = new User("Julie", "julie@domain.com"); - - user.setName("John"); - - assertThat(user.getName()).isEqualTo("John"); - } - - @Test - public void whenCalledSetEmail_thenCorrect() { - User user = new User("Julie", "julie@domain.com"); - - user.setEmail("john@domain.com"); - - assertThat(user.getEmail()).isEqualTo("john@domain.com"); - } - - @Test - public void whenCalledtoString_thenCorrect() { - User user = new User("Julie", "julie@domain.com"); - assertThat(user.toString()).isEqualTo("User{id=0, name=Julie, email=julie@domain.com}"); - } -} +package com.baeldung.crud; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.Test; + +import com.baeldung.crud.entities.User; + +public class UserUnitTest { + + @Test + public void whenCalledGetName_thenCorrect() { + User user = new User("Julie", "julie@domain.com"); + + assertThat(user.getName()).isEqualTo("Julie"); + } + + @Test + public void whenCalledGetEmail_thenCorrect() { + User user = new User("Julie", "julie@domain.com"); + + assertThat(user.getEmail()).isEqualTo("julie@domain.com"); + } + + @Test + public void whenCalledSetName_thenCorrect() { + User user = new User("Julie", "julie@domain.com"); + + user.setName("John"); + + assertThat(user.getName()).isEqualTo("John"); + } + + @Test + public void whenCalledSetEmail_thenCorrect() { + User user = new User("Julie", "julie@domain.com"); + + user.setEmail("john@domain.com"); + + assertThat(user.getEmail()).isEqualTo("john@domain.com"); + } + + @Test + public void whenCalledtoString_thenCorrect() { + User user = new User("Julie", "julie@domain.com"); + assertThat(user.toString()).isEqualTo("User{id=0, name=Julie, email=julie@domain.com}"); + } +} diff --git a/spring-boot-ctx-fluent/README.md b/spring-boot-modules/spring-boot-ctx-fluent/README.md similarity index 100% rename from spring-boot-ctx-fluent/README.md rename to spring-boot-modules/spring-boot-ctx-fluent/README.md diff --git a/spring-boot-ctx-fluent/pom.xml b/spring-boot-modules/spring-boot-ctx-fluent/pom.xml similarity index 93% rename from spring-boot-ctx-fluent/pom.xml rename to spring-boot-modules/spring-boot-ctx-fluent/pom.xml index 782e1fd7f6..872e15d307 100644 --- a/spring-boot-ctx-fluent/pom.xml +++ b/spring-boot-modules/spring-boot-ctx-fluent/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx1/Ctx1Config.java b/spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx1/Ctx1Config.java similarity index 100% rename from spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx1/Ctx1Config.java rename to spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx1/Ctx1Config.java diff --git a/spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx1/Ctx1Controller.java b/spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx1/Ctx1Controller.java similarity index 100% rename from spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx1/Ctx1Controller.java rename to spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx1/Ctx1Controller.java diff --git a/spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx1/GreetingService.java b/spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx1/GreetingService.java similarity index 100% rename from spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx1/GreetingService.java rename to spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx1/GreetingService.java diff --git a/spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx2/Ctx2Config.java b/spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx2/Ctx2Config.java similarity index 100% rename from spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx2/Ctx2Config.java rename to spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx2/Ctx2Config.java diff --git a/spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx2/Ctx2Controller.java b/spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx2/Ctx2Controller.java similarity index 100% rename from spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx2/Ctx2Controller.java rename to spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/ctx2/Ctx2Controller.java diff --git a/spring-boot-ctx-fluent/src/main/java/com/baeldung/parent/App.java b/spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/parent/App.java similarity index 100% rename from spring-boot-ctx-fluent/src/main/java/com/baeldung/parent/App.java rename to spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/parent/App.java diff --git a/spring-boot-ctx-fluent/src/main/java/com/baeldung/parent/HomeService.java b/spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/parent/HomeService.java similarity index 100% rename from spring-boot-ctx-fluent/src/main/java/com/baeldung/parent/HomeService.java rename to spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/parent/HomeService.java diff --git a/spring-boot-ctx-fluent/src/main/java/com/baeldung/parent/IHomeService.java b/spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/parent/IHomeService.java similarity index 100% rename from spring-boot-ctx-fluent/src/main/java/com/baeldung/parent/IHomeService.java rename to spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/parent/IHomeService.java diff --git a/spring-boot-ctx-fluent/src/main/java/com/baeldung/parent/ParentConfig.java b/spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/parent/ParentConfig.java similarity index 100% rename from spring-boot-ctx-fluent/src/main/java/com/baeldung/parent/ParentConfig.java rename to spring-boot-modules/spring-boot-ctx-fluent/src/main/java/com/baeldung/parent/ParentConfig.java diff --git a/spring-boot-ctx-fluent/src/main/resources/ctx1.properties b/spring-boot-modules/spring-boot-ctx-fluent/src/main/resources/ctx1.properties similarity index 100% rename from spring-boot-ctx-fluent/src/main/resources/ctx1.properties rename to spring-boot-modules/spring-boot-ctx-fluent/src/main/resources/ctx1.properties diff --git a/spring-boot-ctx-fluent/src/main/resources/ctx2.properties b/spring-boot-modules/spring-boot-ctx-fluent/src/main/resources/ctx2.properties similarity index 100% rename from spring-boot-ctx-fluent/src/main/resources/ctx2.properties rename to spring-boot-modules/spring-boot-ctx-fluent/src/main/resources/ctx2.properties diff --git a/spring-boot-autoconfiguration/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-ctx-fluent/src/main/resources/logback.xml similarity index 100% rename from spring-boot-autoconfiguration/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-ctx-fluent/src/main/resources/logback.xml diff --git a/spring-boot-ctx-fluent/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-ctx-fluent/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-boot-ctx-fluent/src/test/java/org/baeldung/SpringContextTest.java rename to spring-boot-modules/spring-boot-ctx-fluent/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-boot-custom-starter/README.md b/spring-boot-modules/spring-boot-custom-starter/README.md similarity index 100% rename from spring-boot-custom-starter/README.md rename to spring-boot-modules/spring-boot-custom-starter/README.md diff --git a/spring-boot-custom-starter/greeter-library/README.md b/spring-boot-modules/spring-boot-custom-starter/greeter-library/README.md similarity index 100% rename from spring-boot-custom-starter/greeter-library/README.md rename to spring-boot-modules/spring-boot-custom-starter/greeter-library/README.md diff --git a/spring-boot-custom-starter/greeter-library/pom.xml b/spring-boot-modules/spring-boot-custom-starter/greeter-library/pom.xml similarity index 83% rename from spring-boot-custom-starter/greeter-library/pom.xml rename to spring-boot-modules/spring-boot-custom-starter/greeter-library/pom.xml index da30f2e4be..34cc530f2f 100644 --- a/spring-boot-custom-starter/greeter-library/pom.xml +++ b/spring-boot-modules/spring-boot-custom-starter/greeter-library/pom.xml @@ -7,10 +7,9 @@ greeter-library - com.baeldung + com.baeldung.spring-boot-modules spring-boot-custom-starter 0.0.1-SNAPSHOT - ../../spring-boot-custom-starter \ No newline at end of file diff --git a/spring-boot-custom-starter/greeter-library/src/main/java/com/baeldung/greeter/library/Greeter.java b/spring-boot-modules/spring-boot-custom-starter/greeter-library/src/main/java/com/baeldung/greeter/library/Greeter.java similarity index 100% rename from spring-boot-custom-starter/greeter-library/src/main/java/com/baeldung/greeter/library/Greeter.java rename to spring-boot-modules/spring-boot-custom-starter/greeter-library/src/main/java/com/baeldung/greeter/library/Greeter.java diff --git a/spring-boot-custom-starter/greeter-library/src/main/java/com/baeldung/greeter/library/GreeterConfigParams.java b/spring-boot-modules/spring-boot-custom-starter/greeter-library/src/main/java/com/baeldung/greeter/library/GreeterConfigParams.java similarity index 100% rename from spring-boot-custom-starter/greeter-library/src/main/java/com/baeldung/greeter/library/GreeterConfigParams.java rename to spring-boot-modules/spring-boot-custom-starter/greeter-library/src/main/java/com/baeldung/greeter/library/GreeterConfigParams.java diff --git a/spring-boot-custom-starter/greeter-library/src/main/java/com/baeldung/greeter/library/GreetingConfig.java b/spring-boot-modules/spring-boot-custom-starter/greeter-library/src/main/java/com/baeldung/greeter/library/GreetingConfig.java similarity index 100% rename from spring-boot-custom-starter/greeter-library/src/main/java/com/baeldung/greeter/library/GreetingConfig.java rename to spring-boot-modules/spring-boot-custom-starter/greeter-library/src/main/java/com/baeldung/greeter/library/GreetingConfig.java diff --git a/spring-boot-bootstrap/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-custom-starter/greeter-library/src/main/resources/logback.xml similarity index 100% rename from spring-boot-bootstrap/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-custom-starter/greeter-library/src/main/resources/logback.xml diff --git a/spring-boot-custom-starter/greeter-library/src/test/java/com/baeldung/greeter/GreeterIntegrationTest.java b/spring-boot-modules/spring-boot-custom-starter/greeter-library/src/test/java/com/baeldung/greeter/GreeterIntegrationTest.java similarity index 100% rename from spring-boot-custom-starter/greeter-library/src/test/java/com/baeldung/greeter/GreeterIntegrationTest.java rename to spring-boot-modules/spring-boot-custom-starter/greeter-library/src/test/java/com/baeldung/greeter/GreeterIntegrationTest.java diff --git a/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/pom.xml b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/pom.xml similarity index 94% rename from spring-boot-custom-starter/greeter-spring-boot-autoconfigure/pom.xml rename to spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/pom.xml index 58dd683131..0bba2936a7 100644 --- a/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/pom.xml +++ b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/pom.xml @@ -7,10 +7,9 @@ greeter-spring-boot-autoconfigure - com.baeldung + com.baeldung.spring-boot-modules spring-boot-custom-starter 0.0.1-SNAPSHOT - ../../spring-boot-custom-starter @@ -34,7 +33,7 @@ - com.baeldung + com.baeldung.spring-boot-modules greeter-library ${greeter.version} true diff --git a/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/main/java/com/baeldung/greeter/autoconfigure/GreeterAutoConfiguration.java b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/main/java/com/baeldung/greeter/autoconfigure/GreeterAutoConfiguration.java similarity index 100% rename from spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/main/java/com/baeldung/greeter/autoconfigure/GreeterAutoConfiguration.java rename to spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/main/java/com/baeldung/greeter/autoconfigure/GreeterAutoConfiguration.java diff --git a/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/main/java/com/baeldung/greeter/autoconfigure/GreeterProperties.java b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/main/java/com/baeldung/greeter/autoconfigure/GreeterProperties.java similarity index 100% rename from spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/main/java/com/baeldung/greeter/autoconfigure/GreeterProperties.java rename to spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/main/java/com/baeldung/greeter/autoconfigure/GreeterProperties.java diff --git a/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories similarity index 100% rename from spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories rename to spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories diff --git a/spring-boot-ctx-fluent/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/main/resources/logback.xml similarity index 100% rename from spring-boot-ctx-fluent/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/main/resources/logback.xml diff --git a/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/test/java/org/baeldung/SpringContextTest.java rename to spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-boot-custom-starter/greeter-spring-boot-sample-app/pom.xml b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/pom.xml similarity index 91% rename from spring-boot-custom-starter/greeter-spring-boot-sample-app/pom.xml rename to spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/pom.xml index bb1e656963..818ce5c107 100644 --- a/spring-boot-custom-starter/greeter-spring-boot-sample-app/pom.xml +++ b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/pom.xml @@ -10,12 +10,12 @@ com.baeldung parent-boot-1 0.0.1-SNAPSHOT - ../../spring-boot-custom-starter + ../../../parent-boot-1 - com.baeldung + com.baeldung.spring-boot-modules greeter-spring-boot-starter ${greeter-starter.version} diff --git a/spring-boot-custom-starter/greeter-spring-boot-sample-app/src/main/java/com/baeldung/greeter/sample/GreeterSampleApplication.java b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/src/main/java/com/baeldung/greeter/sample/GreeterSampleApplication.java similarity index 100% rename from spring-boot-custom-starter/greeter-spring-boot-sample-app/src/main/java/com/baeldung/greeter/sample/GreeterSampleApplication.java rename to spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/src/main/java/com/baeldung/greeter/sample/GreeterSampleApplication.java diff --git a/spring-boot-custom-starter/greeter-spring-boot-sample-app/src/main/resources/application.properties b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/src/main/resources/application.properties similarity index 100% rename from spring-boot-custom-starter/greeter-spring-boot-sample-app/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/src/main/resources/application.properties diff --git a/spring-boot-custom-starter/greeter-library/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/src/main/resources/logback.xml similarity index 100% rename from spring-boot-custom-starter/greeter-library/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/src/main/resources/logback.xml diff --git a/spring-boot-custom-starter/greeter-spring-boot-sample-app/src/test/java/com/baeldung/greeter/sample/GreeterSampleApplicationIntegrationTest.java b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/src/test/java/com/baeldung/greeter/sample/GreeterSampleApplicationIntegrationTest.java similarity index 100% rename from spring-boot-custom-starter/greeter-spring-boot-sample-app/src/test/java/com/baeldung/greeter/sample/GreeterSampleApplicationIntegrationTest.java rename to spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/src/test/java/com/baeldung/greeter/sample/GreeterSampleApplicationIntegrationTest.java diff --git a/spring-boot-custom-starter/greeter-spring-boot-sample-app/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-boot-custom-starter/greeter-spring-boot-sample-app/src/test/java/org/baeldung/SpringContextTest.java rename to spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-boot-custom-starter/greeter-spring-boot-starter/pom.xml b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-starter/pom.xml similarity index 90% rename from spring-boot-custom-starter/greeter-spring-boot-starter/pom.xml rename to spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-starter/pom.xml index d298756b8e..ba2b4101e8 100644 --- a/spring-boot-custom-starter/greeter-spring-boot-starter/pom.xml +++ b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-starter/pom.xml @@ -7,10 +7,9 @@ greeter-spring-boot-starter - com.baeldung + com.baeldung.spring-boot-modules spring-boot-custom-starter 0.0.1-SNAPSHOT - ../../spring-boot-custom-starter @@ -22,13 +21,13 @@ - com.baeldung + com.baeldung.spring-boot-modules greeter-spring-boot-autoconfigure ${project.version} - com.baeldung + com.baeldung.spring-boot-modules greeter-library ${greeter.version} diff --git a/spring-boot-custom-starter/greeter/pom.xml b/spring-boot-modules/spring-boot-custom-starter/greeter/pom.xml similarity index 90% rename from spring-boot-custom-starter/greeter/pom.xml rename to spring-boot-modules/spring-boot-custom-starter/greeter/pom.xml index 3117cfa355..89119e2e99 100644 --- a/spring-boot-custom-starter/greeter/pom.xml +++ b/spring-boot-modules/spring-boot-custom-starter/greeter/pom.xml @@ -10,7 +10,7 @@ com.baeldung parent-boot-1 0.0.1-SNAPSHOT - ../../parent-boot-1 + ../../../parent-boot-1 \ No newline at end of file diff --git a/spring-boot-custom-starter/pom.xml b/spring-boot-modules/spring-boot-custom-starter/pom.xml similarity index 87% rename from spring-boot-custom-starter/pom.xml rename to spring-boot-modules/spring-boot-custom-starter/pom.xml index 96c0d0a585..596b993f81 100644 --- a/spring-boot-custom-starter/pom.xml +++ b/spring-boot-modules/spring-boot-custom-starter/pom.xml @@ -8,8 +8,8 @@ pom - com.baeldung - parent-modules + com.baeldung.spring-boot-modules + spring-boot-modules 1.0.0-SNAPSHOT diff --git a/spring-boot-data/README.md b/spring-boot-modules/spring-boot-data/README.md similarity index 86% rename from spring-boot-data/README.md rename to spring-boot-modules/spring-boot-data/README.md index f023bb772f..faa38d475e 100644 --- a/spring-boot-data/README.md +++ b/spring-boot-modules/spring-boot-data/README.md @@ -9,3 +9,4 @@ This module contains articles about Spring Boot with Spring Data - [Disable Spring Data Auto Configuration](https://www.baeldung.com/spring-data-disable-auto-config) - [Repositories with Multiple Spring Data Modules](https://www.baeldung.com/spring-multiple-data-modules) - [Spring Custom Property Editor](https://www.baeldung.com/spring-mvc-custom-property-editor) +- [Using @JsonComponent in Spring Boot](https://www.baeldung.com/spring-boot-jsoncomponent) diff --git a/spring-boot-data/pom.xml b/spring-boot-modules/spring-boot-data/pom.xml similarity index 99% rename from spring-boot-data/pom.xml rename to spring-boot-modules/spring-boot-data/pom.xml index f9e51920c2..f25b4ee472 100644 --- a/spring-boot-data/pom.xml +++ b/spring-boot-modules/spring-boot-data/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-data/src/main/java/com/baeldung/SpringBootDataApplication.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/SpringBootDataApplication.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/SpringBootDataApplication.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/SpringBootDataApplication.java diff --git a/spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/User.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/User.java similarity index 86% rename from spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/User.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/User.java index 1f14131300..ca22dc57ea 100644 --- a/spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/User.java +++ b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/User.java @@ -1,4 +1,4 @@ -package org.baeldung.boot.jsoncomponent; +package com.baeldung.boot.jsoncomponent; import javafx.scene.paint.Color; diff --git a/spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/UserCombinedSerializer.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserCombinedSerializer.java similarity index 97% rename from spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/UserCombinedSerializer.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserCombinedSerializer.java index f4d7505342..d0a14da1f2 100644 --- a/spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/UserCombinedSerializer.java +++ b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserCombinedSerializer.java @@ -1,4 +1,4 @@ -package org.baeldung.boot.jsoncomponent; +package com.baeldung.boot.jsoncomponent; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; diff --git a/spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/UserJsonDeserializer.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializer.java similarity index 95% rename from spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/UserJsonDeserializer.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializer.java index f7bd822c8a..05b1cb10a0 100644 --- a/spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/UserJsonDeserializer.java +++ b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializer.java @@ -1,4 +1,4 @@ -package org.baeldung.boot.jsoncomponent; +package com.baeldung.boot.jsoncomponent; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/UserJsonSerializer.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonSerializer.java similarity index 96% rename from spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/UserJsonSerializer.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonSerializer.java index 03330d81a4..1df37728ba 100644 --- a/spring-boot/src/main/java/org/baeldung/boot/jsoncomponent/UserJsonSerializer.java +++ b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/boot/jsoncomponent/UserJsonSerializer.java @@ -1,4 +1,4 @@ -package org.baeldung.boot.jsoncomponent; +package com.baeldung.boot.jsoncomponent; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/spring-boot-data/src/main/java/com/baeldung/disableautoconfig/SpringDataJPA.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/disableautoconfig/SpringDataJPA.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/disableautoconfig/SpringDataJPA.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/disableautoconfig/SpringDataJPA.java diff --git a/spring-boot-data/src/main/java/com/baeldung/disableautoconfig/SpringDataMongoDB.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/disableautoconfig/SpringDataMongoDB.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/disableautoconfig/SpringDataMongoDB.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/disableautoconfig/SpringDataMongoDB.java diff --git a/spring-boot-data/src/main/java/com/baeldung/disableautoconfig/SpringDataRedis.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/disableautoconfig/SpringDataRedis.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/disableautoconfig/SpringDataRedis.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/disableautoconfig/SpringDataRedis.java diff --git a/spring-boot-data/src/main/java/com/baeldung/javers/README.md b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/README.md similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/javers/README.md rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/README.md diff --git a/spring-boot-data/src/main/java/com/baeldung/javers/SpringBootJaVersApplication.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/SpringBootJaVersApplication.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/javers/SpringBootJaVersApplication.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/SpringBootJaVersApplication.java diff --git a/spring-boot-data/src/main/java/com/baeldung/javers/config/JaversConfiguration.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/config/JaversConfiguration.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/javers/config/JaversConfiguration.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/config/JaversConfiguration.java diff --git a/spring-boot-data/src/main/java/com/baeldung/javers/domain/Address.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/domain/Address.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/javers/domain/Address.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/domain/Address.java diff --git a/spring-boot-data/src/main/java/com/baeldung/javers/domain/Product.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/domain/Product.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/javers/domain/Product.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/domain/Product.java diff --git a/spring-boot-data/src/main/java/com/baeldung/javers/domain/Store.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/domain/Store.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/javers/domain/Store.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/domain/Store.java diff --git a/spring-boot-data/src/main/java/com/baeldung/javers/repo/ProductRepository.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/repo/ProductRepository.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/javers/repo/ProductRepository.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/repo/ProductRepository.java diff --git a/spring-boot-data/src/main/java/com/baeldung/javers/repo/StoreRepository.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/repo/StoreRepository.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/javers/repo/StoreRepository.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/repo/StoreRepository.java diff --git a/spring-boot-data/src/main/java/com/baeldung/javers/service/StoreService.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/service/StoreService.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/javers/service/StoreService.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/service/StoreService.java diff --git a/spring-boot-data/src/main/java/com/baeldung/javers/web/RebrandStoreDto.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/web/RebrandStoreDto.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/javers/web/RebrandStoreDto.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/web/RebrandStoreDto.java diff --git a/spring-boot-data/src/main/java/com/baeldung/javers/web/StoreController.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/web/StoreController.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/javers/web/StoreController.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/web/StoreController.java diff --git a/spring-boot-data/src/main/java/com/baeldung/javers/web/UpdatePriceDto.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/web/UpdatePriceDto.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/javers/web/UpdatePriceDto.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/javers/web/UpdatePriceDto.java diff --git a/spring-boot-data/src/main/java/com/baeldung/jsondateformat/Contact.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsondateformat/Contact.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/jsondateformat/Contact.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsondateformat/Contact.java diff --git a/spring-boot-data/src/main/java/com/baeldung/jsondateformat/ContactApp.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsondateformat/ContactApp.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/jsondateformat/ContactApp.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsondateformat/ContactApp.java diff --git a/spring-boot-data/src/main/java/com/baeldung/jsondateformat/ContactAppConfig.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsondateformat/ContactAppConfig.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/jsondateformat/ContactAppConfig.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsondateformat/ContactAppConfig.java diff --git a/spring-boot-data/src/main/java/com/baeldung/jsondateformat/ContactController.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsondateformat/ContactController.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/jsondateformat/ContactController.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsondateformat/ContactController.java diff --git a/spring-boot-data/src/main/java/com/baeldung/jsondateformat/ContactWithJavaUtilDate.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsondateformat/ContactWithJavaUtilDate.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/jsondateformat/ContactWithJavaUtilDate.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsondateformat/ContactWithJavaUtilDate.java diff --git a/spring-boot-data/src/main/java/com/baeldung/jsondateformat/PlainContact.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsondateformat/PlainContact.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/jsondateformat/PlainContact.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsondateformat/PlainContact.java diff --git a/spring-boot-data/src/main/java/com/baeldung/jsondateformat/PlainContactWithJavaUtilDate.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsondateformat/PlainContactWithJavaUtilDate.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/jsondateformat/PlainContactWithJavaUtilDate.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsondateformat/PlainContactWithJavaUtilDate.java diff --git a/spring-boot-data/src/main/java/com/baeldung/jsonexception/CustomException.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsonexception/CustomException.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/jsonexception/CustomException.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsonexception/CustomException.java diff --git a/spring-boot-data/src/main/java/com/baeldung/jsonexception/ErrorHandler.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsonexception/ErrorHandler.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/jsonexception/ErrorHandler.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsonexception/ErrorHandler.java diff --git a/spring-boot-data/src/main/java/com/baeldung/jsonexception/MainController.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsonexception/MainController.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/jsonexception/MainController.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/jsonexception/MainController.java diff --git a/spring-boot-data/src/main/java/com/baeldung/propertyeditor/PropertyEditorApplication.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/propertyeditor/PropertyEditorApplication.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/propertyeditor/PropertyEditorApplication.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/propertyeditor/PropertyEditorApplication.java diff --git a/spring-boot-data/src/main/java/com/baeldung/propertyeditor/PropertyEditorRestController.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/propertyeditor/PropertyEditorRestController.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/propertyeditor/PropertyEditorRestController.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/propertyeditor/PropertyEditorRestController.java diff --git a/spring-boot-data/src/main/java/com/baeldung/propertyeditor/creditcard/CreditCard.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/propertyeditor/creditcard/CreditCard.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/propertyeditor/creditcard/CreditCard.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/propertyeditor/creditcard/CreditCard.java diff --git a/spring-boot-data/src/main/java/com/baeldung/propertyeditor/creditcard/CreditCardEditor.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/propertyeditor/creditcard/CreditCardEditor.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/propertyeditor/creditcard/CreditCardEditor.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/propertyeditor/creditcard/CreditCardEditor.java diff --git a/spring-boot-data/src/main/java/com/baeldung/propertyeditor/exotictype/editor/CustomExoticTypeEditor.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/propertyeditor/exotictype/editor/CustomExoticTypeEditor.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/propertyeditor/exotictype/editor/CustomExoticTypeEditor.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/propertyeditor/exotictype/editor/CustomExoticTypeEditor.java diff --git a/spring-boot-data/src/main/java/com/baeldung/propertyeditor/exotictype/model/ExoticType.java b/spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/propertyeditor/exotictype/model/ExoticType.java similarity index 100% rename from spring-boot-data/src/main/java/com/baeldung/propertyeditor/exotictype/model/ExoticType.java rename to spring-boot-modules/spring-boot-data/src/main/java/com/baeldung/propertyeditor/exotictype/model/ExoticType.java diff --git a/spring-boot-data/src/main/resources/application.properties b/spring-boot-modules/spring-boot-data/src/main/resources/application.properties similarity index 100% rename from spring-boot-data/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-data/src/main/resources/application.properties diff --git a/spring-boot/src/test/java/org/baeldung/boot/jsoncomponent/UserJsonDeserializerIntegrationTest.java b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializerIntegrationTest.java similarity index 90% rename from spring-boot/src/test/java/org/baeldung/boot/jsoncomponent/UserJsonDeserializerIntegrationTest.java rename to spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializerIntegrationTest.java index f8b47a23fc..868d40c38b 100644 --- a/spring-boot/src/test/java/org/baeldung/boot/jsoncomponent/UserJsonDeserializerIntegrationTest.java +++ b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonDeserializerIntegrationTest.java @@ -1,9 +1,9 @@ -package org.baeldung.boot.jsoncomponent; +package com.baeldung.boot.jsoncomponent; +import com.baeldung.boot.jsoncomponent.User; import com.fasterxml.jackson.databind.ObjectMapper; import javafx.scene.paint.Color; -import org.baeldung.boot.jsoncomponent.User; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; diff --git a/spring-boot/src/test/java/org/baeldung/boot/jsoncomponent/UserJsonSerializerIntegrationTest.java b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonSerializerIntegrationTest.java similarity index 90% rename from spring-boot/src/test/java/org/baeldung/boot/jsoncomponent/UserJsonSerializerIntegrationTest.java rename to spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonSerializerIntegrationTest.java index 060374e8fa..aef99921a5 100644 --- a/spring-boot/src/test/java/org/baeldung/boot/jsoncomponent/UserJsonSerializerIntegrationTest.java +++ b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/boot/jsoncomponent/UserJsonSerializerIntegrationTest.java @@ -1,5 +1,6 @@ -package org.baeldung.boot.jsoncomponent; +package com.baeldung.boot.jsoncomponent; +import com.baeldung.boot.jsoncomponent.User; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import javafx.scene.paint.Color; @@ -11,8 +12,6 @@ import org.springframework.test.context.junit4.SpringRunner; import static org.junit.Assert.assertEquals; -import org.baeldung.boot.jsoncomponent.User; - @JsonTest @RunWith(SpringRunner.class) public class UserJsonSerializerIntegrationTest { diff --git a/spring-boot-data/src/test/java/com/baeldung/disableautoconfig/SpringDataJPAIntegrationTest.java b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/disableautoconfig/SpringDataJPAIntegrationTest.java similarity index 100% rename from spring-boot-data/src/test/java/com/baeldung/disableautoconfig/SpringDataJPAIntegrationTest.java rename to spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/disableautoconfig/SpringDataJPAIntegrationTest.java diff --git a/spring-boot-data/src/test/java/com/baeldung/disableautoconfig/SpringDataMongoDBIntegrationTest.java b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/disableautoconfig/SpringDataMongoDBIntegrationTest.java similarity index 100% rename from spring-boot-data/src/test/java/com/baeldung/disableautoconfig/SpringDataMongoDBIntegrationTest.java rename to spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/disableautoconfig/SpringDataMongoDBIntegrationTest.java diff --git a/spring-boot-data/src/test/java/com/baeldung/disableautoconfig/SpringDataRedisIntegrationTest.java b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/disableautoconfig/SpringDataRedisIntegrationTest.java similarity index 100% rename from spring-boot-data/src/test/java/com/baeldung/disableautoconfig/SpringDataRedisIntegrationTest.java rename to spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/disableautoconfig/SpringDataRedisIntegrationTest.java diff --git a/spring-boot-data/src/test/java/com/baeldung/jsondateformat/ContactAppIntegrationTest.java b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/jsondateformat/ContactAppIntegrationTest.java similarity index 100% rename from spring-boot-data/src/test/java/com/baeldung/jsondateformat/ContactAppIntegrationTest.java rename to spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/jsondateformat/ContactAppIntegrationTest.java diff --git a/spring-boot-data/src/test/java/com/baeldung/jsondateformat/ContactAppWithObjectMapperCustomizerIntegrationTest.java b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/jsondateformat/ContactAppWithObjectMapperCustomizerIntegrationTest.java similarity index 100% rename from spring-boot-data/src/test/java/com/baeldung/jsondateformat/ContactAppWithObjectMapperCustomizerIntegrationTest.java rename to spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/jsondateformat/ContactAppWithObjectMapperCustomizerIntegrationTest.java diff --git a/spring-boot-data/src/test/java/com/baeldung/jsonexception/MainControllerIntegrationTest.java b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/jsonexception/MainControllerIntegrationTest.java similarity index 100% rename from spring-boot-data/src/test/java/com/baeldung/jsonexception/MainControllerIntegrationTest.java rename to spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/jsonexception/MainControllerIntegrationTest.java diff --git a/spring-boot-data/src/test/java/com/baeldung/propertyeditor/creditcard/CreditCardEditorUnitTest.java b/spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/propertyeditor/creditcard/CreditCardEditorUnitTest.java similarity index 100% rename from spring-boot-data/src/test/java/com/baeldung/propertyeditor/creditcard/CreditCardEditorUnitTest.java rename to spring-boot-modules/spring-boot-data/src/test/java/com/baeldung/propertyeditor/creditcard/CreditCardEditorUnitTest.java diff --git a/spring-boot-data/src/test/resources/application.properties b/spring-boot-modules/spring-boot-data/src/test/resources/application.properties similarity index 100% rename from spring-boot-data/src/test/resources/application.properties rename to spring-boot-modules/spring-boot-data/src/test/resources/application.properties diff --git a/spring-boot-deployment/README.md b/spring-boot-modules/spring-boot-deployment/README.md similarity index 100% rename from spring-boot-deployment/README.md rename to spring-boot-modules/spring-boot-deployment/README.md diff --git a/spring-boot-deployment/pom.xml b/spring-boot-modules/spring-boot-deployment/pom.xml similarity index 99% rename from spring-boot-deployment/pom.xml rename to spring-boot-modules/spring-boot-deployment/pom.xml index 6f724f312b..64c0e698f6 100644 --- a/spring-boot-deployment/pom.xml +++ b/spring-boot-modules/spring-boot-deployment/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-deployment/src/main/java/com/baeldung/compare/ComparisonApplication.java b/spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/compare/ComparisonApplication.java similarity index 100% rename from spring-boot-deployment/src/main/java/com/baeldung/compare/ComparisonApplication.java rename to spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/compare/ComparisonApplication.java diff --git a/spring-boot-deployment/src/main/java/com/baeldung/compare/StartupEventHandler.java b/spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/compare/StartupEventHandler.java similarity index 100% rename from spring-boot-deployment/src/main/java/com/baeldung/compare/StartupEventHandler.java rename to spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/compare/StartupEventHandler.java diff --git a/spring-boot-deployment/src/main/java/com/baeldung/gracefulshutdown/GracefulShutdownApplication.java b/spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/gracefulshutdown/GracefulShutdownApplication.java similarity index 100% rename from spring-boot-deployment/src/main/java/com/baeldung/gracefulshutdown/GracefulShutdownApplication.java rename to spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/gracefulshutdown/GracefulShutdownApplication.java diff --git a/spring-boot-deployment/src/main/java/com/baeldung/gracefulshutdown/beans/LongRunningProcessBean.java b/spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/gracefulshutdown/beans/LongRunningProcessBean.java similarity index 100% rename from spring-boot-deployment/src/main/java/com/baeldung/gracefulshutdown/beans/LongRunningProcessBean.java rename to spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/gracefulshutdown/beans/LongRunningProcessBean.java diff --git a/spring-boot-deployment/src/main/java/com/baeldung/gracefulshutdown/config/SpringConfiguration.java b/spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/gracefulshutdown/config/SpringConfiguration.java similarity index 100% rename from spring-boot-deployment/src/main/java/com/baeldung/gracefulshutdown/config/SpringConfiguration.java rename to spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/gracefulshutdown/config/SpringConfiguration.java diff --git a/spring-boot-deployment/src/main/java/com/baeldung/springbootconfiguration/SpringBootConfigurationApplication.java b/spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/springbootconfiguration/SpringBootConfigurationApplication.java similarity index 100% rename from spring-boot-deployment/src/main/java/com/baeldung/springbootconfiguration/SpringBootConfigurationApplication.java rename to spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/springbootconfiguration/SpringBootConfigurationApplication.java diff --git a/spring-boot-deployment/src/main/java/com/baeldung/springbootconfiguration/controller/GreetingsController.java b/spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/springbootconfiguration/controller/GreetingsController.java similarity index 100% rename from spring-boot-deployment/src/main/java/com/baeldung/springbootconfiguration/controller/GreetingsController.java rename to spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/springbootconfiguration/controller/GreetingsController.java diff --git a/spring-boot-deployment/src/main/java/com/baeldung/springbootnonwebapp/SpringBootConsoleApplication.java b/spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/springbootnonwebapp/SpringBootConsoleApplication.java similarity index 100% rename from spring-boot-deployment/src/main/java/com/baeldung/springbootnonwebapp/SpringBootConsoleApplication.java rename to spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/springbootnonwebapp/SpringBootConsoleApplication.java diff --git a/spring-boot-deployment/src/main/java/com/baeldung/springbootsimple/SpringBootTomcatApplication.java b/spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/springbootsimple/SpringBootTomcatApplication.java similarity index 100% rename from spring-boot-deployment/src/main/java/com/baeldung/springbootsimple/SpringBootTomcatApplication.java rename to spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/springbootsimple/SpringBootTomcatApplication.java diff --git a/spring-boot-deployment/src/main/java/com/baeldung/springbootsimple/TomcatController.java b/spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/springbootsimple/TomcatController.java similarity index 100% rename from spring-boot-deployment/src/main/java/com/baeldung/springbootsimple/TomcatController.java rename to spring-boot-modules/spring-boot-deployment/src/main/java/com/baeldung/springbootsimple/TomcatController.java diff --git a/spring-boot-deployment/src/main/resources/application.properties b/spring-boot-modules/spring-boot-deployment/src/main/resources/application.properties similarity index 100% rename from spring-boot-deployment/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-deployment/src/main/resources/application.properties diff --git a/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-deployment/src/main/resources/logback.xml similarity index 100% rename from spring-boot-custom-starter/greeter-spring-boot-autoconfigure/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-deployment/src/main/resources/logback.xml diff --git a/spring-boot-deployment/src/test/java/com/baeldung/springbootconfiguration/SpringContextTest.java b/spring-boot-modules/spring-boot-deployment/src/test/java/com/baeldung/springbootconfiguration/SpringContextTest.java similarity index 100% rename from spring-boot-deployment/src/test/java/com/baeldung/springbootconfiguration/SpringContextTest.java rename to spring-boot-modules/spring-boot-deployment/src/test/java/com/baeldung/springbootconfiguration/SpringContextTest.java diff --git a/spring-boot-deployment/src/test/java/com/baeldung/springbootsimple/SpringBootTomcatApplicationIntegrationTest.java b/spring-boot-modules/spring-boot-deployment/src/test/java/com/baeldung/springbootsimple/SpringBootTomcatApplicationIntegrationTest.java similarity index 100% rename from spring-boot-deployment/src/test/java/com/baeldung/springbootsimple/SpringBootTomcatApplicationIntegrationTest.java rename to spring-boot-modules/spring-boot-deployment/src/test/java/com/baeldung/springbootsimple/SpringBootTomcatApplicationIntegrationTest.java diff --git a/spring-boot-di/README.MD b/spring-boot-modules/spring-boot-di/README.MD similarity index 100% rename from spring-boot-di/README.MD rename to spring-boot-modules/spring-boot-di/README.MD diff --git a/spring-boot-di/pom.xml b/spring-boot-modules/spring-boot-di/pom.xml similarity index 97% rename from spring-boot-di/pom.xml rename to spring-boot-modules/spring-boot-di/pom.xml index 61059630c4..b24e4a9037 100644 --- a/spring-boot-di/pom.xml +++ b/spring-boot-modules/spring-boot-di/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-di/src/main/java/com/baeldung/SpringBootDiApplication.java b/spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/SpringBootDiApplication.java similarity index 100% rename from spring-boot-di/src/main/java/com/baeldung/SpringBootDiApplication.java rename to spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/SpringBootDiApplication.java diff --git a/spring-boot-di/src/main/java/com/baeldung/componentscan/ExampleBean.java b/spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/ExampleBean.java similarity index 100% rename from spring-boot-di/src/main/java/com/baeldung/componentscan/ExampleBean.java rename to spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/ExampleBean.java diff --git a/spring-boot-di/src/main/java/com/baeldung/componentscan/filter/annotation/Animal.java b/spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/filter/annotation/Animal.java similarity index 100% rename from spring-boot-di/src/main/java/com/baeldung/componentscan/filter/annotation/Animal.java rename to spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/filter/annotation/Animal.java diff --git a/spring-boot-di/src/main/java/com/baeldung/componentscan/filter/annotation/ComponentScanAnnotationFilterApp.java b/spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/filter/annotation/ComponentScanAnnotationFilterApp.java similarity index 100% rename from spring-boot-di/src/main/java/com/baeldung/componentscan/filter/annotation/ComponentScanAnnotationFilterApp.java rename to spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/filter/annotation/ComponentScanAnnotationFilterApp.java diff --git a/spring-boot-di/src/main/java/com/baeldung/componentscan/filter/annotation/Elephant.java b/spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/filter/annotation/Elephant.java similarity index 100% rename from spring-boot-di/src/main/java/com/baeldung/componentscan/filter/annotation/Elephant.java rename to spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/filter/annotation/Elephant.java diff --git a/spring-boot-di/src/main/java/com/baeldung/componentscan/springapp/SpringComponentScanApp.java b/spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/springapp/SpringComponentScanApp.java similarity index 100% rename from spring-boot-di/src/main/java/com/baeldung/componentscan/springapp/SpringComponentScanApp.java rename to spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/springapp/SpringComponentScanApp.java diff --git a/spring-boot-di/src/main/java/com/baeldung/componentscan/springapp/animals/Cat.java b/spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/springapp/animals/Cat.java similarity index 100% rename from spring-boot-di/src/main/java/com/baeldung/componentscan/springapp/animals/Cat.java rename to spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/springapp/animals/Cat.java diff --git a/spring-boot-di/src/main/java/com/baeldung/componentscan/springapp/animals/Dog.java b/spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/springapp/animals/Dog.java similarity index 100% rename from spring-boot-di/src/main/java/com/baeldung/componentscan/springapp/animals/Dog.java rename to spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/springapp/animals/Dog.java diff --git a/spring-boot-di/src/main/java/com/baeldung/componentscan/springapp/flowers/Rose.java b/spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/springapp/flowers/Rose.java similarity index 100% rename from spring-boot-di/src/main/java/com/baeldung/componentscan/springapp/flowers/Rose.java rename to spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/springapp/flowers/Rose.java diff --git a/spring-boot-di/src/main/java/com/baeldung/componentscan/springbootapp/SpringBootComponentScanApp.java b/spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/springbootapp/SpringBootComponentScanApp.java similarity index 100% rename from spring-boot-di/src/main/java/com/baeldung/componentscan/springbootapp/SpringBootComponentScanApp.java rename to spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/springbootapp/SpringBootComponentScanApp.java diff --git a/spring-boot-di/src/main/java/com/baeldung/componentscan/springbootapp/animals/Cat.java b/spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/springbootapp/animals/Cat.java similarity index 100% rename from spring-boot-di/src/main/java/com/baeldung/componentscan/springbootapp/animals/Cat.java rename to spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/springbootapp/animals/Cat.java diff --git a/spring-boot-di/src/main/java/com/baeldung/componentscan/springbootapp/animals/Dog.java b/spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/springbootapp/animals/Dog.java similarity index 100% rename from spring-boot-di/src/main/java/com/baeldung/componentscan/springbootapp/animals/Dog.java rename to spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/springbootapp/animals/Dog.java diff --git a/spring-boot-di/src/main/java/com/baeldung/componentscan/springbootapp/flowers/Rose.java b/spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/springbootapp/flowers/Rose.java similarity index 100% rename from spring-boot-di/src/main/java/com/baeldung/componentscan/springbootapp/flowers/Rose.java rename to spring-boot-modules/spring-boot-di/src/main/java/com/baeldung/componentscan/springbootapp/flowers/Rose.java diff --git a/spring-boot-environment/README.md b/spring-boot-modules/spring-boot-environment/README.md similarity index 100% rename from spring-boot-environment/README.md rename to spring-boot-modules/spring-boot-environment/README.md diff --git a/spring-boot-environment/pom.xml b/spring-boot-modules/spring-boot-environment/pom.xml similarity index 98% rename from spring-boot-environment/pom.xml rename to spring-boot-modules/spring-boot-environment/pom.xml index 531ef697d7..138c59847d 100644 --- a/spring-boot-environment/pom.xml +++ b/spring-boot-modules/spring-boot-environment/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/PriceCalculationApplication.java b/spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/PriceCalculationApplication.java similarity index 100% rename from spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/PriceCalculationApplication.java rename to spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/PriceCalculationApplication.java diff --git a/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/PriceCalculationEnvironmentPostProcessor.java b/spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/PriceCalculationEnvironmentPostProcessor.java similarity index 100% rename from spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/PriceCalculationEnvironmentPostProcessor.java rename to spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/PriceCalculationEnvironmentPostProcessor.java diff --git a/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/autoconfig/PriceCalculationAutoConfig.java b/spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/autoconfig/PriceCalculationAutoConfig.java similarity index 100% rename from spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/autoconfig/PriceCalculationAutoConfig.java rename to spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/autoconfig/PriceCalculationAutoConfig.java diff --git a/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/calculator/GrossPriceCalculator.java b/spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/calculator/GrossPriceCalculator.java similarity index 100% rename from spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/calculator/GrossPriceCalculator.java rename to spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/calculator/GrossPriceCalculator.java diff --git a/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/calculator/NetPriceCalculator.java b/spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/calculator/NetPriceCalculator.java similarity index 100% rename from spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/calculator/NetPriceCalculator.java rename to spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/calculator/NetPriceCalculator.java diff --git a/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/calculator/PriceCalculator.java b/spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/calculator/PriceCalculator.java similarity index 100% rename from spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/calculator/PriceCalculator.java rename to spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/calculator/PriceCalculator.java diff --git a/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/service/PriceCalculationService.java b/spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/service/PriceCalculationService.java similarity index 100% rename from spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/service/PriceCalculationService.java rename to spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/environmentpostprocessor/service/PriceCalculationService.java diff --git a/spring-boot-environment/src/main/java/com/baeldung/properties/ConfProperties.java b/spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/properties/ConfProperties.java similarity index 100% rename from spring-boot-environment/src/main/java/com/baeldung/properties/ConfProperties.java rename to spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/properties/ConfProperties.java diff --git a/spring-boot-environment/src/main/java/com/baeldung/properties/ExternalPropertyConfigurer.java b/spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/properties/ExternalPropertyConfigurer.java similarity index 100% rename from spring-boot-environment/src/main/java/com/baeldung/properties/ExternalPropertyConfigurer.java rename to spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/properties/ExternalPropertyConfigurer.java diff --git a/spring-boot-environment/src/main/java/com/baeldung/properties/ExternalPropertyFileLoader.java b/spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/properties/ExternalPropertyFileLoader.java similarity index 100% rename from spring-boot-environment/src/main/java/com/baeldung/properties/ExternalPropertyFileLoader.java rename to spring-boot-modules/spring-boot-environment/src/main/java/com/baeldung/properties/ExternalPropertyFileLoader.java diff --git a/spring-boot-environment/src/main/resources/META-INF/spring.factories b/spring-boot-modules/spring-boot-environment/src/main/resources/META-INF/spring.factories similarity index 100% rename from spring-boot-environment/src/main/resources/META-INF/spring.factories rename to spring-boot-modules/spring-boot-environment/src/main/resources/META-INF/spring.factories diff --git a/spring-boot-environment/src/main/resources/application.properties b/spring-boot-modules/spring-boot-environment/src/main/resources/application.properties similarity index 100% rename from spring-boot-environment/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-environment/src/main/resources/application.properties diff --git a/spring-boot-environment/src/main/resources/external/conf.properties b/spring-boot-modules/spring-boot-environment/src/main/resources/external/conf.properties similarity index 100% rename from spring-boot-environment/src/main/resources/external/conf.properties rename to spring-boot-modules/spring-boot-environment/src/main/resources/external/conf.properties diff --git a/spring-boot-custom-starter/greeter-spring-boot-sample-app/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-environment/src/main/resources/logback.xml similarity index 100% rename from spring-boot-custom-starter/greeter-spring-boot-sample-app/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-environment/src/main/resources/logback.xml diff --git a/spring-boot-environment/src/test/java/com/baeldung/environmentpostprocessor/PriceCalculationEnvironmentPostProcessorLiveTest.java b/spring-boot-modules/spring-boot-environment/src/test/java/com/baeldung/environmentpostprocessor/PriceCalculationEnvironmentPostProcessorLiveTest.java similarity index 100% rename from spring-boot-environment/src/test/java/com/baeldung/environmentpostprocessor/PriceCalculationEnvironmentPostProcessorLiveTest.java rename to spring-boot-modules/spring-boot-environment/src/test/java/com/baeldung/environmentpostprocessor/PriceCalculationEnvironmentPostProcessorLiveTest.java diff --git a/spring-boot-environment/src/test/java/com/baeldung/properties/ExternalPropertyFileLoaderIntegrationTest.java b/spring-boot-modules/spring-boot-environment/src/test/java/com/baeldung/properties/ExternalPropertyFileLoaderIntegrationTest.java similarity index 100% rename from spring-boot-environment/src/test/java/com/baeldung/properties/ExternalPropertyFileLoaderIntegrationTest.java rename to spring-boot-modules/spring-boot-environment/src/test/java/com/baeldung/properties/ExternalPropertyFileLoaderIntegrationTest.java diff --git a/spring-boot-flowable/README.md b/spring-boot-modules/spring-boot-flowable/README.md similarity index 100% rename from spring-boot-flowable/README.md rename to spring-boot-modules/spring-boot-flowable/README.md diff --git a/spring-boot-flowable/pom.xml b/spring-boot-modules/spring-boot-flowable/pom.xml similarity index 97% rename from spring-boot-flowable/pom.xml rename to spring-boot-modules/spring-boot-flowable/pom.xml index 96558b8595..7d9fb97cba 100644 --- a/spring-boot-flowable/pom.xml +++ b/spring-boot-modules/spring-boot-flowable/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-flowable/src/main/java/com/baeldung/Application.java b/spring-boot-modules/spring-boot-flowable/src/main/java/com/baeldung/Application.java similarity index 100% rename from spring-boot-flowable/src/main/java/com/baeldung/Application.java rename to spring-boot-modules/spring-boot-flowable/src/main/java/com/baeldung/Application.java diff --git a/spring-boot-flowable/src/main/java/com/baeldung/controller/ArticleWorkflowController.java b/spring-boot-modules/spring-boot-flowable/src/main/java/com/baeldung/controller/ArticleWorkflowController.java similarity index 100% rename from spring-boot-flowable/src/main/java/com/baeldung/controller/ArticleWorkflowController.java rename to spring-boot-modules/spring-boot-flowable/src/main/java/com/baeldung/controller/ArticleWorkflowController.java diff --git a/spring-boot-flowable/src/main/java/com/baeldung/domain/Approval.java b/spring-boot-modules/spring-boot-flowable/src/main/java/com/baeldung/domain/Approval.java similarity index 100% rename from spring-boot-flowable/src/main/java/com/baeldung/domain/Approval.java rename to spring-boot-modules/spring-boot-flowable/src/main/java/com/baeldung/domain/Approval.java diff --git a/spring-boot-flowable/src/main/java/com/baeldung/domain/Article.java b/spring-boot-modules/spring-boot-flowable/src/main/java/com/baeldung/domain/Article.java similarity index 100% rename from spring-boot-flowable/src/main/java/com/baeldung/domain/Article.java rename to spring-boot-modules/spring-boot-flowable/src/main/java/com/baeldung/domain/Article.java diff --git a/spring-boot-flowable/src/main/java/com/baeldung/service/ArticleWorkflowService.java b/spring-boot-modules/spring-boot-flowable/src/main/java/com/baeldung/service/ArticleWorkflowService.java similarity index 100% rename from spring-boot-flowable/src/main/java/com/baeldung/service/ArticleWorkflowService.java rename to spring-boot-modules/spring-boot-flowable/src/main/java/com/baeldung/service/ArticleWorkflowService.java diff --git a/spring-boot-flowable/src/main/java/com/baeldung/service/PublishArticleService.java b/spring-boot-modules/spring-boot-flowable/src/main/java/com/baeldung/service/PublishArticleService.java similarity index 100% rename from spring-boot-flowable/src/main/java/com/baeldung/service/PublishArticleService.java rename to spring-boot-modules/spring-boot-flowable/src/main/java/com/baeldung/service/PublishArticleService.java diff --git a/spring-boot-flowable/src/main/java/com/baeldung/service/SendMailService.java b/spring-boot-modules/spring-boot-flowable/src/main/java/com/baeldung/service/SendMailService.java similarity index 100% rename from spring-boot-flowable/src/main/java/com/baeldung/service/SendMailService.java rename to spring-boot-modules/spring-boot-flowable/src/main/java/com/baeldung/service/SendMailService.java diff --git a/spring-boot-flowable/src/main/resources/application.properties b/spring-boot-modules/spring-boot-flowable/src/main/resources/application.properties similarity index 100% rename from spring-boot-flowable/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-flowable/src/main/resources/application.properties diff --git a/spring-boot-flowable/src/main/resources/processes/article-workflow.bpmn20.xml b/spring-boot-modules/spring-boot-flowable/src/main/resources/processes/article-workflow.bpmn20.xml similarity index 100% rename from spring-boot-flowable/src/main/resources/processes/article-workflow.bpmn20.xml rename to spring-boot-modules/spring-boot-flowable/src/main/resources/processes/article-workflow.bpmn20.xml diff --git a/spring-boot-flowable/src/test/java/com/baeldung/processes/ArticleWorkflowIntegrationTest.java b/spring-boot-modules/spring-boot-flowable/src/test/java/com/baeldung/processes/ArticleWorkflowIntegrationTest.java similarity index 100% rename from spring-boot-flowable/src/test/java/com/baeldung/processes/ArticleWorkflowIntegrationTest.java rename to spring-boot-modules/spring-boot-flowable/src/test/java/com/baeldung/processes/ArticleWorkflowIntegrationTest.java diff --git a/spring-boot-gradle/.gitignore b/spring-boot-modules/spring-boot-gradle/.gitignore similarity index 100% rename from spring-boot-gradle/.gitignore rename to spring-boot-modules/spring-boot-gradle/.gitignore diff --git a/spring-boot-gradle/README.md b/spring-boot-modules/spring-boot-gradle/README.md similarity index 100% rename from spring-boot-gradle/README.md rename to spring-boot-modules/spring-boot-gradle/README.md diff --git a/spring-boot-gradle/build.gradle b/spring-boot-modules/spring-boot-gradle/build.gradle similarity index 100% rename from spring-boot-gradle/build.gradle rename to spring-boot-modules/spring-boot-gradle/build.gradle diff --git a/spring-boot-gradle/gradle/wrapper/gradle-wrapper.properties b/spring-boot-modules/spring-boot-gradle/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from spring-boot-gradle/gradle/wrapper/gradle-wrapper.properties rename to spring-boot-modules/spring-boot-gradle/gradle/wrapper/gradle-wrapper.properties diff --git a/spring-boot-gradle/gradlew b/spring-boot-modules/spring-boot-gradle/gradlew similarity index 100% rename from spring-boot-gradle/gradlew rename to spring-boot-modules/spring-boot-gradle/gradlew diff --git a/spring-boot-gradle/gradlew.bat b/spring-boot-modules/spring-boot-gradle/gradlew.bat similarity index 96% rename from spring-boot-gradle/gradlew.bat rename to spring-boot-modules/spring-boot-gradle/gradlew.bat index e95643d6a2..f9553162f1 100644 --- a/spring-boot-gradle/gradlew.bat +++ b/spring-boot-modules/spring-boot-gradle/gradlew.bat @@ -1,84 +1,84 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/spring-boot-gradle/settings.gradle b/spring-boot-modules/spring-boot-gradle/settings.gradle similarity index 100% rename from spring-boot-gradle/settings.gradle rename to spring-boot-modules/spring-boot-gradle/settings.gradle diff --git a/spring-boot-gradle/src/main/java/org/baeldung/DemoApplication.java b/spring-boot-modules/spring-boot-gradle/src/main/java/org/baeldung/DemoApplication.java similarity index 100% rename from spring-boot-gradle/src/main/java/org/baeldung/DemoApplication.java rename to spring-boot-modules/spring-boot-gradle/src/main/java/org/baeldung/DemoApplication.java diff --git a/spring-boot-gradle/src/main/resources/application.properties b/spring-boot-modules/spring-boot-gradle/src/main/resources/application.properties similarity index 100% rename from spring-boot-gradle/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-gradle/src/main/resources/application.properties diff --git a/spring-boot-deployment/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-gradle/src/main/resources/logback.xml similarity index 100% rename from spring-boot-deployment/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-gradle/src/main/resources/logback.xml diff --git a/spring-boot-gradle/src/test/java/org/baeldung/DemoApplicationTests.java b/spring-boot-modules/spring-boot-gradle/src/test/java/org/baeldung/DemoApplicationTests.java similarity index 100% rename from spring-boot-gradle/src/test/java/org/baeldung/DemoApplicationTests.java rename to spring-boot-modules/spring-boot-gradle/src/test/java/org/baeldung/DemoApplicationTests.java diff --git a/spring-boot-jasypt/.gitignore b/spring-boot-modules/spring-boot-jasypt/.gitignore similarity index 100% rename from spring-boot-jasypt/.gitignore rename to spring-boot-modules/spring-boot-jasypt/.gitignore diff --git a/spring-boot-jasypt/README.md b/spring-boot-modules/spring-boot-jasypt/README.md similarity index 100% rename from spring-boot-jasypt/README.md rename to spring-boot-modules/spring-boot-jasypt/README.md diff --git a/spring-boot-jasypt/pom.xml b/spring-boot-modules/spring-boot-jasypt/pom.xml similarity index 96% rename from spring-boot-jasypt/pom.xml rename to spring-boot-modules/spring-boot-jasypt/pom.xml index 76a501c455..e63a02729f 100644 --- a/spring-boot-jasypt/pom.xml +++ b/spring-boot-modules/spring-boot-jasypt/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-jasypt/src/main/java/com/baeldung/jasypt/Main.java b/spring-boot-modules/spring-boot-jasypt/src/main/java/com/baeldung/jasypt/Main.java similarity index 100% rename from spring-boot-jasypt/src/main/java/com/baeldung/jasypt/Main.java rename to spring-boot-modules/spring-boot-jasypt/src/main/java/com/baeldung/jasypt/Main.java diff --git a/spring-boot-jasypt/src/main/java/com/baeldung/jasypt/simple/AppConfigForJasyptSimple.java b/spring-boot-modules/spring-boot-jasypt/src/main/java/com/baeldung/jasypt/simple/AppConfigForJasyptSimple.java similarity index 100% rename from spring-boot-jasypt/src/main/java/com/baeldung/jasypt/simple/AppConfigForJasyptSimple.java rename to spring-boot-modules/spring-boot-jasypt/src/main/java/com/baeldung/jasypt/simple/AppConfigForJasyptSimple.java diff --git a/spring-boot-jasypt/src/main/java/com/baeldung/jasypt/simple/PropertyServiceForJasyptSimple.java b/spring-boot-modules/spring-boot-jasypt/src/main/java/com/baeldung/jasypt/simple/PropertyServiceForJasyptSimple.java similarity index 100% rename from spring-boot-jasypt/src/main/java/com/baeldung/jasypt/simple/PropertyServiceForJasyptSimple.java rename to spring-boot-modules/spring-boot-jasypt/src/main/java/com/baeldung/jasypt/simple/PropertyServiceForJasyptSimple.java diff --git a/spring-boot-jasypt/src/main/java/com/baeldung/jasypt/starter/AppConfigForJasyptStarter.java b/spring-boot-modules/spring-boot-jasypt/src/main/java/com/baeldung/jasypt/starter/AppConfigForJasyptStarter.java similarity index 100% rename from spring-boot-jasypt/src/main/java/com/baeldung/jasypt/starter/AppConfigForJasyptStarter.java rename to spring-boot-modules/spring-boot-jasypt/src/main/java/com/baeldung/jasypt/starter/AppConfigForJasyptStarter.java diff --git a/spring-boot-jasypt/src/main/java/com/baeldung/jasypt/starter/PropertyServiceForJasyptStarter.java b/spring-boot-modules/spring-boot-jasypt/src/main/java/com/baeldung/jasypt/starter/PropertyServiceForJasyptStarter.java similarity index 100% rename from spring-boot-jasypt/src/main/java/com/baeldung/jasypt/starter/PropertyServiceForJasyptStarter.java rename to spring-boot-modules/spring-boot-jasypt/src/main/java/com/baeldung/jasypt/starter/PropertyServiceForJasyptStarter.java diff --git a/spring-boot-jasypt/src/main/resources/application.properties b/spring-boot-modules/spring-boot-jasypt/src/main/resources/application.properties similarity index 100% rename from spring-boot-jasypt/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-jasypt/src/main/resources/application.properties diff --git a/spring-boot-jasypt/src/main/resources/encrypted.properties b/spring-boot-modules/spring-boot-jasypt/src/main/resources/encrypted.properties similarity index 100% rename from spring-boot-jasypt/src/main/resources/encrypted.properties rename to spring-boot-modules/spring-boot-jasypt/src/main/resources/encrypted.properties diff --git a/spring-boot-jasypt/src/main/resources/encryptedv2.properties b/spring-boot-modules/spring-boot-jasypt/src/main/resources/encryptedv2.properties similarity index 100% rename from spring-boot-jasypt/src/main/resources/encryptedv2.properties rename to spring-boot-modules/spring-boot-jasypt/src/main/resources/encryptedv2.properties diff --git a/spring-boot-environment/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-jasypt/src/main/resources/logback.xml similarity index 100% rename from spring-boot-environment/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-jasypt/src/main/resources/logback.xml diff --git a/spring-boot-jasypt/src/test/java/com/baeldung/jasypt/CustomJasyptIntegrationTest.java b/spring-boot-modules/spring-boot-jasypt/src/test/java/com/baeldung/jasypt/CustomJasyptIntegrationTest.java similarity index 100% rename from spring-boot-jasypt/src/test/java/com/baeldung/jasypt/CustomJasyptIntegrationTest.java rename to spring-boot-modules/spring-boot-jasypt/src/test/java/com/baeldung/jasypt/CustomJasyptIntegrationTest.java diff --git a/spring-boot-jasypt/src/test/java/com/baeldung/jasypt/JasyptSimpleIntegrationTest.java b/spring-boot-modules/spring-boot-jasypt/src/test/java/com/baeldung/jasypt/JasyptSimpleIntegrationTest.java similarity index 100% rename from spring-boot-jasypt/src/test/java/com/baeldung/jasypt/JasyptSimpleIntegrationTest.java rename to spring-boot-modules/spring-boot-jasypt/src/test/java/com/baeldung/jasypt/JasyptSimpleIntegrationTest.java diff --git a/spring-boot-jasypt/src/test/java/com/baeldung/jasypt/JasyptWithStarterIntegrationTest.java b/spring-boot-modules/spring-boot-jasypt/src/test/java/com/baeldung/jasypt/JasyptWithStarterIntegrationTest.java similarity index 100% rename from spring-boot-jasypt/src/test/java/com/baeldung/jasypt/JasyptWithStarterIntegrationTest.java rename to spring-boot-modules/spring-boot-jasypt/src/test/java/com/baeldung/jasypt/JasyptWithStarterIntegrationTest.java diff --git a/spring-boot-jasypt/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-jasypt/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-boot-jasypt/src/test/java/org/baeldung/SpringContextTest.java rename to spring-boot-modules/spring-boot-jasypt/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-boot-keycloak/.gitignore b/spring-boot-modules/spring-boot-keycloak/.gitignore similarity index 100% rename from spring-boot-keycloak/.gitignore rename to spring-boot-modules/spring-boot-keycloak/.gitignore diff --git a/spring-boot-keycloak/.mvn/wrapper/maven-wrapper.jar b/spring-boot-modules/spring-boot-keycloak/.mvn/wrapper/maven-wrapper.jar similarity index 100% rename from spring-boot-keycloak/.mvn/wrapper/maven-wrapper.jar rename to spring-boot-modules/spring-boot-keycloak/.mvn/wrapper/maven-wrapper.jar diff --git a/spring-boot-keycloak/.mvn/wrapper/maven-wrapper.properties b/spring-boot-modules/spring-boot-keycloak/.mvn/wrapper/maven-wrapper.properties similarity index 100% rename from spring-boot-keycloak/.mvn/wrapper/maven-wrapper.properties rename to spring-boot-modules/spring-boot-keycloak/.mvn/wrapper/maven-wrapper.properties diff --git a/spring-boot-keycloak/README.md b/spring-boot-modules/spring-boot-keycloak/README.md similarity index 100% rename from spring-boot-keycloak/README.md rename to spring-boot-modules/spring-boot-keycloak/README.md diff --git a/spring-boot-keycloak/mvnw b/spring-boot-modules/spring-boot-keycloak/mvnw similarity index 100% rename from spring-boot-keycloak/mvnw rename to spring-boot-modules/spring-boot-keycloak/mvnw diff --git a/spring-boot-keycloak/mvnw.cmd b/spring-boot-modules/spring-boot-keycloak/mvnw.cmd similarity index 100% rename from spring-boot-keycloak/mvnw.cmd rename to spring-boot-modules/spring-boot-keycloak/mvnw.cmd diff --git a/spring-boot-keycloak/pom.xml b/spring-boot-modules/spring-boot-keycloak/pom.xml similarity index 98% rename from spring-boot-keycloak/pom.xml rename to spring-boot-modules/spring-boot-keycloak/pom.xml index 609b4d1dec..c29c1a738b 100644 --- a/spring-boot-keycloak/pom.xml +++ b/spring-boot-modules/spring-boot-keycloak/pom.xml @@ -13,7 +13,7 @@ com.baeldung parent-boot-1 0.0.1-SNAPSHOT - ../parent-boot-1 + ../../parent-boot-1 diff --git a/spring-boot-keycloak/src/main/java/com/baeldung/keycloak/Customer.java b/spring-boot-modules/spring-boot-keycloak/src/main/java/com/baeldung/keycloak/Customer.java similarity index 100% rename from spring-boot-keycloak/src/main/java/com/baeldung/keycloak/Customer.java rename to spring-boot-modules/spring-boot-keycloak/src/main/java/com/baeldung/keycloak/Customer.java diff --git a/spring-boot-keycloak/src/main/java/com/baeldung/keycloak/CustomerDAO.java b/spring-boot-modules/spring-boot-keycloak/src/main/java/com/baeldung/keycloak/CustomerDAO.java similarity index 100% rename from spring-boot-keycloak/src/main/java/com/baeldung/keycloak/CustomerDAO.java rename to spring-boot-modules/spring-boot-keycloak/src/main/java/com/baeldung/keycloak/CustomerDAO.java diff --git a/spring-boot-keycloak/src/main/java/com/baeldung/keycloak/SecurityConfig.java b/spring-boot-modules/spring-boot-keycloak/src/main/java/com/baeldung/keycloak/SecurityConfig.java similarity index 100% rename from spring-boot-keycloak/src/main/java/com/baeldung/keycloak/SecurityConfig.java rename to spring-boot-modules/spring-boot-keycloak/src/main/java/com/baeldung/keycloak/SecurityConfig.java diff --git a/spring-boot-keycloak/src/main/java/com/baeldung/keycloak/SpringBoot.java b/spring-boot-modules/spring-boot-keycloak/src/main/java/com/baeldung/keycloak/SpringBoot.java similarity index 100% rename from spring-boot-keycloak/src/main/java/com/baeldung/keycloak/SpringBoot.java rename to spring-boot-modules/spring-boot-keycloak/src/main/java/com/baeldung/keycloak/SpringBoot.java diff --git a/spring-boot-keycloak/src/main/java/com/baeldung/keycloak/WebController.java b/spring-boot-modules/spring-boot-keycloak/src/main/java/com/baeldung/keycloak/WebController.java similarity index 100% rename from spring-boot-keycloak/src/main/java/com/baeldung/keycloak/WebController.java rename to spring-boot-modules/spring-boot-keycloak/src/main/java/com/baeldung/keycloak/WebController.java diff --git a/spring-boot-keycloak/src/main/resources/application.properties b/spring-boot-modules/spring-boot-keycloak/src/main/resources/application.properties similarity index 100% rename from spring-boot-keycloak/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-keycloak/src/main/resources/application.properties diff --git a/spring-boot-gradle/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-keycloak/src/main/resources/logback.xml similarity index 100% rename from spring-boot-gradle/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-keycloak/src/main/resources/logback.xml diff --git a/spring-boot-keycloak/src/main/resources/templates/customers.html b/spring-boot-modules/spring-boot-keycloak/src/main/resources/templates/customers.html similarity index 100% rename from spring-boot-keycloak/src/main/resources/templates/customers.html rename to spring-boot-modules/spring-boot-keycloak/src/main/resources/templates/customers.html diff --git a/spring-boot-keycloak/src/main/resources/templates/external.html b/spring-boot-modules/spring-boot-keycloak/src/main/resources/templates/external.html similarity index 100% rename from spring-boot-keycloak/src/main/resources/templates/external.html rename to spring-boot-modules/spring-boot-keycloak/src/main/resources/templates/external.html diff --git a/spring-boot-keycloak/src/main/resources/templates/layout.html b/spring-boot-modules/spring-boot-keycloak/src/main/resources/templates/layout.html similarity index 100% rename from spring-boot-keycloak/src/main/resources/templates/layout.html rename to spring-boot-modules/spring-boot-keycloak/src/main/resources/templates/layout.html diff --git a/spring-boot-keycloak/src/test/java/com/baeldung/keycloak/KeycloakConfigurationIntegrationTest.java b/spring-boot-modules/spring-boot-keycloak/src/test/java/com/baeldung/keycloak/KeycloakConfigurationIntegrationTest.java similarity index 100% rename from spring-boot-keycloak/src/test/java/com/baeldung/keycloak/KeycloakConfigurationIntegrationTest.java rename to spring-boot-modules/spring-boot-keycloak/src/test/java/com/baeldung/keycloak/KeycloakConfigurationIntegrationTest.java diff --git a/spring-boot-keycloak/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-keycloak/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-boot-keycloak/src/test/java/org/baeldung/SpringContextTest.java rename to spring-boot-modules/spring-boot-keycloak/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-boot-kotlin/README.md b/spring-boot-modules/spring-boot-kotlin/README.md similarity index 74% rename from spring-boot-kotlin/README.md rename to spring-boot-modules/spring-boot-kotlin/README.md index d393805ed1..fb91fdee15 100644 --- a/spring-boot-kotlin/README.md +++ b/spring-boot-modules/spring-boot-kotlin/README.md @@ -3,4 +3,4 @@ This module contains articles about Kotlin in Spring Boot projects. ### Relevant Articles: -- [Non-blocking Spring Boot with Kotlin Coroutines](https://www.baeldung.com/non-blocking-spring-boot-with-kotlin-coroutines) +- [Non-blocking Spring Boot with Kotlin Coroutines](https://www.baeldung.com/spring-boot-kotlin-coroutines) diff --git a/spring-boot-kotlin/pom.xml b/spring-boot-modules/spring-boot-kotlin/pom.xml similarity index 98% rename from spring-boot-kotlin/pom.xml rename to spring-boot-modules/spring-boot-kotlin/pom.xml index a98d76a398..79d62645da 100644 --- a/spring-boot-kotlin/pom.xml +++ b/spring-boot-modules/spring-boot-kotlin/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-kotlin 1.0.0-SNAPSHOT - ../parent-kotlin + ../../parent-kotlin diff --git a/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/SpringApplication.kt b/spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/SpringApplication.kt similarity index 100% rename from spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/SpringApplication.kt rename to spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/SpringApplication.kt diff --git a/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/config/DatastoreConfig.kt b/spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/config/DatastoreConfig.kt similarity index 100% rename from spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/config/DatastoreConfig.kt rename to spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/config/DatastoreConfig.kt diff --git a/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/config/RouterConfiguration.kt b/spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/config/RouterConfiguration.kt similarity index 100% rename from spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/config/RouterConfiguration.kt rename to spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/config/RouterConfiguration.kt diff --git a/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/config/WebClientConfiguration.kt b/spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/config/WebClientConfiguration.kt similarity index 100% rename from spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/config/WebClientConfiguration.kt rename to spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/config/WebClientConfiguration.kt diff --git a/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/controller/ProductController.kt b/spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/controller/ProductController.kt similarity index 100% rename from spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/controller/ProductController.kt rename to spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/controller/ProductController.kt diff --git a/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/controller/ProductControllerCoroutines.kt b/spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/controller/ProductControllerCoroutines.kt similarity index 100% rename from spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/controller/ProductControllerCoroutines.kt rename to spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/controller/ProductControllerCoroutines.kt diff --git a/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/controller/ProductStockView.kt b/spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/controller/ProductStockView.kt similarity index 100% rename from spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/controller/ProductStockView.kt rename to spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/controller/ProductStockView.kt diff --git a/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/handlers/ProductsHandler.kt b/spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/handlers/ProductsHandler.kt similarity index 100% rename from spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/handlers/ProductsHandler.kt rename to spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/handlers/ProductsHandler.kt diff --git a/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/model/Product.kt b/spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/model/Product.kt similarity index 100% rename from spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/model/Product.kt rename to spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/model/Product.kt diff --git a/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/repository/ProductRepository.kt b/spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/repository/ProductRepository.kt similarity index 100% rename from spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/repository/ProductRepository.kt rename to spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/repository/ProductRepository.kt diff --git a/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/repository/ProductRepositoryCoroutines.kt b/spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/repository/ProductRepositoryCoroutines.kt similarity index 100% rename from spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/repository/ProductRepositoryCoroutines.kt rename to spring-boot-modules/spring-boot-kotlin/src/main/kotlin/com/baeldung/nonblockingcoroutines/repository/ProductRepositoryCoroutines.kt diff --git a/spring-boot-kotlin/src/main/resources/application.properties b/spring-boot-modules/spring-boot-kotlin/src/main/resources/application.properties similarity index 100% rename from spring-boot-kotlin/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-kotlin/src/main/resources/application.properties diff --git a/spring-boot-jasypt/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-kotlin/src/main/resources/logback.xml similarity index 100% rename from spring-boot-jasypt/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-kotlin/src/main/resources/logback.xml diff --git a/spring-boot-kotlin/src/test/kotlin/com/baeldung/nonblockingcoroutines/ProductHandlerTest.kt b/spring-boot-modules/spring-boot-kotlin/src/test/kotlin/com/baeldung/nonblockingcoroutines/ProductHandlerTest.kt similarity index 100% rename from spring-boot-kotlin/src/test/kotlin/com/baeldung/nonblockingcoroutines/ProductHandlerTest.kt rename to spring-boot-modules/spring-boot-kotlin/src/test/kotlin/com/baeldung/nonblockingcoroutines/ProductHandlerTest.kt diff --git a/spring-boot-libraries/.gitignore b/spring-boot-modules/spring-boot-libraries/.gitignore similarity index 100% rename from spring-boot-libraries/.gitignore rename to spring-boot-modules/spring-boot-libraries/.gitignore diff --git a/spring-boot-libraries/README.md b/spring-boot-modules/spring-boot-libraries/README.md similarity index 100% rename from spring-boot-libraries/README.md rename to spring-boot-modules/spring-boot-libraries/README.md diff --git a/spring-boot-libraries/mvnw b/spring-boot-modules/spring-boot-libraries/mvnw similarity index 100% rename from spring-boot-libraries/mvnw rename to spring-boot-modules/spring-boot-libraries/mvnw diff --git a/spring-boot-libraries/mvnw.cmd b/spring-boot-modules/spring-boot-libraries/mvnw.cmd similarity index 100% rename from spring-boot-libraries/mvnw.cmd rename to spring-boot-modules/spring-boot-libraries/mvnw.cmd diff --git a/spring-boot-libraries/pom.xml b/spring-boot-modules/spring-boot-libraries/pom.xml similarity index 99% rename from spring-boot-libraries/pom.xml rename to spring-boot-modules/spring-boot-libraries/pom.xml index d9c9073542..ba1164dd59 100644 --- a/spring-boot-libraries/pom.xml +++ b/spring-boot-modules/spring-boot-libraries/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-libraries/src/main/java/com/baeldung/boot/Application.java b/spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/Application.java similarity index 100% rename from spring-boot-libraries/src/main/java/com/baeldung/boot/Application.java rename to spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/Application.java diff --git a/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/SpringProblemApplication.java b/spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/SpringProblemApplication.java similarity index 100% rename from spring-boot-libraries/src/main/java/com/baeldung/boot/problem/SpringProblemApplication.java rename to spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/SpringProblemApplication.java diff --git a/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/advice/ExceptionHandler.java b/spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/advice/ExceptionHandler.java similarity index 100% rename from spring-boot-libraries/src/main/java/com/baeldung/boot/problem/advice/ExceptionHandler.java rename to spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/advice/ExceptionHandler.java diff --git a/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/advice/SecurityExceptionHandler.java b/spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/advice/SecurityExceptionHandler.java similarity index 100% rename from spring-boot-libraries/src/main/java/com/baeldung/boot/problem/advice/SecurityExceptionHandler.java rename to spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/advice/SecurityExceptionHandler.java diff --git a/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/configuration/ProblemDemoConfiguration.java b/spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/configuration/ProblemDemoConfiguration.java similarity index 100% rename from spring-boot-libraries/src/main/java/com/baeldung/boot/problem/configuration/ProblemDemoConfiguration.java rename to spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/configuration/ProblemDemoConfiguration.java diff --git a/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/configuration/SecurityConfiguration.java b/spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/configuration/SecurityConfiguration.java similarity index 100% rename from spring-boot-libraries/src/main/java/com/baeldung/boot/problem/configuration/SecurityConfiguration.java rename to spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/configuration/SecurityConfiguration.java diff --git a/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/controller/ProblemDemoController.java b/spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/controller/ProblemDemoController.java similarity index 100% rename from spring-boot-libraries/src/main/java/com/baeldung/boot/problem/controller/ProblemDemoController.java rename to spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/controller/ProblemDemoController.java diff --git a/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/dto/Task.java b/spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/dto/Task.java similarity index 100% rename from spring-boot-libraries/src/main/java/com/baeldung/boot/problem/dto/Task.java rename to spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/dto/Task.java diff --git a/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/problems/TaskNotFoundProblem.java b/spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/problems/TaskNotFoundProblem.java similarity index 100% rename from spring-boot-libraries/src/main/java/com/baeldung/boot/problem/problems/TaskNotFoundProblem.java rename to spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/boot/problem/problems/TaskNotFoundProblem.java diff --git a/spring-boot-libraries/src/main/java/com/baeldung/scheduling/shedlock/SchedulerConfiguration.java b/spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/scheduling/shedlock/SchedulerConfiguration.java similarity index 100% rename from spring-boot-libraries/src/main/java/com/baeldung/scheduling/shedlock/SchedulerConfiguration.java rename to spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/scheduling/shedlock/SchedulerConfiguration.java diff --git a/spring-boot-libraries/src/main/java/com/baeldung/scheduling/shedlock/TaskScheduler.java b/spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/scheduling/shedlock/TaskScheduler.java similarity index 100% rename from spring-boot-libraries/src/main/java/com/baeldung/scheduling/shedlock/TaskScheduler.java rename to spring-boot-modules/spring-boot-libraries/src/main/java/com/baeldung/scheduling/shedlock/TaskScheduler.java diff --git a/spring-boot-libraries/src/main/resources/application-problem.properties b/spring-boot-modules/spring-boot-libraries/src/main/resources/application-problem.properties similarity index 100% rename from spring-boot-libraries/src/main/resources/application-problem.properties rename to spring-boot-modules/spring-boot-libraries/src/main/resources/application-problem.properties diff --git a/spring-boot-libraries/src/test/java/com/baeldung/boot/problem/controller/ProblemDemoControllerIntegrationTest.java b/spring-boot-modules/spring-boot-libraries/src/test/java/com/baeldung/boot/problem/controller/ProblemDemoControllerIntegrationTest.java similarity index 100% rename from spring-boot-libraries/src/test/java/com/baeldung/boot/problem/controller/ProblemDemoControllerIntegrationTest.java rename to spring-boot-modules/spring-boot-libraries/src/test/java/com/baeldung/boot/problem/controller/ProblemDemoControllerIntegrationTest.java diff --git a/spring-boot-logging-log4j2/.gitignore b/spring-boot-modules/spring-boot-logging-log4j2/.gitignore similarity index 100% rename from spring-boot-logging-log4j2/.gitignore rename to spring-boot-modules/spring-boot-logging-log4j2/.gitignore diff --git a/spring-boot-logging-log4j2/README.md b/spring-boot-modules/spring-boot-logging-log4j2/README.md similarity index 100% rename from spring-boot-logging-log4j2/README.md rename to spring-boot-modules/spring-boot-logging-log4j2/README.md diff --git a/spring-boot-logging-log4j2/pom.xml b/spring-boot-modules/spring-boot-logging-log4j2/pom.xml similarity index 98% rename from spring-boot-logging-log4j2/pom.xml rename to spring-boot-modules/spring-boot-logging-log4j2/pom.xml index a7065bc925..6e709230dd 100644 --- a/spring-boot-logging-log4j2/pom.xml +++ b/spring-boot-modules/spring-boot-logging-log4j2/pom.xml @@ -12,7 +12,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.1.RELEASE + 2.2.2.RELEASE diff --git a/spring-boot-logging-log4j2/src/main/java/com/baeldung/graylog/GraylogDemoApplication.java b/spring-boot-modules/spring-boot-logging-log4j2/src/main/java/com/baeldung/graylog/GraylogDemoApplication.java similarity index 100% rename from spring-boot-logging-log4j2/src/main/java/com/baeldung/graylog/GraylogDemoApplication.java rename to spring-boot-modules/spring-boot-logging-log4j2/src/main/java/com/baeldung/graylog/GraylogDemoApplication.java diff --git a/spring-boot-logging-log4j2/src/main/java/com/baeldung/springbootlogging/LoggingController.java b/spring-boot-modules/spring-boot-logging-log4j2/src/main/java/com/baeldung/springbootlogging/LoggingController.java similarity index 100% rename from spring-boot-logging-log4j2/src/main/java/com/baeldung/springbootlogging/LoggingController.java rename to spring-boot-modules/spring-boot-logging-log4j2/src/main/java/com/baeldung/springbootlogging/LoggingController.java diff --git a/spring-boot-logging-log4j2/src/main/java/com/baeldung/springbootlogging/LombokLoggingController.java b/spring-boot-modules/spring-boot-logging-log4j2/src/main/java/com/baeldung/springbootlogging/LombokLoggingController.java similarity index 100% rename from spring-boot-logging-log4j2/src/main/java/com/baeldung/springbootlogging/LombokLoggingController.java rename to spring-boot-modules/spring-boot-logging-log4j2/src/main/java/com/baeldung/springbootlogging/LombokLoggingController.java diff --git a/spring-boot-logging-log4j2/src/main/java/com/baeldung/springbootlogging/SpringBootLoggingApplication.java b/spring-boot-modules/spring-boot-logging-log4j2/src/main/java/com/baeldung/springbootlogging/SpringBootLoggingApplication.java similarity index 100% rename from spring-boot-logging-log4j2/src/main/java/com/baeldung/springbootlogging/SpringBootLoggingApplication.java rename to spring-boot-modules/spring-boot-logging-log4j2/src/main/java/com/baeldung/springbootlogging/SpringBootLoggingApplication.java diff --git a/spring-boot-logging-log4j2/src/main/resources/application.properties b/spring-boot-modules/spring-boot-logging-log4j2/src/main/resources/application.properties similarity index 100% rename from spring-boot-logging-log4j2/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-logging-log4j2/src/main/resources/application.properties diff --git a/spring-boot-logging-log4j2/src/main/resources/log4j.xml b/spring-boot-modules/spring-boot-logging-log4j2/src/main/resources/log4j.xml similarity index 100% rename from spring-boot-logging-log4j2/src/main/resources/log4j.xml rename to spring-boot-modules/spring-boot-logging-log4j2/src/main/resources/log4j.xml diff --git a/spring-boot-logging-log4j2/src/main/resources/log4j2-spring.xml b/spring-boot-modules/spring-boot-logging-log4j2/src/main/resources/log4j2-spring.xml similarity index 100% rename from spring-boot-logging-log4j2/src/main/resources/log4j2-spring.xml rename to spring-boot-modules/spring-boot-logging-log4j2/src/main/resources/log4j2-spring.xml diff --git a/spring-boot-logging-log4j2/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-logging-log4j2/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-boot-logging-log4j2/src/test/java/org/baeldung/SpringContextTest.java rename to spring-boot-modules/spring-boot-logging-log4j2/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-boot-mvc-2/.gitignore b/spring-boot-modules/spring-boot-mvc-2/.gitignore similarity index 100% rename from spring-boot-mvc-2/.gitignore rename to spring-boot-modules/spring-boot-mvc-2/.gitignore diff --git a/spring-boot-mvc-2/README.md b/spring-boot-modules/spring-boot-mvc-2/README.md similarity index 65% rename from spring-boot-mvc-2/README.md rename to spring-boot-modules/spring-boot-mvc-2/README.md index 81a969bf87..cb0eea4c2a 100644 --- a/spring-boot-mvc-2/README.md +++ b/spring-boot-modules/spring-boot-mvc-2/README.md @@ -5,5 +5,5 @@ This module contains articles about Spring Web MVC in Spring Boot projects. ### Relevant Articles: - [Functional Controllers in Spring MVC](https://www.baeldung.com/spring-mvc-functional-controllers) -- [Specify an array of strings as body parameter in Swagger API](https://www.baeldung.com/array-of-strings-as-body-parameter-in-swagger-api) +- [Specify an Array of Strings as Body Parameters in Swagger](https://www.baeldung.com/swagger-body-array-of-strings) - More articles: [[prev -->]](/spring-boot-mvc) diff --git a/spring-boot-mvc-2/pom.xml b/spring-boot-modules/spring-boot-mvc-2/pom.xml similarity index 92% rename from spring-boot-mvc-2/pom.xml rename to spring-boot-modules/spring-boot-mvc-2/pom.xml index 0f5a4bcd77..edebd41986 100644 --- a/spring-boot-mvc-2/pom.xml +++ b/spring-boot-modules/spring-boot-mvc-2/pom.xml @@ -9,10 +9,10 @@ Module For Spring Boot MVC Web Fn - org.springframework.boot - spring-boot-starter-parent - 2.2.0.BUILD-SNAPSHOT - + com.baeldung + parent-boot-2 + 0.0.1-SNAPSHOT + ../../parent-boot-2 @@ -102,6 +102,7 @@ 3.0.0-SNAPSHOT com.baeldung.swagger2boot.SpringBootSwaggerApplication + 2.2.0.BUILD-SNAPSHOT \ No newline at end of file diff --git a/spring-boot-mvc-2/src/main/java/com/baeldung/springbootmvc/SpringBootMvcFnApplication.java b/spring-boot-modules/spring-boot-mvc-2/src/main/java/com/baeldung/springbootmvc/SpringBootMvcFnApplication.java similarity index 100% rename from spring-boot-mvc-2/src/main/java/com/baeldung/springbootmvc/SpringBootMvcFnApplication.java rename to spring-boot-modules/spring-boot-mvc-2/src/main/java/com/baeldung/springbootmvc/SpringBootMvcFnApplication.java diff --git a/spring-boot-mvc-2/src/main/java/com/baeldung/springbootmvc/ctrl/ProductController.java b/spring-boot-modules/spring-boot-mvc-2/src/main/java/com/baeldung/springbootmvc/ctrl/ProductController.java similarity index 100% rename from spring-boot-mvc-2/src/main/java/com/baeldung/springbootmvc/ctrl/ProductController.java rename to spring-boot-modules/spring-boot-mvc-2/src/main/java/com/baeldung/springbootmvc/ctrl/ProductController.java diff --git a/spring-boot-mvc-2/src/main/java/com/baeldung/springbootmvc/model/Product.java b/spring-boot-modules/spring-boot-mvc-2/src/main/java/com/baeldung/springbootmvc/model/Product.java similarity index 100% rename from spring-boot-mvc-2/src/main/java/com/baeldung/springbootmvc/model/Product.java rename to spring-boot-modules/spring-boot-mvc-2/src/main/java/com/baeldung/springbootmvc/model/Product.java diff --git a/spring-boot-mvc-2/src/main/java/com/baeldung/springbootmvc/svc/ProductService.java b/spring-boot-modules/spring-boot-mvc-2/src/main/java/com/baeldung/springbootmvc/svc/ProductService.java similarity index 100% rename from spring-boot-mvc-2/src/main/java/com/baeldung/springbootmvc/svc/ProductService.java rename to spring-boot-modules/spring-boot-mvc-2/src/main/java/com/baeldung/springbootmvc/svc/ProductService.java diff --git a/spring-boot-mvc-2/src/main/java/com/baeldung/swagger2boot/SpringBootSwaggerApplication.java b/spring-boot-modules/spring-boot-mvc-2/src/main/java/com/baeldung/swagger2boot/SpringBootSwaggerApplication.java similarity index 100% rename from spring-boot-mvc-2/src/main/java/com/baeldung/swagger2boot/SpringBootSwaggerApplication.java rename to spring-boot-modules/spring-boot-mvc-2/src/main/java/com/baeldung/swagger2boot/SpringBootSwaggerApplication.java diff --git a/spring-boot-mvc-2/src/main/java/com/baeldung/swagger2boot/config/Swagger2Config.java b/spring-boot-modules/spring-boot-mvc-2/src/main/java/com/baeldung/swagger2boot/config/Swagger2Config.java similarity index 100% rename from spring-boot-mvc-2/src/main/java/com/baeldung/swagger2boot/config/Swagger2Config.java rename to spring-boot-modules/spring-boot-mvc-2/src/main/java/com/baeldung/swagger2boot/config/Swagger2Config.java diff --git a/spring-boot-mvc-2/src/main/java/com/baeldung/swagger2boot/controller/FooController.java b/spring-boot-modules/spring-boot-mvc-2/src/main/java/com/baeldung/swagger2boot/controller/FooController.java similarity index 100% rename from spring-boot-mvc-2/src/main/java/com/baeldung/swagger2boot/controller/FooController.java rename to spring-boot-modules/spring-boot-mvc-2/src/main/java/com/baeldung/swagger2boot/controller/FooController.java diff --git a/spring-boot-mvc-2/src/main/java/com/baeldung/swagger2boot/model/Foo.java b/spring-boot-modules/spring-boot-mvc-2/src/main/java/com/baeldung/swagger2boot/model/Foo.java similarity index 100% rename from spring-boot-mvc-2/src/main/java/com/baeldung/swagger2boot/model/Foo.java rename to spring-boot-modules/spring-boot-mvc-2/src/main/java/com/baeldung/swagger2boot/model/Foo.java diff --git a/spring-boot-mvc-2/src/main/resources/application.properties b/spring-boot-modules/spring-boot-mvc-2/src/main/resources/application.properties similarity index 100% rename from spring-boot-mvc-2/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-mvc-2/src/main/resources/application.properties diff --git a/spring-boot-keycloak/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-mvc-2/src/main/resources/logback.xml similarity index 100% rename from spring-boot-keycloak/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-mvc-2/src/main/resources/logback.xml diff --git a/spring-boot-mvc-2/src/main/resources/swagger-description.yml b/spring-boot-modules/spring-boot-mvc-2/src/main/resources/swagger-description.yml similarity index 100% rename from spring-boot-mvc-2/src/main/resources/swagger-description.yml rename to spring-boot-modules/spring-boot-mvc-2/src/main/resources/swagger-description.yml diff --git a/spring-boot-mvc-birt/README.md b/spring-boot-modules/spring-boot-mvc-birt/README.md similarity index 100% rename from spring-boot-mvc-birt/README.md rename to spring-boot-modules/spring-boot-mvc-birt/README.md diff --git a/spring-boot-mvc-birt/pom.xml b/spring-boot-modules/spring-boot-mvc-birt/pom.xml similarity index 98% rename from spring-boot-mvc-birt/pom.xml rename to spring-boot-modules/spring-boot-mvc-birt/pom.xml index 76760e661b..f65b851f30 100644 --- a/spring-boot-mvc-birt/pom.xml +++ b/spring-boot-modules/spring-boot-mvc-birt/pom.xml @@ -13,7 +13,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-mvc-birt/reports/csv_data_report.rptdesign b/spring-boot-modules/spring-boot-mvc-birt/reports/csv_data_report.rptdesign similarity index 100% rename from spring-boot-mvc-birt/reports/csv_data_report.rptdesign rename to spring-boot-modules/spring-boot-mvc-birt/reports/csv_data_report.rptdesign diff --git a/spring-boot-mvc-birt/reports/data.csv b/spring-boot-modules/spring-boot-mvc-birt/reports/data.csv similarity index 100% rename from spring-boot-mvc-birt/reports/data.csv rename to spring-boot-modules/spring-boot-mvc-birt/reports/data.csv diff --git a/spring-boot-mvc-birt/reports/static_report.rptdesign b/spring-boot-modules/spring-boot-mvc-birt/reports/static_report.rptdesign similarity index 100% rename from spring-boot-mvc-birt/reports/static_report.rptdesign rename to spring-boot-modules/spring-boot-mvc-birt/reports/static_report.rptdesign diff --git a/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/designer/ReportDesignApplication.java b/spring-boot-modules/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/designer/ReportDesignApplication.java similarity index 100% rename from spring-boot-mvc-birt/src/main/java/com/baeldung/birt/designer/ReportDesignApplication.java rename to spring-boot-modules/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/designer/ReportDesignApplication.java diff --git a/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/ReportEngineApplication.java b/spring-boot-modules/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/ReportEngineApplication.java similarity index 100% rename from spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/ReportEngineApplication.java rename to spring-boot-modules/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/ReportEngineApplication.java diff --git a/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/controller/BirtReportController.java b/spring-boot-modules/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/controller/BirtReportController.java similarity index 100% rename from spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/controller/BirtReportController.java rename to spring-boot-modules/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/controller/BirtReportController.java diff --git a/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/dto/OutputType.java b/spring-boot-modules/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/dto/OutputType.java similarity index 100% rename from spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/dto/OutputType.java rename to spring-boot-modules/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/dto/OutputType.java diff --git a/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/dto/Report.java b/spring-boot-modules/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/dto/Report.java similarity index 100% rename from spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/dto/Report.java rename to spring-boot-modules/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/dto/Report.java diff --git a/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/service/BirtReportService.java b/spring-boot-modules/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/service/BirtReportService.java similarity index 100% rename from spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/service/BirtReportService.java rename to spring-boot-modules/spring-boot-mvc-birt/src/main/java/com/baeldung/birt/engine/service/BirtReportService.java diff --git a/spring-boot-mvc-birt/src/main/resources/application.properties b/spring-boot-modules/spring-boot-mvc-birt/src/main/resources/application.properties similarity index 100% rename from spring-boot-mvc-birt/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-mvc-birt/src/main/resources/application.properties diff --git a/spring-boot-mvc/.gitignore b/spring-boot-modules/spring-boot-mvc/.gitignore similarity index 100% rename from spring-boot-mvc/.gitignore rename to spring-boot-modules/spring-boot-mvc/.gitignore diff --git a/spring-boot-mvc/README.md b/spring-boot-modules/spring-boot-mvc/README.md similarity index 100% rename from spring-boot-mvc/README.md rename to spring-boot-modules/spring-boot-mvc/README.md diff --git a/spring-boot-mvc/pom.xml b/spring-boot-modules/spring-boot-mvc/pom.xml similarity index 98% rename from spring-boot-mvc/pom.xml rename to spring-boot-modules/spring-boot-mvc/pom.xml index 06400a3502..6a951ace93 100644 --- a/spring-boot-mvc/pom.xml +++ b/spring-boot-modules/spring-boot-mvc/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-mvc/src/main/java/com/baeldung/accessparamsjs/App.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/accessparamsjs/App.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/accessparamsjs/App.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/accessparamsjs/App.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/accessparamsjs/Controller.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/accessparamsjs/Controller.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/accessparamsjs/Controller.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/accessparamsjs/Controller.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/annotations/Bike.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/Bike.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/annotations/Bike.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/Bike.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/annotations/Biker.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/Biker.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/annotations/Biker.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/Biker.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/annotations/Car.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/Car.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/annotations/Car.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/Car.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/annotations/CarMechanic.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/CarMechanic.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/annotations/CarMechanic.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/CarMechanic.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/annotations/CarUtility.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/CarUtility.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/annotations/CarUtility.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/CarUtility.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/annotations/CustomException.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/CustomException.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/annotations/CustomException.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/CustomException.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/annotations/Driver.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/Driver.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/annotations/Driver.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/Driver.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/annotations/Engine.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/Engine.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/annotations/Engine.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/Engine.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/annotations/PerformanceAspect.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/PerformanceAspect.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/annotations/PerformanceAspect.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/PerformanceAspect.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/annotations/Vehicle.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/Vehicle.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/annotations/Vehicle.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/Vehicle.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleController.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleController.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleController.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleController.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleFactoryApplication.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleFactoryApplication.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleFactoryApplication.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleFactoryApplication.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleFactoryConfig.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleFactoryConfig.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleFactoryConfig.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleFactoryConfig.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleRepository.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleRepository.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleRepository.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleRepository.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleRestController.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleRestController.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleRestController.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleRestController.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleService.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleService.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleService.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/annotations/VehicleService.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/nosuchbeandefinitionexception/BeanA.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/nosuchbeandefinitionexception/BeanA.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/nosuchbeandefinitionexception/BeanA.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/nosuchbeandefinitionexception/BeanA.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/nosuchbeandefinitionexception/BeanB.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/nosuchbeandefinitionexception/BeanB.java similarity index 93% rename from spring-boot-mvc/src/main/java/com/baeldung/nosuchbeandefinitionexception/BeanB.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/nosuchbeandefinitionexception/BeanB.java index f0cc263504..9fc228b201 100644 --- a/spring-boot-mvc/src/main/java/com/baeldung/nosuchbeandefinitionexception/BeanB.java +++ b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/nosuchbeandefinitionexception/BeanB.java @@ -1,5 +1,5 @@ -package com.baeldung.nosuchbeandefinitionexception; - -public class BeanB { - -} +package com.baeldung.nosuchbeandefinitionexception; + +public class BeanB { + +} diff --git a/spring-boot-mvc/src/main/java/com/baeldung/nosuchbeandefinitionexception/NoSuchBeanDefinitionDemoApp.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/nosuchbeandefinitionexception/NoSuchBeanDefinitionDemoApp.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/nosuchbeandefinitionexception/NoSuchBeanDefinitionDemoApp.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/nosuchbeandefinitionexception/NoSuchBeanDefinitionDemoApp.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/responseentity/CustomResponseController.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/responseentity/CustomResponseController.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/responseentity/CustomResponseController.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/responseentity/CustomResponseController.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/responseentity/CustomResponseWithBuilderController.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/responseentity/CustomResponseWithBuilderController.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/responseentity/CustomResponseWithBuilderController.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/responseentity/CustomResponseWithBuilderController.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/rss/RssFeedApplication.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/rss/RssFeedApplication.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/rss/RssFeedApplication.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/rss/RssFeedApplication.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/rss/RssFeedController.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/rss/RssFeedController.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/rss/RssFeedController.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/rss/RssFeedController.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/rss/RssFeedView.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/rss/RssFeedView.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/rss/RssFeedView.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/rss/RssFeedView.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduleJobsByProfile.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduleJobsByProfile.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduleJobsByProfile.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduleJobsByProfile.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduledJob.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduledJob.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduledJob.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduledJob.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduledJobsWithBoolean.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduledJobsWithBoolean.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduledJobsWithBoolean.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduledJobsWithBoolean.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduledJobsWithConditional.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduledJobsWithConditional.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduledJobsWithConditional.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduledJobsWithConditional.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduledJobsWithExpression.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduledJobsWithExpression.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduledJobsWithExpression.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/scheduling/ScheduledJobsWithExpression.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/scheduling/SchedulingApplication.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/scheduling/SchedulingApplication.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/scheduling/SchedulingApplication.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/scheduling/SchedulingApplication.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/springbootannotations/MySQLAutoconfiguration.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootannotations/MySQLAutoconfiguration.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/springbootannotations/MySQLAutoconfiguration.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootannotations/MySQLAutoconfiguration.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/LoggingController.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/LoggingController.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/LoggingController.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/LoggingController.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/LoginController.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/LoginController.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/LoginController.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/LoginController.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/SpringBootMvcApplication.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/SpringBootMvcApplication.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/SpringBootMvcApplication.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/SpringBootMvcApplication.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/config/CustomMessageSourceConfiguration.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/config/CustomMessageSourceConfiguration.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/config/CustomMessageSourceConfiguration.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/config/CustomMessageSourceConfiguration.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/config/FaviconConfiguration.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/config/FaviconConfiguration.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/config/FaviconConfiguration.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/config/FaviconConfiguration.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/JsfApplication.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/JsfApplication.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/JsfApplication.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/JsfApplication.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/controller/JsfController.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/controller/JsfController.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/controller/JsfController.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/controller/JsfController.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/model/Dao.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/model/Dao.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/model/Dao.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/model/Dao.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/model/Todo.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/model/Todo.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/model/Todo.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/model/Todo.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/model/TodoDao.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/model/TodoDao.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/model/TodoDao.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/model/TodoDao.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/service/TodoService.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/service/TodoService.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/service/TodoService.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/jsfapplication/service/TodoService.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/model/LoginForm.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/model/LoginForm.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/model/LoginForm.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/model/LoginForm.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/Application.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/Application.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/Application.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/Application.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/configuration/SpringFoxConfig.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/configuration/SpringFoxConfig.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/configuration/SpringFoxConfig.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/configuration/SpringFoxConfig.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/controller/RegularRestController.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/controller/RegularRestController.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/controller/RegularRestController.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/controller/RegularRestController.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/model/User.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/model/User.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/model/User.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/model/User.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/plugin/EmailAnnotationPlugin.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/plugin/EmailAnnotationPlugin.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/plugin/EmailAnnotationPlugin.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/plugin/EmailAnnotationPlugin.java diff --git a/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/repository/UserRepository.java b/spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/repository/UserRepository.java similarity index 100% rename from spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/repository/UserRepository.java rename to spring-boot-modules/spring-boot-mvc/src/main/java/com/baeldung/swagger2boot/repository/UserRepository.java diff --git a/spring-boot-mvc/src/main/resources/application.properties b/spring-boot-modules/spring-boot-mvc/src/main/resources/application.properties similarity index 100% rename from spring-boot-mvc/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-mvc/src/main/resources/application.properties diff --git a/spring-boot-mvc/src/main/resources/com/baeldung/images/favicon.ico b/spring-boot-modules/spring-boot-mvc/src/main/resources/com/baeldung/images/favicon.ico similarity index 100% rename from spring-boot-mvc/src/main/resources/com/baeldung/images/favicon.ico rename to spring-boot-modules/spring-boot-mvc/src/main/resources/com/baeldung/images/favicon.ico diff --git a/spring-boot-mvc/src/main/resources/favicon.ico b/spring-boot-modules/spring-boot-mvc/src/main/resources/favicon.ico similarity index 100% rename from spring-boot-mvc/src/main/resources/favicon.ico rename to spring-boot-modules/spring-boot-mvc/src/main/resources/favicon.ico diff --git a/spring-boot-kotlin/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-mvc/src/main/resources/logback.xml similarity index 100% rename from spring-boot-kotlin/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-mvc/src/main/resources/logback.xml diff --git a/spring-boot-mvc/src/main/resources/messages.properties b/spring-boot-modules/spring-boot-mvc/src/main/resources/messages.properties similarity index 100% rename from spring-boot-mvc/src/main/resources/messages.properties rename to spring-boot-modules/spring-boot-mvc/src/main/resources/messages.properties diff --git a/spring-boot-mvc/src/main/resources/messages_fr.properties b/spring-boot-modules/spring-boot-mvc/src/main/resources/messages_fr.properties similarity index 100% rename from spring-boot-mvc/src/main/resources/messages_fr.properties rename to spring-boot-modules/spring-boot-mvc/src/main/resources/messages_fr.properties diff --git a/spring-boot-mvc/src/main/resources/mysql.properties b/spring-boot-modules/spring-boot-mvc/src/main/resources/mysql.properties similarity index 100% rename from spring-boot-mvc/src/main/resources/mysql.properties rename to spring-boot-modules/spring-boot-mvc/src/main/resources/mysql.properties diff --git a/spring-boot-mvc/src/main/resources/static/favicon.ico b/spring-boot-modules/spring-boot-mvc/src/main/resources/static/favicon.ico similarity index 100% rename from spring-boot-mvc/src/main/resources/static/favicon.ico rename to spring-boot-modules/spring-boot-mvc/src/main/resources/static/favicon.ico diff --git a/spring-boot-mvc/src/main/resources/static/index.html b/spring-boot-modules/spring-boot-mvc/src/main/resources/static/index.html similarity index 100% rename from spring-boot-mvc/src/main/resources/static/index.html rename to spring-boot-modules/spring-boot-mvc/src/main/resources/static/index.html diff --git a/spring-boot-mvc/src/main/resources/templates/thymeleaf/index.html b/spring-boot-modules/spring-boot-mvc/src/main/resources/templates/thymeleaf/index.html similarity index 100% rename from spring-boot-mvc/src/main/resources/templates/thymeleaf/index.html rename to spring-boot-modules/spring-boot-mvc/src/main/resources/templates/thymeleaf/index.html diff --git a/spring-boot-mvc/src/main/webapp/WEB-INF/faces-config.xml b/spring-boot-modules/spring-boot-mvc/src/main/webapp/WEB-INF/faces-config.xml similarity index 100% rename from spring-boot-mvc/src/main/webapp/WEB-INF/faces-config.xml rename to spring-boot-modules/spring-boot-mvc/src/main/webapp/WEB-INF/faces-config.xml diff --git a/spring-boot-mvc/src/main/webapp/WEB-INF/web.xml b/spring-boot-modules/spring-boot-mvc/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from spring-boot-mvc/src/main/webapp/WEB-INF/web.xml rename to spring-boot-modules/spring-boot-mvc/src/main/webapp/WEB-INF/web.xml diff --git a/spring-boot-mvc/src/main/webapp/index.xhtml b/spring-boot-modules/spring-boot-mvc/src/main/webapp/index.xhtml similarity index 100% rename from spring-boot-mvc/src/main/webapp/index.xhtml rename to spring-boot-modules/spring-boot-mvc/src/main/webapp/index.xhtml diff --git a/spring-boot-mvc/src/main/webapp/js/jquery.js b/spring-boot-modules/spring-boot-mvc/src/main/webapp/js/jquery.js similarity index 100% rename from spring-boot-mvc/src/main/webapp/js/jquery.js rename to spring-boot-modules/spring-boot-mvc/src/main/webapp/js/jquery.js diff --git a/spring-boot-mvc/src/main/webapp/js/script-async-jquery.js b/spring-boot-modules/spring-boot-mvc/src/main/webapp/js/script-async-jquery.js similarity index 100% rename from spring-boot-mvc/src/main/webapp/js/script-async-jquery.js rename to spring-boot-modules/spring-boot-mvc/src/main/webapp/js/script-async-jquery.js diff --git a/spring-boot-mvc/src/main/webapp/js/script-async.js b/spring-boot-modules/spring-boot-mvc/src/main/webapp/js/script-async.js similarity index 100% rename from spring-boot-mvc/src/main/webapp/js/script-async.js rename to spring-boot-modules/spring-boot-mvc/src/main/webapp/js/script-async.js diff --git a/spring-boot-mvc/src/main/webapp/js/script.js b/spring-boot-modules/spring-boot-mvc/src/main/webapp/js/script.js similarity index 100% rename from spring-boot-mvc/src/main/webapp/js/script.js rename to spring-boot-modules/spring-boot-mvc/src/main/webapp/js/script.js diff --git a/spring-boot-mvc/src/main/webapp/todo.xhtml b/spring-boot-modules/spring-boot-mvc/src/main/webapp/todo.xhtml similarity index 100% rename from spring-boot-mvc/src/main/webapp/todo.xhtml rename to spring-boot-modules/spring-boot-mvc/src/main/webapp/todo.xhtml diff --git a/spring-boot-mvc/src/test/java/com/baeldung/accessparamsjs/ControllerUnitTest.java b/spring-boot-modules/spring-boot-mvc/src/test/java/com/baeldung/accessparamsjs/ControllerUnitTest.java similarity index 100% rename from spring-boot-mvc/src/test/java/com/baeldung/accessparamsjs/ControllerUnitTest.java rename to spring-boot-modules/spring-boot-mvc/src/test/java/com/baeldung/accessparamsjs/ControllerUnitTest.java diff --git a/spring-boot-mvc/src/test/java/com/baeldung/rss/RssFeedUnitTest.java b/spring-boot-modules/spring-boot-mvc/src/test/java/com/baeldung/rss/RssFeedUnitTest.java similarity index 100% rename from spring-boot-mvc/src/test/java/com/baeldung/rss/RssFeedUnitTest.java rename to spring-boot-modules/spring-boot-mvc/src/test/java/com/baeldung/rss/RssFeedUnitTest.java diff --git a/spring-boot-mvc/src/test/java/com/baeldung/springbootmvc/LoginControllerUnitTest.java b/spring-boot-modules/spring-boot-mvc/src/test/java/com/baeldung/springbootmvc/LoginControllerUnitTest.java similarity index 95% rename from spring-boot-mvc/src/test/java/com/baeldung/springbootmvc/LoginControllerUnitTest.java rename to spring-boot-modules/spring-boot-mvc/src/test/java/com/baeldung/springbootmvc/LoginControllerUnitTest.java index 68229f459c..8ccf451e86 100644 --- a/spring-boot-mvc/src/test/java/com/baeldung/springbootmvc/LoginControllerUnitTest.java +++ b/spring-boot-modules/spring-boot-mvc/src/test/java/com/baeldung/springbootmvc/LoginControllerUnitTest.java @@ -15,7 +15,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import com.baeldung.springbootmvc.config.CustomMessageSourceConfiguration; @RunWith(SpringRunner.class) -@WebMvcTest(value = LoginController.class, secure = false) +@WebMvcTest(value = LoginController.class) @ContextConfiguration(classes = { SpringBootMvcApplication.class, CustomMessageSourceConfiguration.class }) public class LoginControllerUnitTest { diff --git a/spring-boot-mvc/src/test/java/org/baeldung/SpringContextLiveTest.java b/spring-boot-modules/spring-boot-mvc/src/test/java/org/baeldung/SpringContextLiveTest.java similarity index 100% rename from spring-boot-mvc/src/test/java/org/baeldung/SpringContextLiveTest.java rename to spring-boot-modules/spring-boot-mvc/src/test/java/org/baeldung/SpringContextLiveTest.java diff --git a/spring-boot-mvc/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-mvc/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-boot-mvc/src/test/java/org/baeldung/SpringContextTest.java rename to spring-boot-modules/spring-boot-mvc/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-boot-nashorn/README.md b/spring-boot-modules/spring-boot-nashorn/README.md similarity index 100% rename from spring-boot-nashorn/README.md rename to spring-boot-modules/spring-boot-nashorn/README.md diff --git a/spring-boot-nashorn/pom.xml b/spring-boot-modules/spring-boot-nashorn/pom.xml similarity index 96% rename from spring-boot-nashorn/pom.xml rename to spring-boot-modules/spring-boot-nashorn/pom.xml index af11f14fdc..c60997005d 100644 --- a/spring-boot-nashorn/pom.xml +++ b/spring-boot-modules/spring-boot-nashorn/pom.xml @@ -13,7 +13,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-nashorn/src/main/java/com/baeldung/nashorn/Application.java b/spring-boot-modules/spring-boot-nashorn/src/main/java/com/baeldung/nashorn/Application.java similarity index 100% rename from spring-boot-nashorn/src/main/java/com/baeldung/nashorn/Application.java rename to spring-boot-modules/spring-boot-nashorn/src/main/java/com/baeldung/nashorn/Application.java diff --git a/spring-boot-nashorn/src/main/java/com/baeldung/nashorn/controller/MyRestController.java b/spring-boot-modules/spring-boot-nashorn/src/main/java/com/baeldung/nashorn/controller/MyRestController.java similarity index 100% rename from spring-boot-nashorn/src/main/java/com/baeldung/nashorn/controller/MyRestController.java rename to spring-boot-modules/spring-boot-nashorn/src/main/java/com/baeldung/nashorn/controller/MyRestController.java diff --git a/spring-boot-nashorn/src/main/java/com/baeldung/nashorn/controller/MyWebController.java b/spring-boot-modules/spring-boot-nashorn/src/main/java/com/baeldung/nashorn/controller/MyWebController.java similarity index 100% rename from spring-boot-nashorn/src/main/java/com/baeldung/nashorn/controller/MyWebController.java rename to spring-boot-modules/spring-boot-nashorn/src/main/java/com/baeldung/nashorn/controller/MyWebController.java diff --git a/spring-boot-nashorn/src/main/resources/application.properties b/spring-boot-modules/spring-boot-nashorn/src/main/resources/application.properties similarity index 100% rename from spring-boot-nashorn/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-nashorn/src/main/resources/application.properties diff --git a/spring-boot-nashorn/src/main/resources/static/app.js b/spring-boot-modules/spring-boot-nashorn/src/main/resources/static/app.js similarity index 100% rename from spring-boot-nashorn/src/main/resources/static/app.js rename to spring-boot-modules/spring-boot-nashorn/src/main/resources/static/app.js diff --git a/spring-boot-nashorn/src/main/resources/static/js/react-dom-server.js b/spring-boot-modules/spring-boot-nashorn/src/main/resources/static/js/react-dom-server.js similarity index 100% rename from spring-boot-nashorn/src/main/resources/static/js/react-dom-server.js rename to spring-boot-modules/spring-boot-nashorn/src/main/resources/static/js/react-dom-server.js diff --git a/spring-boot-nashorn/src/main/resources/static/js/react-dom.js b/spring-boot-modules/spring-boot-nashorn/src/main/resources/static/js/react-dom.js similarity index 100% rename from spring-boot-nashorn/src/main/resources/static/js/react-dom.js rename to spring-boot-modules/spring-boot-nashorn/src/main/resources/static/js/react-dom.js diff --git a/spring-boot-nashorn/src/main/resources/static/js/react.js b/spring-boot-modules/spring-boot-nashorn/src/main/resources/static/js/react.js similarity index 100% rename from spring-boot-nashorn/src/main/resources/static/js/react.js rename to spring-boot-modules/spring-boot-nashorn/src/main/resources/static/js/react.js diff --git a/spring-boot-nashorn/src/main/webapp/WEB-INF/jsp/index.jsp b/spring-boot-modules/spring-boot-nashorn/src/main/webapp/WEB-INF/jsp/index.jsp similarity index 100% rename from spring-boot-nashorn/src/main/webapp/WEB-INF/jsp/index.jsp rename to spring-boot-modules/spring-boot-nashorn/src/main/webapp/WEB-INF/jsp/index.jsp diff --git a/spring-boot-performance/README.md b/spring-boot-modules/spring-boot-performance/README.md similarity index 71% rename from spring-boot-performance/README.md rename to spring-boot-modules/spring-boot-performance/README.md index f6a11720de..9443e5bb19 100644 --- a/spring-boot-performance/README.md +++ b/spring-boot-modules/spring-boot-performance/README.md @@ -5,3 +5,4 @@ This module contains articles about Spring Boot performance. ### Relevant Articles - [Lazy Initialization in Spring Boot 2](https://www.baeldung.com/spring-boot-lazy-initialization) +- [Introduction to Chaos Monkey](https://www.baeldung.com/spring-boot-chaos-monkey) diff --git a/spring-boot-performance/pom.xml b/spring-boot-modules/spring-boot-performance/pom.xml similarity index 75% rename from spring-boot-performance/pom.xml rename to spring-boot-modules/spring-boot-performance/pom.xml index 7bf3885618..1f3eafd96c 100644 --- a/spring-boot-performance/pom.xml +++ b/spring-boot-modules/spring-boot-performance/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 @@ -19,6 +19,17 @@ org.springframework.boot spring-boot-starter + + + org.springframework.boot + spring-boot-starter-web + + + + de.codecentric + chaos-monkey-spring-boot + ${chaos.monkey.version} + @@ -41,5 +52,6 @@ com.baeldung.lazyinitialization.Application + 2.0.0 diff --git a/spring-boot/src/main/java/com/baeldung/chaosmonkey/SpringBootChaosMonkeyApp.java b/spring-boot-modules/spring-boot-performance/src/main/java/com/baeldung/chaosmonkey/SpringBootChaosMonkeyApp.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/chaosmonkey/SpringBootChaosMonkeyApp.java rename to spring-boot-modules/spring-boot-performance/src/main/java/com/baeldung/chaosmonkey/SpringBootChaosMonkeyApp.java diff --git a/spring-boot/src/main/java/com/baeldung/chaosmonkey/controller/PermissionsController.java b/spring-boot-modules/spring-boot-performance/src/main/java/com/baeldung/chaosmonkey/controller/PermissionsController.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/chaosmonkey/controller/PermissionsController.java rename to spring-boot-modules/spring-boot-performance/src/main/java/com/baeldung/chaosmonkey/controller/PermissionsController.java diff --git a/spring-boot/src/main/java/com/baeldung/chaosmonkey/service/PermissionsService.java b/spring-boot-modules/spring-boot-performance/src/main/java/com/baeldung/chaosmonkey/service/PermissionsService.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/chaosmonkey/service/PermissionsService.java rename to spring-boot-modules/spring-boot-performance/src/main/java/com/baeldung/chaosmonkey/service/PermissionsService.java diff --git a/spring-boot-performance/src/main/java/com/baeldung/lazyinitialization/Application.java b/spring-boot-modules/spring-boot-performance/src/main/java/com/baeldung/lazyinitialization/Application.java similarity index 100% rename from spring-boot-performance/src/main/java/com/baeldung/lazyinitialization/Application.java rename to spring-boot-modules/spring-boot-performance/src/main/java/com/baeldung/lazyinitialization/Application.java diff --git a/spring-boot-performance/src/main/java/com/baeldung/lazyinitialization/services/Writer.java b/spring-boot-modules/spring-boot-performance/src/main/java/com/baeldung/lazyinitialization/services/Writer.java similarity index 100% rename from spring-boot-performance/src/main/java/com/baeldung/lazyinitialization/services/Writer.java rename to spring-boot-modules/spring-boot-performance/src/main/java/com/baeldung/lazyinitialization/services/Writer.java diff --git a/spring-boot-modules/spring-boot-performance/src/main/resources/application.properties b/spring-boot-modules/spring-boot-performance/src/main/resources/application.properties new file mode 100644 index 0000000000..3727232ea6 --- /dev/null +++ b/spring-boot-modules/spring-boot-performance/src/main/resources/application.properties @@ -0,0 +1,29 @@ +#chaos monkey for spring boot props +management.endpoint.chaosmonkey.enabled=true +management.endpoint.chaosmonkeyjmx.enabled=true + +spring.profiles.active=chaos-monkey +#Determine whether should execute or not +chaos.monkey.enabled=true +#How many requests are to be attacked. 1: attack each request; 5: each 5th request is attacked +chaos.monkey.assaults.level=1 +#Minimum latency in ms added to the request +chaos.monkey.assaults.latencyRangeStart=3000 +#Maximum latency in ms added to the request +chaos.monkey.assaults.latencyRangeEnd=15000 +#Latency assault active +chaos.monkey.assaults.latencyActive=true +#Exception assault active +chaos.monkey.assaults.exceptionsActive=false +#AppKiller assault active +chaos.monkey.assaults.killApplicationActive=false +#Controller watcher active +chaos.monkey.watcher.controller=false +#RestController watcher active +chaos.monkey.watcher.restController=false +#Service watcher active +chaos.monkey.watcher.service=true +#Repository watcher active +chaos.monkey.watcher.repository=false +#Component watcher active +chaos.monkey.watcher.component=false diff --git a/spring-boot-performance/src/main/resources/application.yml b/spring-boot-modules/spring-boot-performance/src/main/resources/application.yml similarity index 100% rename from spring-boot-performance/src/main/resources/application.yml rename to spring-boot-modules/spring-boot-performance/src/main/resources/application.yml diff --git a/spring-boot-properties/README.md b/spring-boot-modules/spring-boot-properties/README.md similarity index 100% rename from spring-boot-properties/README.md rename to spring-boot-modules/spring-boot-properties/README.md diff --git a/spring-boot-properties/extra.properties b/spring-boot-modules/spring-boot-properties/extra.properties similarity index 100% rename from spring-boot-properties/extra.properties rename to spring-boot-modules/spring-boot-properties/extra.properties diff --git a/spring-boot-properties/extra2.properties b/spring-boot-modules/spring-boot-properties/extra2.properties similarity index 100% rename from spring-boot-properties/extra2.properties rename to spring-boot-modules/spring-boot-properties/extra2.properties diff --git a/spring-boot-properties/pom.xml b/spring-boot-modules/spring-boot-properties/pom.xml similarity index 87% rename from spring-boot-properties/pom.xml rename to spring-boot-modules/spring-boot-properties/pom.xml index 705a0eb786..04879a5052 100644 --- a/spring-boot-properties/pom.xml +++ b/spring-boot-modules/spring-boot-properties/pom.xml @@ -6,12 +6,13 @@ spring-boot-properties jar Spring Boot Properties Module + 0.0.1-SNAPSHOT com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 @@ -64,6 +65,19 @@ true + + + + org.apache.maven.plugins + maven-resources-plugin + + + @ + + false + + + @@ -106,6 +120,7 @@ 1.10 20.0 4.4.11 + @ diff --git a/spring-boot/src/main/java/com/baeldung/buildproperties/Application.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/buildproperties/Application.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/buildproperties/Application.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/buildproperties/Application.java diff --git a/spring-boot/src/main/java/com/baeldung/buildproperties/BuildInfoService.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/buildproperties/BuildInfoService.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/buildproperties/BuildInfoService.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/buildproperties/BuildInfoService.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/ConfigProperties.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/ConfigProperties.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/configurationproperties/ConfigProperties.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/ConfigProperties.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/Employee.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/Employee.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/configurationproperties/Employee.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/Employee.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/EmployeeConverter.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/EmployeeConverter.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/configurationproperties/EmployeeConverter.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/EmployeeConverter.java diff --git a/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/ImmutableConfigPropertiesApp.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/ImmutableConfigPropertiesApp.java new file mode 100644 index 0000000000..b9d84238c3 --- /dev/null +++ b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/ImmutableConfigPropertiesApp.java @@ -0,0 +1,14 @@ +package com.baeldung.configurationproperties; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.properties.ConfigurationPropertiesScan; + +@SpringBootApplication +@ConfigurationPropertiesScan +public class ImmutableConfigPropertiesApp { + + public static void main(String[] args) { + SpringApplication.run(ImmutableConfigPropertiesApp.class, args); + } +} diff --git a/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/ImmutableCredentials.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/ImmutableCredentials.java new file mode 100644 index 0000000000..a58e4143e5 --- /dev/null +++ b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/ImmutableCredentials.java @@ -0,0 +1,31 @@ +package com.baeldung.configurationproperties; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.ConstructorBinding; + +@ConfigurationProperties(prefix = "mail.credentials") +@ConstructorBinding +public class ImmutableCredentials { + + private final String authMethod; + private final String username; + private final String password; + + public ImmutableCredentials(String authMethod, String username, String password) { + this.authMethod = authMethod; + this.username = username; + this.password = password; + } + + public String getAuthMethod() { + return authMethod; + } + + public String getUsername() { + return username; + } + + public String getPassword() { + return password; + } +} diff --git a/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/Item.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/Item.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/configurationproperties/Item.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/Item.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/PropertiesConversionApplication.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/PropertiesConversionApplication.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/configurationproperties/PropertiesConversionApplication.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/PropertiesConversionApplication.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/PropertyConversion.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/PropertyConversion.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/configurationproperties/PropertyConversion.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/configurationproperties/PropertyConversion.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/AdditionalConfiguration.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/AdditionalConfiguration.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/AdditionalConfiguration.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/AdditionalConfiguration.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/AdditionalProperties.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/AdditionalProperties.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/AdditionalProperties.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/AdditionalProperties.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/ConfigPropertiesDemoApplication.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/ConfigPropertiesDemoApplication.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/ConfigPropertiesDemoApplication.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/ConfigPropertiesDemoApplication.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/CustomJsonProperties.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/CustomJsonProperties.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/CustomJsonProperties.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/CustomJsonProperties.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/JsonProperties.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/JsonProperties.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/JsonProperties.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/JsonProperties.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/JsonPropertyContextInitializer.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/JsonPropertyContextInitializer.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/JsonPropertyContextInitializer.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/JsonPropertyContextInitializer.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/JsonPropertySourceFactory.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/JsonPropertySourceFactory.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/JsonPropertySourceFactory.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/JsonPropertySourceFactory.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/core/ComponentInXmlUsingProperties.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/core/ComponentInXmlUsingProperties.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/core/ComponentInXmlUsingProperties.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/core/ComponentInXmlUsingProperties.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/core/ComponentUsingProperties.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/core/ComponentUsingProperties.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/core/ComponentUsingProperties.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/core/ComponentUsingProperties.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/external/ExternalPropertiesWithJavaConfig.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/external/ExternalPropertiesWithJavaConfig.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/external/ExternalPropertiesWithJavaConfig.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/external/ExternalPropertiesWithJavaConfig.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/external/ExternalPropertiesWithXmlConfig.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/external/ExternalPropertiesWithXmlConfig.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/external/ExternalPropertiesWithXmlConfig.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/external/ExternalPropertiesWithXmlConfig.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/external/ExternalPropertiesWithXmlConfigOne.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/external/ExternalPropertiesWithXmlConfigOne.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/external/ExternalPropertiesWithXmlConfigOne.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/external/ExternalPropertiesWithXmlConfigOne.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/external/ExternalPropertiesWithXmlConfigTwo.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/external/ExternalPropertiesWithXmlConfigTwo.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/external/ExternalPropertiesWithXmlConfigTwo.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/external/ExternalPropertiesWithXmlConfigTwo.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/SpringBootPropertiesApplication.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/SpringBootPropertiesApplication.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/reloading/SpringBootPropertiesApplication.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/SpringBootPropertiesApplication.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/PropertiesException.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/PropertiesException.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/PropertiesException.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/PropertiesException.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/ReloadableProperties.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/ReloadableProperties.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/ReloadableProperties.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/ReloadableProperties.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/ReloadablePropertySource.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/ReloadablePropertySource.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/ReloadablePropertySource.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/ReloadablePropertySource.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/ReloadablePropertySourceConfig.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/ReloadablePropertySourceConfig.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/ReloadablePropertySourceConfig.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/ReloadablePropertySourceConfig.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/ReloadablePropertySourceFactory.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/ReloadablePropertySourceFactory.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/ReloadablePropertySourceFactory.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/reloading/configs/ReloadablePropertySourceFactory.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/spring/BasicPropertiesWithJavaConfig.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/spring/BasicPropertiesWithJavaConfig.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/spring/BasicPropertiesWithJavaConfig.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/spring/BasicPropertiesWithJavaConfig.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/spring/PropertiesWithJavaConfig.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/spring/PropertiesWithJavaConfig.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/spring/PropertiesWithJavaConfig.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/spring/PropertiesWithJavaConfig.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/spring/PropertiesWithJavaConfigOther.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/spring/PropertiesWithJavaConfigOther.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/spring/PropertiesWithJavaConfigOther.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/spring/PropertiesWithJavaConfigOther.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/properties/spring/PropertiesWithPlaceHolderConfigurer.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/spring/PropertiesWithPlaceHolderConfigurer.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/properties/spring/PropertiesWithPlaceHolderConfigurer.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/properties/spring/PropertiesWithPlaceHolderConfigurer.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/value/ClassNotManagedBySpring.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/value/ClassNotManagedBySpring.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/value/ClassNotManagedBySpring.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/value/ClassNotManagedBySpring.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/value/InitializerBean.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/value/InitializerBean.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/value/InitializerBean.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/value/InitializerBean.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/value/SomeBean.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/value/SomeBean.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/value/SomeBean.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/value/SomeBean.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/value/ValuesApp.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/value/ValuesApp.java similarity index 100% rename from spring-boot-properties/src/main/java/com/baeldung/value/ValuesApp.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/value/ValuesApp.java diff --git a/spring-boot-properties/src/main/java/com/baeldung/valuewithdefaults/ValuesWithDefaultsApp.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/valuewithdefaults/ValuesWithDefaultsApp.java similarity index 97% rename from spring-boot-properties/src/main/java/com/baeldung/valuewithdefaults/ValuesWithDefaultsApp.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/valuewithdefaults/ValuesWithDefaultsApp.java index d2cda19ae6..589f891e6b 100644 --- a/spring-boot-properties/src/main/java/com/baeldung/valuewithdefaults/ValuesWithDefaultsApp.java +++ b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/valuewithdefaults/ValuesWithDefaultsApp.java @@ -1,75 +1,75 @@ -package com.baeldung.valuewithdefaults; - -import java.util.Arrays; -import java.util.List; - -import javax.annotation.PostConstruct; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.AnnotationConfigApplicationContext; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; -import org.springframework.util.Assert; - -import com.google.common.collect.Lists; -import com.google.common.primitives.Ints; - -/** - * Demonstrates setting defaults for @Value annotation. Note that there are no properties - * defined in the specified property source. We also assume that the user here - * does not have a system property named some.key. - * - */ -@Configuration -@PropertySource(name = "myProperties", value = "valueswithdefaults.properties") -public class ValuesWithDefaultsApp { - - @Value("${some.key:my default value}") - private String stringWithDefaultValue; - - @Value("${some.key:}") - private String stringWithBlankDefaultValue; - - @Value("${some.key:true}") - private boolean booleanWithDefaultValue; - - @Value("${some.key:42}") - private int intWithDefaultValue; - - @Value("${some.key:one,two,three}") - private String[] stringArrayWithDefaults; - - @Value("${some.key:1,2,3}") - private int[] intArrayWithDefaults; - - @Value("#{systemProperties['some.key'] ?: 'my default system property value'}") - private String spelWithDefaultValue; - - - public static void main(String[] args) { - ApplicationContext applicationContext = new AnnotationConfigApplicationContext(ValuesWithDefaultsApp.class); - } - - @PostConstruct - public void afterInitialize() { - // strings - Assert.isTrue(stringWithDefaultValue.equals("my default value")); - Assert.isTrue(stringWithBlankDefaultValue.equals("")); - - // other primitives - Assert.isTrue(booleanWithDefaultValue); - Assert.isTrue(intWithDefaultValue == 42); - - // arrays - List stringListValues = Lists.newArrayList("one", "two", "three"); - Assert.isTrue(Arrays.asList(stringArrayWithDefaults).containsAll(stringListValues)); - - List intListValues = Lists.newArrayList(1, 2, 3); - Assert.isTrue(Ints.asList(intArrayWithDefaults).containsAll(intListValues)); - - // SpEL - Assert.isTrue(spelWithDefaultValue.equals("my default system property value")); - - } -} +package com.baeldung.valuewithdefaults; + +import java.util.Arrays; +import java.util.List; + +import javax.annotation.PostConstruct; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.PropertySource; +import org.springframework.util.Assert; + +import com.google.common.collect.Lists; +import com.google.common.primitives.Ints; + +/** + * Demonstrates setting defaults for @Value annotation. Note that there are no properties + * defined in the specified property source. We also assume that the user here + * does not have a system property named some.key. + * + */ +@Configuration +@PropertySource(name = "myProperties", value = "valueswithdefaults.properties") +public class ValuesWithDefaultsApp { + + @Value("${some.key:my default value}") + private String stringWithDefaultValue; + + @Value("${some.key:}") + private String stringWithBlankDefaultValue; + + @Value("${some.key:true}") + private boolean booleanWithDefaultValue; + + @Value("${some.key:42}") + private int intWithDefaultValue; + + @Value("${some.key:one,two,three}") + private String[] stringArrayWithDefaults; + + @Value("${some.key:1,2,3}") + private int[] intArrayWithDefaults; + + @Value("#{systemProperties['some.key'] ?: 'my default system property value'}") + private String spelWithDefaultValue; + + + public static void main(String[] args) { + ApplicationContext applicationContext = new AnnotationConfigApplicationContext(ValuesWithDefaultsApp.class); + } + + @PostConstruct + public void afterInitialize() { + // strings + Assert.isTrue(stringWithDefaultValue.equals("my default value")); + Assert.isTrue(stringWithBlankDefaultValue.equals("")); + + // other primitives + Assert.isTrue(booleanWithDefaultValue); + Assert.isTrue(intWithDefaultValue == 42); + + // arrays + List stringListValues = Lists.newArrayList("one", "two", "three"); + Assert.isTrue(Arrays.asList(stringArrayWithDefaults).containsAll(stringListValues)); + + List intListValues = Lists.newArrayList(1, 2, 3); + Assert.isTrue(Ints.asList(intArrayWithDefaults).containsAll(intListValues)); + + // SpEL + Assert.isTrue(spelWithDefaultValue.equals("my default system property value")); + + } +} diff --git a/spring-boot-properties/src/main/java/com/baeldung/yaml/MyApplication.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/yaml/MyApplication.java similarity index 97% rename from spring-boot-properties/src/main/java/com/baeldung/yaml/MyApplication.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/yaml/MyApplication.java index 4a585df998..d42b731213 100644 --- a/spring-boot-properties/src/main/java/com/baeldung/yaml/MyApplication.java +++ b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/yaml/MyApplication.java @@ -1,31 +1,31 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package com.baeldung.yaml; - -import java.util.Collections; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.CommandLineRunner; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class MyApplication implements CommandLineRunner { - - @Autowired - private YAMLConfig myConfig; - - public static void main(String[] args) { - SpringApplication app = new SpringApplication(MyApplication.class); - app.run(); - } - - public void run(String... args) throws Exception { - System.out.println("using environment:" + myConfig.getEnvironment()); - System.out.println("name:" + myConfig.getName()); - System.out.println("servers:" + myConfig.getServers()); - } - -} +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.baeldung.yaml; + +import java.util.Collections; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class MyApplication implements CommandLineRunner { + + @Autowired + private YAMLConfig myConfig; + + public static void main(String[] args) { + SpringApplication app = new SpringApplication(MyApplication.class); + app.run(); + } + + public void run(String... args) throws Exception { + System.out.println("using environment:" + myConfig.getEnvironment()); + System.out.println("name:" + myConfig.getName()); + System.out.println("servers:" + myConfig.getServers()); + } + +} diff --git a/spring-boot-properties/src/main/java/com/baeldung/yaml/YAMLConfig.java b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/yaml/YAMLConfig.java similarity index 95% rename from spring-boot-properties/src/main/java/com/baeldung/yaml/YAMLConfig.java rename to spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/yaml/YAMLConfig.java index 313b920502..ad633c4b56 100644 --- a/spring-boot-properties/src/main/java/com/baeldung/yaml/YAMLConfig.java +++ b/spring-boot-modules/spring-boot-properties/src/main/java/com/baeldung/yaml/YAMLConfig.java @@ -1,41 +1,41 @@ -package com.baeldung.yaml; - -import java.util.ArrayList; -import java.util.List; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.Configuration; - -@Configuration -@EnableConfigurationProperties -@ConfigurationProperties -public class YAMLConfig { - private String name; - private String environment; - private List servers = new ArrayList(); - - public List getServers() { - return servers; - } - - public void setServers(List servers) { - this.servers = servers; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getEnvironment() { - return environment; - } - - public void setEnvironment(String environment) { - this.environment = environment; - } - -} +package com.baeldung.yaml; + +import java.util.ArrayList; +import java.util.List; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +@Configuration +@EnableConfigurationProperties +@ConfigurationProperties +public class YAMLConfig { + private String name; + private String environment; + private List servers = new ArrayList(); + + public List getServers() { + return servers; + } + + public void setServers(List servers) { + this.servers = servers; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getEnvironment() { + return environment; + } + + public void setEnvironment(String environment) { + this.environment = environment; + } + +} diff --git a/spring-boot-properties/src/main/resources/application.properties b/spring-boot-modules/spring-boot-properties/src/main/resources/application.properties similarity index 100% rename from spring-boot-properties/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-properties/src/main/resources/application.properties diff --git a/spring-boot-properties/src/main/resources/application.yml b/spring-boot-modules/spring-boot-properties/src/main/resources/application.yml similarity index 100% rename from spring-boot-properties/src/main/resources/application.yml rename to spring-boot-modules/spring-boot-properties/src/main/resources/application.yml diff --git a/spring-boot-properties/src/main/resources/bar.properties b/spring-boot-modules/spring-boot-properties/src/main/resources/bar.properties similarity index 100% rename from spring-boot-properties/src/main/resources/bar.properties rename to spring-boot-modules/spring-boot-properties/src/main/resources/bar.properties diff --git a/spring-boot-properties/src/main/resources/basicConfigForProperties.xml b/spring-boot-modules/spring-boot-properties/src/main/resources/basicConfigForProperties.xml similarity index 100% rename from spring-boot-properties/src/main/resources/basicConfigForProperties.xml rename to spring-boot-modules/spring-boot-properties/src/main/resources/basicConfigForProperties.xml diff --git a/spring-boot-properties/src/main/resources/basicConfigForPropertiesOne.xml b/spring-boot-modules/spring-boot-properties/src/main/resources/basicConfigForPropertiesOne.xml similarity index 100% rename from spring-boot-properties/src/main/resources/basicConfigForPropertiesOne.xml rename to spring-boot-modules/spring-boot-properties/src/main/resources/basicConfigForPropertiesOne.xml diff --git a/spring-boot-properties/src/main/resources/basicConfigForPropertiesTwo.xml b/spring-boot-modules/spring-boot-properties/src/main/resources/basicConfigForPropertiesTwo.xml similarity index 100% rename from spring-boot-properties/src/main/resources/basicConfigForPropertiesTwo.xml rename to spring-boot-modules/spring-boot-properties/src/main/resources/basicConfigForPropertiesTwo.xml diff --git a/spring-boot-modules/spring-boot-properties/src/main/resources/build.properties b/spring-boot-modules/spring-boot-properties/src/main/resources/build.properties new file mode 100644 index 0000000000..f3d2e9b15b --- /dev/null +++ b/spring-boot-modules/spring-boot-properties/src/main/resources/build.properties @@ -0,0 +1 @@ +application-version=@project.version@ \ No newline at end of file diff --git a/spring-boot/src/main/resources/build.yml b/spring-boot-modules/spring-boot-properties/src/main/resources/build.yml similarity index 100% rename from spring-boot/src/main/resources/build.yml rename to spring-boot-modules/spring-boot-properties/src/main/resources/build.yml diff --git a/spring-boot-properties/src/main/resources/child.properties b/spring-boot-modules/spring-boot-properties/src/main/resources/child.properties similarity index 100% rename from spring-boot-properties/src/main/resources/child.properties rename to spring-boot-modules/spring-boot-properties/src/main/resources/child.properties diff --git a/spring-boot-properties/src/main/resources/configForProperties.xml b/spring-boot-modules/spring-boot-properties/src/main/resources/configForProperties.xml similarity index 100% rename from spring-boot-properties/src/main/resources/configForProperties.xml rename to spring-boot-modules/spring-boot-properties/src/main/resources/configForProperties.xml diff --git a/spring-boot-properties/src/main/resources/configForPropertiesOne.xml b/spring-boot-modules/spring-boot-properties/src/main/resources/configForPropertiesOne.xml similarity index 100% rename from spring-boot-properties/src/main/resources/configForPropertiesOne.xml rename to spring-boot-modules/spring-boot-properties/src/main/resources/configForPropertiesOne.xml diff --git a/spring-boot-properties/src/main/resources/configprops.json b/spring-boot-modules/spring-boot-properties/src/main/resources/configprops.json similarity index 100% rename from spring-boot-properties/src/main/resources/configprops.json rename to spring-boot-modules/spring-boot-properties/src/main/resources/configprops.json diff --git a/spring-boot-properties/src/main/resources/configprops.properties b/spring-boot-modules/spring-boot-properties/src/main/resources/configprops.properties similarity index 100% rename from spring-boot-properties/src/main/resources/configprops.properties rename to spring-boot-modules/spring-boot-properties/src/main/resources/configprops.properties diff --git a/spring-boot-properties/src/main/resources/conversion.properties b/spring-boot-modules/spring-boot-properties/src/main/resources/conversion.properties similarity index 100% rename from spring-boot-properties/src/main/resources/conversion.properties rename to spring-boot-modules/spring-boot-properties/src/main/resources/conversion.properties diff --git a/spring-boot-properties/src/main/resources/foo.properties b/spring-boot-modules/spring-boot-properties/src/main/resources/foo.properties similarity index 100% rename from spring-boot-properties/src/main/resources/foo.properties rename to spring-boot-modules/spring-boot-properties/src/main/resources/foo.properties diff --git a/spring-boot-properties/src/main/resources/parent.properties b/spring-boot-modules/spring-boot-properties/src/main/resources/parent.properties similarity index 100% rename from spring-boot-properties/src/main/resources/parent.properties rename to spring-boot-modules/spring-boot-properties/src/main/resources/parent.properties diff --git a/spring-boot-properties/src/main/resources/values.properties b/spring-boot-modules/spring-boot-properties/src/main/resources/values.properties similarity index 100% rename from spring-boot-properties/src/main/resources/values.properties rename to spring-boot-modules/spring-boot-properties/src/main/resources/values.properties diff --git a/spring-boot-properties/src/main/resources/valueswithdefaults.properties b/spring-boot-modules/spring-boot-properties/src/main/resources/valueswithdefaults.properties similarity index 100% rename from spring-boot-properties/src/main/resources/valueswithdefaults.properties rename to spring-boot-modules/spring-boot-properties/src/main/resources/valueswithdefaults.properties diff --git a/spring-boot/src/test/java/com/baeldung/buildproperties/BuildInfoServiceIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/buildproperties/BuildInfoServiceIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/buildproperties/BuildInfoServiceIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/buildproperties/BuildInfoServiceIntegrationTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/configurationproperties/ConfigPropertiesIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/configurationproperties/ConfigPropertiesIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/configurationproperties/ConfigPropertiesIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/configurationproperties/ConfigPropertiesIntegrationTest.java diff --git a/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/configurationproperties/ImmutableConfigurationPropertiesIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/configurationproperties/ImmutableConfigurationPropertiesIntegrationTest.java new file mode 100644 index 0000000000..a45932f7be --- /dev/null +++ b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/configurationproperties/ImmutableConfigurationPropertiesIntegrationTest.java @@ -0,0 +1,26 @@ +package com.baeldung.configurationproperties; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.junit4.SpringRunner; + +import static org.assertj.core.api.Assertions.assertThat; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = ImmutableConfigPropertiesApp.class) +@TestPropertySource("classpath:configprops-test.properties") +public class ImmutableConfigurationPropertiesIntegrationTest { + + @Autowired + private ImmutableCredentials immutableCredentials; + + @Test + public void whenConstructorBindingUsed_thenPropertiesCorrectlyBound() { + assertThat(immutableCredentials.getAuthMethod()).isEqualTo("SHA1"); + assertThat(immutableCredentials.getUsername()).isEqualTo("john"); + assertThat(immutableCredentials.getPassword()).isEqualTo("password"); + } +} diff --git a/spring-boot-properties/src/test/java/com/baeldung/configurationproperties/PropertiesConversionIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/configurationproperties/PropertiesConversionIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/configurationproperties/PropertiesConversionIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/configurationproperties/PropertiesConversionIntegrationTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/JsonPropertiesIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/JsonPropertiesIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/JsonPropertiesIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/JsonPropertiesIntegrationTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/basic/BasicPropertiesWithJavaIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/basic/BasicPropertiesWithJavaIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/basic/BasicPropertiesWithJavaIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/basic/BasicPropertiesWithJavaIntegrationTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/basic/ExtendedPropertiesWithJavaIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/basic/ExtendedPropertiesWithJavaIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/basic/ExtendedPropertiesWithJavaIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/basic/ExtendedPropertiesWithJavaIntegrationTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/basic/PropertiesWithJavaIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/basic/PropertiesWithJavaIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/basic/PropertiesWithJavaIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/basic/PropertiesWithJavaIntegrationTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/basic/PropertiesWithMultipleXmlsIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/basic/PropertiesWithMultipleXmlsIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/basic/PropertiesWithMultipleXmlsIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/basic/PropertiesWithMultipleXmlsIntegrationTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/basic/PropertiesWithXmlIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/basic/PropertiesWithXmlIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/basic/PropertiesWithXmlIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/basic/PropertiesWithXmlIntegrationTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/external/ExternalPropertiesWithJavaIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/external/ExternalPropertiesWithJavaIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/external/ExternalPropertiesWithJavaIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/external/ExternalPropertiesWithJavaIntegrationTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/external/ExternalPropertiesWithMultipleXmlsIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/external/ExternalPropertiesWithMultipleXmlsIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/external/ExternalPropertiesWithMultipleXmlsIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/external/ExternalPropertiesWithMultipleXmlsIntegrationTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/external/ExternalPropertiesWithXmlManualTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/external/ExternalPropertiesWithXmlManualTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/external/ExternalPropertiesWithXmlManualTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/external/ExternalPropertiesWithXmlManualTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/multiple/MultiplePropertiesJavaConfigIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/multiple/MultiplePropertiesJavaConfigIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/multiple/MultiplePropertiesJavaConfigIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/multiple/MultiplePropertiesJavaConfigIntegrationTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/multiple/MultiplePropertiesXmlConfigIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/multiple/MultiplePropertiesXmlConfigIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/multiple/MultiplePropertiesXmlConfigIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/multiple/MultiplePropertiesXmlConfigIntegrationTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/ChildValueHolder.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/ChildValueHolder.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/ChildValueHolder.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/ChildValueHolder.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/ParentChildPropertyPlaceHolderPropertiesIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/ParentChildPropertyPlaceHolderPropertiesIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/ParentChildPropertyPlaceHolderPropertiesIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/ParentChildPropertyPlaceHolderPropertiesIntegrationTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/ParentChildPropertySourcePropertiesIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/ParentChildPropertySourcePropertiesIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/ParentChildPropertySourcePropertiesIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/ParentChildPropertySourcePropertiesIntegrationTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/ParentValueHolder.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/ParentValueHolder.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/ParentValueHolder.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/ParentValueHolder.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/config/ChildConfig.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/config/ChildConfig.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/config/ChildConfig.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/config/ChildConfig.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/config/ChildConfig2.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/config/ChildConfig2.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/config/ChildConfig2.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/config/ChildConfig2.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/config/ParentConfig.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/config/ParentConfig.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/config/ParentConfig.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/config/ParentConfig.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/config/ParentConfig2.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/config/ParentConfig2.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/config/ParentConfig2.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/parentchild/config/ParentConfig2.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/PropertiesReloadIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/PropertiesReloadIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/reloading/PropertiesReloadIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/PropertiesReloadIntegrationTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/SpringBootPropertiesTestApplication.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/SpringBootPropertiesTestApplication.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/reloading/SpringBootPropertiesTestApplication.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/SpringBootPropertiesTestApplication.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/beans/ConfigurationPropertiesRefreshConfigBean.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/beans/ConfigurationPropertiesRefreshConfigBean.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/reloading/beans/ConfigurationPropertiesRefreshConfigBean.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/beans/ConfigurationPropertiesRefreshConfigBean.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/beans/EnvironmentConfigBean.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/beans/EnvironmentConfigBean.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/reloading/beans/EnvironmentConfigBean.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/beans/EnvironmentConfigBean.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/beans/PropertiesConfigBean.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/beans/PropertiesConfigBean.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/reloading/beans/PropertiesConfigBean.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/beans/PropertiesConfigBean.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/beans/ValueRefreshConfigBean.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/beans/ValueRefreshConfigBean.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/reloading/beans/ValueRefreshConfigBean.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/reloading/beans/ValueRefreshConfigBean.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/testproperty/FilePropertyInjectionUnitTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/testproperty/FilePropertyInjectionUnitTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/testproperty/FilePropertyInjectionUnitTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/testproperty/FilePropertyInjectionUnitTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/testproperty/PropertyInjectionUnitTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/testproperty/PropertyInjectionUnitTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/testproperty/PropertyInjectionUnitTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/testproperty/PropertyInjectionUnitTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/properties/testproperty/SpringBootPropertyInjectionIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/testproperty/SpringBootPropertyInjectionIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/properties/testproperty/SpringBootPropertyInjectionIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/properties/testproperty/SpringBootPropertyInjectionIntegrationTest.java diff --git a/spring-boot-properties/src/test/java/com/baeldung/test/IntegrationTestSuite.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/test/IntegrationTestSuite.java similarity index 97% rename from spring-boot-properties/src/test/java/com/baeldung/test/IntegrationTestSuite.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/test/IntegrationTestSuite.java index 722c4fd1c4..d41d328867 100644 --- a/spring-boot-properties/src/test/java/com/baeldung/test/IntegrationTestSuite.java +++ b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/test/IntegrationTestSuite.java @@ -1,25 +1,25 @@ -package com.baeldung.test; - -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -import com.baeldung.properties.basic.ExtendedPropertiesWithJavaIntegrationTest; -import com.baeldung.properties.basic.PropertiesWithMultipleXmlsIntegrationTest; -import com.baeldung.properties.basic.PropertiesWithXmlIntegrationTest; -import com.baeldung.properties.external.ExternalPropertiesWithJavaIntegrationTest; -import com.baeldung.properties.external.ExternalPropertiesWithMultipleXmlsIntegrationTest; -import com.baeldung.properties.external.ExternalPropertiesWithXmlManualTest; - -@RunWith(Suite.class) -@SuiteClasses({ //@formatter:off - PropertiesWithXmlIntegrationTest.class, - ExternalPropertiesWithJavaIntegrationTest.class, - ExternalPropertiesWithMultipleXmlsIntegrationTest.class, - ExternalPropertiesWithXmlManualTest.class, - ExtendedPropertiesWithJavaIntegrationTest.class, - PropertiesWithMultipleXmlsIntegrationTest.class, -})// @formatter:on -public final class IntegrationTestSuite { - // -} +package com.baeldung.test; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +import com.baeldung.properties.basic.ExtendedPropertiesWithJavaIntegrationTest; +import com.baeldung.properties.basic.PropertiesWithMultipleXmlsIntegrationTest; +import com.baeldung.properties.basic.PropertiesWithXmlIntegrationTest; +import com.baeldung.properties.external.ExternalPropertiesWithJavaIntegrationTest; +import com.baeldung.properties.external.ExternalPropertiesWithMultipleXmlsIntegrationTest; +import com.baeldung.properties.external.ExternalPropertiesWithXmlManualTest; + +@RunWith(Suite.class) +@SuiteClasses({ //@formatter:off + PropertiesWithXmlIntegrationTest.class, + ExternalPropertiesWithJavaIntegrationTest.class, + ExternalPropertiesWithMultipleXmlsIntegrationTest.class, + ExternalPropertiesWithXmlManualTest.class, + ExtendedPropertiesWithJavaIntegrationTest.class, + PropertiesWithMultipleXmlsIntegrationTest.class, +})// @formatter:on +public final class IntegrationTestSuite { + // +} diff --git a/spring-boot-properties/src/test/java/com/baeldung/value/ClassNotManagedBySpringIntegrationTest.java b/spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/value/ClassNotManagedBySpringIntegrationTest.java similarity index 100% rename from spring-boot-properties/src/test/java/com/baeldung/value/ClassNotManagedBySpringIntegrationTest.java rename to spring-boot-modules/spring-boot-properties/src/test/java/com/baeldung/value/ClassNotManagedBySpringIntegrationTest.java diff --git a/spring-boot-properties/src/test/resources/application.properties b/spring-boot-modules/spring-boot-properties/src/test/resources/application.properties similarity index 100% rename from spring-boot-properties/src/test/resources/application.properties rename to spring-boot-modules/spring-boot-properties/src/test/resources/application.properties diff --git a/spring-boot-properties/src/test/resources/configprops-test.properties b/spring-boot-modules/spring-boot-properties/src/test/resources/configprops-test.properties similarity index 100% rename from spring-boot-properties/src/test/resources/configprops-test.properties rename to spring-boot-modules/spring-boot-properties/src/test/resources/configprops-test.properties diff --git a/spring-boot-properties/src/test/resources/conversion.properties b/spring-boot-modules/spring-boot-properties/src/test/resources/conversion.properties similarity index 100% rename from spring-boot-properties/src/test/resources/conversion.properties rename to spring-boot-modules/spring-boot-properties/src/test/resources/conversion.properties diff --git a/spring-boot-properties/src/test/resources/foo.properties b/spring-boot-modules/spring-boot-properties/src/test/resources/foo.properties similarity index 100% rename from spring-boot-properties/src/test/resources/foo.properties rename to spring-boot-modules/spring-boot-properties/src/test/resources/foo.properties diff --git a/spring-boot-property-exp/README.md b/spring-boot-modules/spring-boot-property-exp/README.md similarity index 100% rename from spring-boot-property-exp/README.md rename to spring-boot-modules/spring-boot-property-exp/README.md diff --git a/spring-boot-property-exp/pom.xml b/spring-boot-modules/spring-boot-property-exp/pom.xml similarity index 85% rename from spring-boot-property-exp/pom.xml rename to spring-boot-modules/spring-boot-property-exp/pom.xml index b16fcd1c22..2da25fca31 100644 --- a/spring-boot-property-exp/pom.xml +++ b/spring-boot-modules/spring-boot-property-exp/pom.xml @@ -8,8 +8,8 @@ pom - com.baeldung - parent-modules + com.baeldung.spring-boot-modules + spring-boot-modules 1.0.0-SNAPSHOT diff --git a/spring-boot-property-exp/property-exp-custom-config/pom.xml b/spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/pom.xml similarity index 98% rename from spring-boot-property-exp/property-exp-custom-config/pom.xml rename to spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/pom.xml index 0118de7396..8ea9c8366d 100644 --- a/spring-boot-property-exp/property-exp-custom-config/pom.xml +++ b/spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/pom.xml @@ -8,7 +8,7 @@ jar - com.baeldung + com.baeldung.spring-boot-modules spring-boot-property-exp 0.0.1-SNAPSHOT diff --git a/spring-boot-property-exp/property-exp-custom-config/src/main/java/com/baeldung/propertyexpansion/SpringBootPropertyExpansionApp.java b/spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/src/main/java/com/baeldung/propertyexpansion/SpringBootPropertyExpansionApp.java similarity index 100% rename from spring-boot-property-exp/property-exp-custom-config/src/main/java/com/baeldung/propertyexpansion/SpringBootPropertyExpansionApp.java rename to spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/src/main/java/com/baeldung/propertyexpansion/SpringBootPropertyExpansionApp.java diff --git a/spring-boot-property-exp/property-exp-custom-config/src/main/java/com/baeldung/propertyexpansion/components/PropertyLoggerBean.java b/spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/src/main/java/com/baeldung/propertyexpansion/components/PropertyLoggerBean.java similarity index 100% rename from spring-boot-property-exp/property-exp-custom-config/src/main/java/com/baeldung/propertyexpansion/components/PropertyLoggerBean.java rename to spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/src/main/java/com/baeldung/propertyexpansion/components/PropertyLoggerBean.java diff --git a/spring-boot-property-exp/property-exp-custom-config/src/main/resources/application.properties b/spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/src/main/resources/application.properties similarity index 100% rename from spring-boot-property-exp/property-exp-custom-config/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/src/main/resources/application.properties diff --git a/spring-boot-property-exp/property-exp-custom-config/src/main/resources/banner.txt b/spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/src/main/resources/banner.txt similarity index 100% rename from spring-boot-property-exp/property-exp-custom-config/src/main/resources/banner.txt rename to spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/src/main/resources/banner.txt diff --git a/spring-boot-mvc-2/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/src/main/resources/logback.xml similarity index 100% rename from spring-boot-mvc-2/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/src/main/resources/logback.xml diff --git a/spring-boot-property-exp/property-exp-custom-config/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-boot-property-exp/property-exp-custom-config/src/test/java/org/baeldung/SpringContextTest.java rename to spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-boot-property-exp/property-exp-default-config/build.gradle b/spring-boot-modules/spring-boot-property-exp/property-exp-default-config/build.gradle similarity index 100% rename from spring-boot-property-exp/property-exp-default-config/build.gradle rename to spring-boot-modules/spring-boot-property-exp/property-exp-default-config/build.gradle diff --git a/spring-boot-property-exp/property-exp-default-config/gradle.properties b/spring-boot-modules/spring-boot-property-exp/property-exp-default-config/gradle.properties similarity index 100% rename from spring-boot-property-exp/property-exp-default-config/gradle.properties rename to spring-boot-modules/spring-boot-property-exp/property-exp-default-config/gradle.properties diff --git a/spring-boot-property-exp/property-exp-default-config/pom.xml b/spring-boot-modules/spring-boot-property-exp/property-exp-default-config/pom.xml similarity index 95% rename from spring-boot-property-exp/property-exp-default-config/pom.xml rename to spring-boot-modules/spring-boot-property-exp/property-exp-default-config/pom.xml index 9cb1de33f6..aa5b8ef34a 100644 --- a/spring-boot-property-exp/property-exp-default-config/pom.xml +++ b/spring-boot-modules/spring-boot-property-exp/property-exp-default-config/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-1 0.0.1-SNAPSHOT - ../../parent-boot-1 + ../../../parent-boot-1 diff --git a/spring-boot-property-exp/property-exp-default-config/settings.gradle b/spring-boot-modules/spring-boot-property-exp/property-exp-default-config/settings.gradle similarity index 100% rename from spring-boot-property-exp/property-exp-default-config/settings.gradle rename to spring-boot-modules/spring-boot-property-exp/property-exp-default-config/settings.gradle diff --git a/spring-boot-property-exp/property-exp-default-config/src/main/java/com/baeldung/propertyexpansion/SpringBootPropertyExpansionApp.java b/spring-boot-modules/spring-boot-property-exp/property-exp-default-config/src/main/java/com/baeldung/propertyexpansion/SpringBootPropertyExpansionApp.java similarity index 100% rename from spring-boot-property-exp/property-exp-default-config/src/main/java/com/baeldung/propertyexpansion/SpringBootPropertyExpansionApp.java rename to spring-boot-modules/spring-boot-property-exp/property-exp-default-config/src/main/java/com/baeldung/propertyexpansion/SpringBootPropertyExpansionApp.java diff --git a/spring-boot-property-exp/property-exp-default-config/src/main/java/com/baeldung/propertyexpansion/components/PropertyLoggerBean.java b/spring-boot-modules/spring-boot-property-exp/property-exp-default-config/src/main/java/com/baeldung/propertyexpansion/components/PropertyLoggerBean.java similarity index 100% rename from spring-boot-property-exp/property-exp-default-config/src/main/java/com/baeldung/propertyexpansion/components/PropertyLoggerBean.java rename to spring-boot-modules/spring-boot-property-exp/property-exp-default-config/src/main/java/com/baeldung/propertyexpansion/components/PropertyLoggerBean.java diff --git a/spring-boot-property-exp/property-exp-default-config/src/main/resources/application.properties b/spring-boot-modules/spring-boot-property-exp/property-exp-default-config/src/main/resources/application.properties similarity index 100% rename from spring-boot-property-exp/property-exp-default-config/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-property-exp/property-exp-default-config/src/main/resources/application.properties diff --git a/spring-boot-property-exp/property-exp-default-config/src/main/resources/banner.txt b/spring-boot-modules/spring-boot-property-exp/property-exp-default-config/src/main/resources/banner.txt similarity index 100% rename from spring-boot-property-exp/property-exp-default-config/src/main/resources/banner.txt rename to spring-boot-modules/spring-boot-property-exp/property-exp-default-config/src/main/resources/banner.txt diff --git a/spring-boot-mvc/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-property-exp/property-exp-default-config/src/main/resources/logback.xml similarity index 100% rename from spring-boot-mvc/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-property-exp/property-exp-default-config/src/main/resources/logback.xml diff --git a/spring-boot-property-exp/property-exp-default-config/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-property-exp/property-exp-default-config/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-boot-property-exp/property-exp-default-config/src/test/java/org/baeldung/SpringContextTest.java rename to spring-boot-modules/spring-boot-property-exp/property-exp-default-config/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-boot-runtime/README.md b/spring-boot-modules/spring-boot-runtime/README.md similarity index 100% rename from spring-boot-runtime/README.md rename to spring-boot-modules/spring-boot-runtime/README.md diff --git a/spring-boot-runtime/disabling-console-jul/.gitignore b/spring-boot-modules/spring-boot-runtime/disabling-console-jul/.gitignore similarity index 100% rename from spring-boot-runtime/disabling-console-jul/.gitignore rename to spring-boot-modules/spring-boot-runtime/disabling-console-jul/.gitignore diff --git a/spring-boot-runtime/disabling-console-jul/README.md b/spring-boot-modules/spring-boot-runtime/disabling-console-jul/README.md similarity index 100% rename from spring-boot-runtime/disabling-console-jul/README.md rename to spring-boot-modules/spring-boot-runtime/disabling-console-jul/README.md diff --git a/spring-boot-runtime/disabling-console-jul/pom.xml b/spring-boot-modules/spring-boot-runtime/disabling-console-jul/pom.xml similarity index 91% rename from spring-boot-runtime/disabling-console-jul/pom.xml rename to spring-boot-modules/spring-boot-runtime/disabling-console-jul/pom.xml index 2dc1a834b6..2f1c9c2add 100644 --- a/spring-boot-runtime/disabling-console-jul/pom.xml +++ b/spring-boot-modules/spring-boot-runtime/disabling-console-jul/pom.xml @@ -7,9 +7,9 @@ - org.springframework.boot - spring-boot-starter-parent - 2.1.1.RELEASE + com.baeldung + spring-boot-runtime + 0.0.1-SNAPSHOT diff --git a/spring-boot-runtime/disabling-console-jul/src/main/java/com/baeldung/springbootlogging/disablingconsole/jul/properties/DisablingConsoleJulApp.java b/spring-boot-modules/spring-boot-runtime/disabling-console-jul/src/main/java/com/baeldung/springbootlogging/disablingconsole/jul/properties/DisablingConsoleJulApp.java similarity index 100% rename from spring-boot-runtime/disabling-console-jul/src/main/java/com/baeldung/springbootlogging/disablingconsole/jul/properties/DisablingConsoleJulApp.java rename to spring-boot-modules/spring-boot-runtime/disabling-console-jul/src/main/java/com/baeldung/springbootlogging/disablingconsole/jul/properties/DisablingConsoleJulApp.java diff --git a/spring-boot-runtime/disabling-console-jul/src/main/java/com/baeldung/springbootlogging/disablingconsole/jul/properties/controllers/DisabledConsoleRestController.java b/spring-boot-modules/spring-boot-runtime/disabling-console-jul/src/main/java/com/baeldung/springbootlogging/disablingconsole/jul/properties/controllers/DisabledConsoleRestController.java similarity index 100% rename from spring-boot-runtime/disabling-console-jul/src/main/java/com/baeldung/springbootlogging/disablingconsole/jul/properties/controllers/DisabledConsoleRestController.java rename to spring-boot-modules/spring-boot-runtime/disabling-console-jul/src/main/java/com/baeldung/springbootlogging/disablingconsole/jul/properties/controllers/DisabledConsoleRestController.java diff --git a/spring-boot-runtime/disabling-console-jul/src/main/resources/application.properties b/spring-boot-modules/spring-boot-runtime/disabling-console-jul/src/main/resources/application.properties similarity index 100% rename from spring-boot-runtime/disabling-console-jul/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-runtime/disabling-console-jul/src/main/resources/application.properties diff --git a/spring-boot-runtime/disabling-console-jul/src/main/resources/logging.properties b/spring-boot-modules/spring-boot-runtime/disabling-console-jul/src/main/resources/logging.properties similarity index 100% rename from spring-boot-runtime/disabling-console-jul/src/main/resources/logging.properties rename to spring-boot-modules/spring-boot-runtime/disabling-console-jul/src/main/resources/logging.properties diff --git a/spring-boot-runtime/disabling-console-log4j2/.gitignore b/spring-boot-modules/spring-boot-runtime/disabling-console-log4j2/.gitignore similarity index 100% rename from spring-boot-runtime/disabling-console-log4j2/.gitignore rename to spring-boot-modules/spring-boot-runtime/disabling-console-log4j2/.gitignore diff --git a/spring-boot-runtime/disabling-console-log4j2/README.md b/spring-boot-modules/spring-boot-runtime/disabling-console-log4j2/README.md similarity index 100% rename from spring-boot-runtime/disabling-console-log4j2/README.md rename to spring-boot-modules/spring-boot-runtime/disabling-console-log4j2/README.md diff --git a/spring-boot-runtime/disabling-console-log4j2/pom.xml b/spring-boot-modules/spring-boot-runtime/disabling-console-log4j2/pom.xml similarity index 90% rename from spring-boot-runtime/disabling-console-log4j2/pom.xml rename to spring-boot-modules/spring-boot-runtime/disabling-console-log4j2/pom.xml index b743c4bdac..35f54999ec 100644 --- a/spring-boot-runtime/disabling-console-log4j2/pom.xml +++ b/spring-boot-modules/spring-boot-runtime/disabling-console-log4j2/pom.xml @@ -7,9 +7,9 @@ - org.springframework.boot - spring-boot-starter-parent - 2.1.1.RELEASE + com.baeldung + spring-boot-runtime + 0.0.1-SNAPSHOT diff --git a/spring-boot-runtime/disabling-console-log4j2/src/main/java/com/baeldung/springbootlogging/disablingconsole/log4j2/xml/DisablingConsoleLog4j2App.java b/spring-boot-modules/spring-boot-runtime/disabling-console-log4j2/src/main/java/com/baeldung/springbootlogging/disablingconsole/log4j2/xml/DisablingConsoleLog4j2App.java similarity index 100% rename from spring-boot-runtime/disabling-console-log4j2/src/main/java/com/baeldung/springbootlogging/disablingconsole/log4j2/xml/DisablingConsoleLog4j2App.java rename to spring-boot-modules/spring-boot-runtime/disabling-console-log4j2/src/main/java/com/baeldung/springbootlogging/disablingconsole/log4j2/xml/DisablingConsoleLog4j2App.java diff --git a/spring-boot-runtime/disabling-console-log4j2/src/main/java/com/baeldung/springbootlogging/disablingconsole/log4j2/xml/controllers/DisabledConsoleRestController.java b/spring-boot-modules/spring-boot-runtime/disabling-console-log4j2/src/main/java/com/baeldung/springbootlogging/disablingconsole/log4j2/xml/controllers/DisabledConsoleRestController.java similarity index 100% rename from spring-boot-runtime/disabling-console-log4j2/src/main/java/com/baeldung/springbootlogging/disablingconsole/log4j2/xml/controllers/DisabledConsoleRestController.java rename to spring-boot-modules/spring-boot-runtime/disabling-console-log4j2/src/main/java/com/baeldung/springbootlogging/disablingconsole/log4j2/xml/controllers/DisabledConsoleRestController.java diff --git a/spring-boot-runtime/disabling-console-log4j2/src/main/resources/log4j2.xml b/spring-boot-modules/spring-boot-runtime/disabling-console-log4j2/src/main/resources/log4j2.xml similarity index 100% rename from spring-boot-runtime/disabling-console-log4j2/src/main/resources/log4j2.xml rename to spring-boot-modules/spring-boot-runtime/disabling-console-log4j2/src/main/resources/log4j2.xml diff --git a/spring-boot-runtime/disabling-console-logback/.gitignore b/spring-boot-modules/spring-boot-runtime/disabling-console-logback/.gitignore similarity index 100% rename from spring-boot-runtime/disabling-console-logback/.gitignore rename to spring-boot-modules/spring-boot-runtime/disabling-console-logback/.gitignore diff --git a/spring-boot-runtime/disabling-console-logback/README.md b/spring-boot-modules/spring-boot-runtime/disabling-console-logback/README.md similarity index 100% rename from spring-boot-runtime/disabling-console-logback/README.md rename to spring-boot-modules/spring-boot-runtime/disabling-console-logback/README.md diff --git a/spring-boot-runtime/disabling-console-logback/pom.xml b/spring-boot-modules/spring-boot-runtime/disabling-console-logback/pom.xml similarity index 86% rename from spring-boot-runtime/disabling-console-logback/pom.xml rename to spring-boot-modules/spring-boot-runtime/disabling-console-logback/pom.xml index 1a415328b6..c96dfb6a2f 100644 --- a/spring-boot-runtime/disabling-console-logback/pom.xml +++ b/spring-boot-modules/spring-boot-runtime/disabling-console-logback/pom.xml @@ -8,9 +8,8 @@ com.baeldung - spring-boot-disable-console-logging + spring-boot-runtime 0.0.1-SNAPSHOT - ../ diff --git a/spring-boot-runtime/disabling-console-logback/src/main/java/com/baeldung/springbootlogging/disablingconsole/logback/xml/DisablingConsoleLogbackApp.java b/spring-boot-modules/spring-boot-runtime/disabling-console-logback/src/main/java/com/baeldung/springbootlogging/disablingconsole/logback/xml/DisablingConsoleLogbackApp.java similarity index 100% rename from spring-boot-runtime/disabling-console-logback/src/main/java/com/baeldung/springbootlogging/disablingconsole/logback/xml/DisablingConsoleLogbackApp.java rename to spring-boot-modules/spring-boot-runtime/disabling-console-logback/src/main/java/com/baeldung/springbootlogging/disablingconsole/logback/xml/DisablingConsoleLogbackApp.java diff --git a/spring-boot-runtime/disabling-console-logback/src/main/java/com/baeldung/springbootlogging/disablingconsole/logback/xml/controllers/DisabledConsoleRestController.java b/spring-boot-modules/spring-boot-runtime/disabling-console-logback/src/main/java/com/baeldung/springbootlogging/disablingconsole/logback/xml/controllers/DisabledConsoleRestController.java similarity index 100% rename from spring-boot-runtime/disabling-console-logback/src/main/java/com/baeldung/springbootlogging/disablingconsole/logback/xml/controllers/DisabledConsoleRestController.java rename to spring-boot-modules/spring-boot-runtime/disabling-console-logback/src/main/java/com/baeldung/springbootlogging/disablingconsole/logback/xml/controllers/DisabledConsoleRestController.java diff --git a/spring-boot-runtime/disabling-console-logback/src/main/resources/application.properties b/spring-boot-modules/spring-boot-runtime/disabling-console-logback/src/main/resources/application.properties similarity index 100% rename from spring-boot-runtime/disabling-console-logback/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-runtime/disabling-console-logback/src/main/resources/application.properties diff --git a/spring-boot-runtime/disabling-console-logback/src/main/resources/logback-spring.xml b/spring-boot-modules/spring-boot-runtime/disabling-console-logback/src/main/resources/logback-spring.xml similarity index 100% rename from spring-boot-runtime/disabling-console-logback/src/main/resources/logback-spring.xml rename to spring-boot-modules/spring-boot-runtime/disabling-console-logback/src/main/resources/logback-spring.xml diff --git a/spring-boot-runtime/docker/Dockerfile b/spring-boot-modules/spring-boot-runtime/docker/Dockerfile similarity index 100% rename from spring-boot-runtime/docker/Dockerfile rename to spring-boot-modules/spring-boot-runtime/docker/Dockerfile diff --git a/spring-boot-runtime/docker/logback.xml b/spring-boot-modules/spring-boot-runtime/docker/logback.xml similarity index 100% rename from spring-boot-runtime/docker/logback.xml rename to spring-boot-modules/spring-boot-runtime/docker/logback.xml diff --git a/spring-boot-runtime/docker/run.sh b/spring-boot-modules/spring-boot-runtime/docker/run.sh similarity index 100% rename from spring-boot-runtime/docker/run.sh rename to spring-boot-modules/spring-boot-runtime/docker/run.sh diff --git a/spring-boot-runtime/pom.xml b/spring-boot-modules/spring-boot-runtime/pom.xml similarity index 95% rename from spring-boot-runtime/pom.xml rename to spring-boot-modules/spring-boot-runtime/pom.xml index baa7faebf8..df45537940 100644 --- a/spring-boot-runtime/pom.xml +++ b/spring-boot-modules/spring-boot-runtime/pom.xml @@ -4,16 +4,22 @@ 4.0.0 spring-boot-runtime spring-boot-runtime - war + pom Demo project for Spring Boot com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 + + disabling-console-jul + disabling-console-log4j2 + disabling-console-logback + + diff --git a/spring-boot-runtime/src/main/java/com/baeldung/changeport/CustomApplication.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/changeport/CustomApplication.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/changeport/CustomApplication.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/changeport/CustomApplication.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/changeport/ServerPortCustomizer.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/changeport/ServerPortCustomizer.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/changeport/ServerPortCustomizer.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/changeport/ServerPortCustomizer.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/cors/Account.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/cors/Account.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/cors/Account.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/cors/Account.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/cors/AccountController.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/cors/AccountController.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/cors/AccountController.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/cors/AccountController.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/restart/Application.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/restart/Application.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/restart/Application.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/restart/Application.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/restart/RestartController.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/restart/RestartController.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/restart/RestartController.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/restart/RestartController.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/restart/RestartService.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/restart/RestartService.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/restart/RestartService.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/restart/RestartService.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/config/MainApplication.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/config/MainApplication.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/config/MainApplication.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/config/MainApplication.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/config/RestClientConfig.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/config/RestClientConfig.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/config/RestClientConfig.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/config/RestClientConfig.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/config/WebConfig.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/config/WebConfig.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/config/WebConfig.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/config/WebConfig.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/interceptors/RestTemplateHeaderModifierInterceptor.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/interceptors/RestTemplateHeaderModifierInterceptor.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/interceptors/RestTemplateHeaderModifierInterceptor.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/interceptors/RestTemplateHeaderModifierInterceptor.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/repository/HeavyResourceRepository.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/repository/HeavyResourceRepository.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/repository/HeavyResourceRepository.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/repository/HeavyResourceRepository.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/BarMappingExamplesController.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/BarMappingExamplesController.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/BarMappingExamplesController.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/BarMappingExamplesController.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/CompanyController.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/CompanyController.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/CompanyController.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/CompanyController.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/DeferredResultController.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/DeferredResultController.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/DeferredResultController.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/DeferredResultController.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/HeavyResourceController.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/HeavyResourceController.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/HeavyResourceController.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/HeavyResourceController.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/ItemController.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/ItemController.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/ItemController.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/ItemController.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/MyFooController.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/MyFooController.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/MyFooController.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/MyFooController.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/PactController.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/PactController.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/PactController.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/PactController.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/SimplePostController.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/SimplePostController.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/SimplePostController.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/SimplePostController.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/mediatypes/CustomMediaTypeController.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/mediatypes/CustomMediaTypeController.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/mediatypes/CustomMediaTypeController.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/mediatypes/CustomMediaTypeController.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/redirect/RedirectController.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/redirect/RedirectController.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/redirect/RedirectController.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/controller/redirect/RedirectController.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/BaeldungItem.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/BaeldungItem.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/BaeldungItem.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/BaeldungItem.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/BaeldungItemV2.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/BaeldungItemV2.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/BaeldungItemV2.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/BaeldungItemV2.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/Company.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/Company.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/Company.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/Company.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/Foo.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/Foo.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/Foo.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/Foo.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResource.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResource.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResource.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResource.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResourceAddressOnly.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResourceAddressOnly.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResourceAddressOnly.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResourceAddressOnly.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResourceAddressPartialUpdate.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResourceAddressPartialUpdate.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResourceAddressPartialUpdate.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/HeavyResourceAddressPartialUpdate.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/Item.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/Item.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/Item.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/Item.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/ItemManager.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/ItemManager.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/ItemManager.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/ItemManager.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/PactDto.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/PactDto.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/PactDto.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/PactDto.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/Views.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/Views.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/Views.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/dto/Views.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/exception/ResourceNotFoundException.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/exception/ResourceNotFoundException.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/exception/ResourceNotFoundException.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/sampleapp/web/exception/ResourceNotFoundException.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/shutdown/Application.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/shutdown/Application.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/shutdown/Application.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/shutdown/Application.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/shutdown/ShutdownConfig.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/shutdown/ShutdownConfig.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/shutdown/ShutdownConfig.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/shutdown/ShutdownConfig.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/shutdown/TerminateBean.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/shutdown/TerminateBean.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/shutdown/TerminateBean.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/shutdown/TerminateBean.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/shutdown/shutdown/ShutdownController.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/shutdown/shutdown/ShutdownController.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/shutdown/shutdown/ShutdownController.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/shutdown/shutdown/ShutdownController.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/logging/LoggingApplication.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/logging/LoggingApplication.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/logging/LoggingApplication.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/logging/LoggingApplication.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/logging/LoggingController.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/logging/LoggingController.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/logging/LoggingController.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/logging/LoggingController.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/logging/SecurityConfig.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/logging/SecurityConfig.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/logging/SecurityConfig.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/logging/SecurityConfig.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/trace/App.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/trace/App.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/trace/App.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/trace/App.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/trace/CustomTraceRepository.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/trace/CustomTraceRepository.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/trace/CustomTraceRepository.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/trace/CustomTraceRepository.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/trace/EchoController.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/trace/EchoController.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/trace/EchoController.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/trace/EchoController.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/trace/TraceRequestFilter.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/trace/TraceRequestFilter.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/trace/TraceRequestFilter.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/spring/boot/management/trace/TraceRequestFilter.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/web/log/app/Application.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/app/Application.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/web/log/app/Application.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/app/Application.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/web/log/app/TaxiFareRequestInterceptor.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/app/TaxiFareRequestInterceptor.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/web/log/app/TaxiFareRequestInterceptor.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/app/TaxiFareRequestInterceptor.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/web/log/config/CustomeRequestLoggingFilter.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/config/CustomeRequestLoggingFilter.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/web/log/config/CustomeRequestLoggingFilter.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/config/CustomeRequestLoggingFilter.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/web/log/config/RequestLoggingFilterConfig.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/config/RequestLoggingFilterConfig.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/web/log/config/RequestLoggingFilterConfig.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/config/RequestLoggingFilterConfig.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/web/log/config/TaxiFareMVCConfig.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/config/TaxiFareMVCConfig.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/web/log/config/TaxiFareMVCConfig.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/config/TaxiFareMVCConfig.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/web/log/controller/TaxiFareController.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/controller/TaxiFareController.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/web/log/controller/TaxiFareController.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/controller/TaxiFareController.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/web/log/data/RateCard.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/data/RateCard.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/web/log/data/RateCard.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/data/RateCard.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/web/log/data/TaxiRide.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/data/TaxiRide.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/web/log/data/TaxiRide.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/data/TaxiRide.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/web/log/service/TaxiFareCalculatorService.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/service/TaxiFareCalculatorService.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/web/log/service/TaxiFareCalculatorService.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/service/TaxiFareCalculatorService.java diff --git a/spring-boot-runtime/src/main/java/com/baeldung/web/log/util/RequestLoggingUtil.java b/spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/util/RequestLoggingUtil.java similarity index 100% rename from spring-boot-runtime/src/main/java/com/baeldung/web/log/util/RequestLoggingUtil.java rename to spring-boot-modules/spring-boot-runtime/src/main/java/com/baeldung/web/log/util/RequestLoggingUtil.java diff --git a/spring-boot-runtime/src/main/resources/application-log.properties b/spring-boot-modules/spring-boot-runtime/src/main/resources/application-log.properties similarity index 100% rename from spring-boot-runtime/src/main/resources/application-log.properties rename to spring-boot-modules/spring-boot-runtime/src/main/resources/application-log.properties diff --git a/spring-boot-runtime/src/main/resources/application-logging.properties b/spring-boot-modules/spring-boot-runtime/src/main/resources/application-logging.properties similarity index 100% rename from spring-boot-runtime/src/main/resources/application-logging.properties rename to spring-boot-modules/spring-boot-runtime/src/main/resources/application-logging.properties diff --git a/spring-boot-runtime/src/main/resources/application-tomcat.properties b/spring-boot-modules/spring-boot-runtime/src/main/resources/application-tomcat.properties similarity index 100% rename from spring-boot-runtime/src/main/resources/application-tomcat.properties rename to spring-boot-modules/spring-boot-runtime/src/main/resources/application-tomcat.properties diff --git a/spring-boot-runtime/src/main/resources/application.properties b/spring-boot-modules/spring-boot-runtime/src/main/resources/application.properties similarity index 100% rename from spring-boot-runtime/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-runtime/src/main/resources/application.properties diff --git a/spring-boot-property-exp/property-exp-custom-config/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-runtime/src/main/resources/logback.xml similarity index 100% rename from spring-boot-property-exp/property-exp-custom-config/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-runtime/src/main/resources/logback.xml diff --git a/spring-boot-runtime/src/main/webapp/WEB-INF/api-servlet.xml b/spring-boot-modules/spring-boot-runtime/src/main/webapp/WEB-INF/api-servlet.xml similarity index 100% rename from spring-boot-runtime/src/main/webapp/WEB-INF/api-servlet.xml rename to spring-boot-modules/spring-boot-runtime/src/main/webapp/WEB-INF/api-servlet.xml diff --git a/spring-boot-runtime/src/main/webapp/WEB-INF/company.html b/spring-boot-modules/spring-boot-runtime/src/main/webapp/WEB-INF/company.html similarity index 100% rename from spring-boot-runtime/src/main/webapp/WEB-INF/company.html rename to spring-boot-modules/spring-boot-runtime/src/main/webapp/WEB-INF/company.html diff --git a/spring-boot-runtime/src/main/webapp/WEB-INF/spring-views.xml b/spring-boot-modules/spring-boot-runtime/src/main/webapp/WEB-INF/spring-views.xml similarity index 100% rename from spring-boot-runtime/src/main/webapp/WEB-INF/spring-views.xml rename to spring-boot-modules/spring-boot-runtime/src/main/webapp/WEB-INF/spring-views.xml diff --git a/spring-boot-runtime/src/main/webapp/WEB-INF/web.xml b/spring-boot-modules/spring-boot-runtime/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from spring-boot-runtime/src/main/webapp/WEB-INF/web.xml rename to spring-boot-modules/spring-boot-runtime/src/main/webapp/WEB-INF/web.xml diff --git a/spring-boot-runtime/src/test/java/com/baeldung/restart/RestartApplicationManualTest.java b/spring-boot-modules/spring-boot-runtime/src/test/java/com/baeldung/restart/RestartApplicationManualTest.java similarity index 100% rename from spring-boot-runtime/src/test/java/com/baeldung/restart/RestartApplicationManualTest.java rename to spring-boot-modules/spring-boot-runtime/src/test/java/com/baeldung/restart/RestartApplicationManualTest.java diff --git a/spring-boot-runtime/src/test/java/com/baeldung/shutdown/ShutdownApplicationIntegrationTest.java b/spring-boot-modules/spring-boot-runtime/src/test/java/com/baeldung/shutdown/ShutdownApplicationIntegrationTest.java similarity index 100% rename from spring-boot-runtime/src/test/java/com/baeldung/shutdown/ShutdownApplicationIntegrationTest.java rename to spring-boot-modules/spring-boot-runtime/src/test/java/com/baeldung/shutdown/ShutdownApplicationIntegrationTest.java diff --git a/spring-boot-runtime/src/test/java/com/baeldung/web/controller/HeavyResourceControllerIntegrationTest.java b/spring-boot-modules/spring-boot-runtime/src/test/java/com/baeldung/web/controller/HeavyResourceControllerIntegrationTest.java similarity index 100% rename from spring-boot-runtime/src/test/java/com/baeldung/web/controller/HeavyResourceControllerIntegrationTest.java rename to spring-boot-modules/spring-boot-runtime/src/test/java/com/baeldung/web/controller/HeavyResourceControllerIntegrationTest.java diff --git a/spring-boot-runtime/src/test/java/com/baeldung/web/controller/TaxiFareControllerIntegrationTest.java b/spring-boot-modules/spring-boot-runtime/src/test/java/com/baeldung/web/controller/TaxiFareControllerIntegrationTest.java similarity index 100% rename from spring-boot-runtime/src/test/java/com/baeldung/web/controller/TaxiFareControllerIntegrationTest.java rename to spring-boot-modules/spring-boot-runtime/src/test/java/com/baeldung/web/controller/TaxiFareControllerIntegrationTest.java diff --git a/spring-boot-runtime/src/test/resources/application-integrationtest.properties b/spring-boot-modules/spring-boot-runtime/src/test/resources/application-integrationtest.properties similarity index 100% rename from spring-boot-runtime/src/test/resources/application-integrationtest.properties rename to spring-boot-modules/spring-boot-runtime/src/test/resources/application-integrationtest.properties diff --git a/spring-boot-runtime/src/test/resources/application.properties b/spring-boot-modules/spring-boot-runtime/src/test/resources/application.properties similarity index 100% rename from spring-boot-runtime/src/test/resources/application.properties rename to spring-boot-modules/spring-boot-runtime/src/test/resources/application.properties diff --git a/spring-boot-security/README.md b/spring-boot-modules/spring-boot-security/README.md similarity index 88% rename from spring-boot-security/README.md rename to spring-boot-modules/spring-boot-security/README.md index be4690f321..7229ba0f4a 100644 --- a/spring-boot-security/README.md +++ b/spring-boot-modules/spring-boot-security/README.md @@ -7,6 +7,7 @@ This module contains articles about Spring Boot Security - [Spring Boot Security Auto-Configuration](https://www.baeldung.com/spring-boot-security-autoconfiguration) - [Spring Security for Spring Boot Integration Tests](https://www.baeldung.com/spring-security-integration-tests) - [Introduction to Spring Security Taglibs](https://www.baeldung.com/spring-security-taglibs) +- [Guide to @CurrentSecurityContext in Spring Security](https://www.baeldung.com/spring-currentsecuritycontext) ### Spring Boot Security Auto-Configuration diff --git a/spring-boot-security/pom.xml b/spring-boot-modules/spring-boot-security/pom.xml similarity index 83% rename from spring-boot-security/pom.xml rename to spring-boot-modules/spring-boot-security/pom.xml index 62c04b4dc3..a72113ce2f 100644 --- a/spring-boot-security/pom.xml +++ b/spring-boot-modules/spring-boot-security/pom.xml @@ -11,7 +11,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 @@ -22,12 +22,22 @@ org.springframework.security.oauth spring-security-oauth2 - 2.3.3.RELEASE + 2.4.0.RELEASE + + + org.springframework.security + spring-security-core + 5.2.1.RELEASE + + + commons-io + commons-io + 2.6 org.springframework.security.oauth.boot spring-security-oauth2-autoconfigure - 2.1.2.RELEASE + 2.2.2.RELEASE org.springframework.boot @@ -64,7 +74,7 @@ org.springframework.boot spring-boot-autoconfigure - 2.1.1.RELEASE + diff --git a/spring-boot-security/src/main/java/com/baeldung/integrationtesting/MethodSecurityConfigurer.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/MethodSecurityConfigurer.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/integrationtesting/MethodSecurityConfigurer.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/MethodSecurityConfigurer.java diff --git a/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredApplication.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredApplication.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredApplication.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredApplication.java diff --git a/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredController.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredController.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredController.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredController.java diff --git a/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredService.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredService.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredService.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/SecuredService.java diff --git a/spring-boot-security/src/main/java/com/baeldung/integrationtesting/WebSecurityConfigurer.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/WebSecurityConfigurer.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/integrationtesting/WebSecurityConfigurer.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/integrationtesting/WebSecurityConfigurer.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/SpringBootSecurityApplication.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/SpringBootSecurityApplication.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/SpringBootSecurityApplication.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/SpringBootSecurityApplication.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfiguration.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfiguration.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfiguration.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfiguration.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2resource/SpringBootOAuth2ResourceApplication.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2resource/SpringBootOAuth2ResourceApplication.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2resource/SpringBootOAuth2ResourceApplication.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2resource/SpringBootOAuth2ResourceApplication.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/SpringBootAuthorizationServerApplication.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/SpringBootAuthorizationServerApplication.java similarity index 54% rename from spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/SpringBootAuthorizationServerApplication.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/SpringBootAuthorizationServerApplication.java index 44dabefbb8..04f046ff78 100644 --- a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/SpringBootAuthorizationServerApplication.java +++ b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/SpringBootAuthorizationServerApplication.java @@ -1,7 +1,11 @@ package com.baeldung.springbootsecurity.oauth2server; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.annotation.CurrentSecurityContext; import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer; import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer; import org.springframework.web.bind.annotation.GetMapping; @@ -14,6 +18,8 @@ import java.security.Principal; @SpringBootApplication(scanBasePackages = "com.baeldung.springbootsecurity.oauth2server") public class SpringBootAuthorizationServerApplication { + private static final Logger logger = LoggerFactory.getLogger(SpringBootAuthorizationServerApplication.class); + public static void main(String[] args) { SpringApplication.run(SpringBootAuthorizationServerApplication.class, args); } @@ -26,5 +32,16 @@ public class SpringBootAuthorizationServerApplication { return user; } + @GetMapping("/authentication") + public Object getAuthentication(@CurrentSecurityContext(expression = "authentication") Authentication authentication) { + logger.info("authentication -> {}", authentication); + return authentication.getDetails(); + } + + @GetMapping("/principal") + public String getPrincipal(@CurrentSecurityContext(expression = "authentication.principal") Principal principal) { + logger.info("principal -> {}", principal); + return principal.getName(); + } } } diff --git a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthenticationMananagerConfig.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthenticationMananagerConfig.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthenticationMananagerConfig.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthenticationMananagerConfig.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthorizationServerConfig.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthorizationServerConfig.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthorizationServerConfig.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/AuthorizationServerConfig.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/WebSecurityConfiguration.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/WebSecurityConfiguration.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/WebSecurityConfiguration.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2server/config/WebSecurityConfiguration.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2sso/SpringBootOAuth2SsoApplication.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2sso/SpringBootOAuth2SsoApplication.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2sso/SpringBootOAuth2SsoApplication.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springbootsecurity/oauth2sso/SpringBootOAuth2SsoApplication.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/HomeController.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/HomeController.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/HomeController.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/HomeController.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/SpringBootSecurityTagLibsApplication.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/SpringBootSecurityTagLibsApplication.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/SpringBootSecurityTagLibsApplication.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/SpringBootSecurityTagLibsApplication.java diff --git a/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/config/SpringBootSecurityTagLibsConfig.java b/spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/config/SpringBootSecurityTagLibsConfig.java similarity index 100% rename from spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/config/SpringBootSecurityTagLibsConfig.java rename to spring-boot-modules/spring-boot-security/src/main/java/com/baeldung/springsecuritytaglibs/config/SpringBootSecurityTagLibsConfig.java diff --git a/spring-boot-security/src/main/resources/application-authz.properties b/spring-boot-modules/spring-boot-security/src/main/resources/application-authz.properties similarity index 100% rename from spring-boot-security/src/main/resources/application-authz.properties rename to spring-boot-modules/spring-boot-security/src/main/resources/application-authz.properties diff --git a/spring-boot-security/src/main/resources/application-resource.properties b/spring-boot-modules/spring-boot-security/src/main/resources/application-resource.properties similarity index 100% rename from spring-boot-security/src/main/resources/application-resource.properties rename to spring-boot-modules/spring-boot-security/src/main/resources/application-resource.properties diff --git a/spring-boot-security/src/main/resources/application-sso.properties b/spring-boot-modules/spring-boot-security/src/main/resources/application-sso.properties similarity index 100% rename from spring-boot-security/src/main/resources/application-sso.properties rename to spring-boot-modules/spring-boot-security/src/main/resources/application-sso.properties diff --git a/spring-boot-security/src/main/resources/application-taglibs.properties b/spring-boot-modules/spring-boot-security/src/main/resources/application-taglibs.properties similarity index 100% rename from spring-boot-security/src/main/resources/application-taglibs.properties rename to spring-boot-modules/spring-boot-security/src/main/resources/application-taglibs.properties diff --git a/spring-boot-security/src/main/resources/application.properties b/spring-boot-modules/spring-boot-security/src/main/resources/application.properties similarity index 100% rename from spring-boot-security/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-security/src/main/resources/application.properties diff --git a/spring-boot-property-exp/property-exp-default-config/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-security/src/main/resources/logback.xml similarity index 100% rename from spring-boot-property-exp/property-exp-default-config/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-security/src/main/resources/logback.xml diff --git a/spring-boot-security/src/main/resources/static/index.html b/spring-boot-modules/spring-boot-security/src/main/resources/static/index.html similarity index 100% rename from spring-boot-security/src/main/resources/static/index.html rename to spring-boot-modules/spring-boot-security/src/main/resources/static/index.html diff --git a/spring-boot-security/src/main/webapp/WEB-INF/views/home.jsp b/spring-boot-modules/spring-boot-security/src/main/webapp/WEB-INF/views/home.jsp similarity index 100% rename from spring-boot-security/src/main/webapp/WEB-INF/views/home.jsp rename to spring-boot-modules/spring-boot-security/src/main/webapp/WEB-INF/views/home.jsp diff --git a/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerRestTemplateIntegrationTest.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerRestTemplateIntegrationTest.java similarity index 100% rename from spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerRestTemplateIntegrationTest.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerRestTemplateIntegrationTest.java diff --git a/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerSpringBootIntegrationTest.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerSpringBootIntegrationTest.java similarity index 100% rename from spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerSpringBootIntegrationTest.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerSpringBootIntegrationTest.java diff --git a/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerWebMvcIntegrationTest.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerWebMvcIntegrationTest.java similarity index 100% rename from spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerWebMvcIntegrationTest.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredControllerWebMvcIntegrationTest.java diff --git a/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredMethodSpringBootIntegrationTest.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredMethodSpringBootIntegrationTest.java similarity index 100% rename from spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredMethodSpringBootIntegrationTest.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/integrationtesting/SecuredMethodSpringBootIntegrationTest.java diff --git a/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfigurationIntegrationTest.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfigurationIntegrationTest.java similarity index 100% rename from spring-boot-security/src/test/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfigurationIntegrationTest.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/autoconfig/config/BasicConfigurationIntegrationTest.java diff --git a/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/CustomConfigAuthorizationServerIntegrationTest.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/CustomConfigAuthorizationServerIntegrationTest.java similarity index 61% rename from spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/CustomConfigAuthorizationServerIntegrationTest.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/CustomConfigAuthorizationServerIntegrationTest.java index cc953eef5a..104e115b18 100644 --- a/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/CustomConfigAuthorizationServerIntegrationTest.java +++ b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/CustomConfigAuthorizationServerIntegrationTest.java @@ -1,8 +1,10 @@ package com.baeldung.springbootsecurity.oauth2server; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.web.server.LocalServerPort; import org.springframework.security.oauth2.client.OAuth2RestTemplate; import org.springframework.security.oauth2.client.resource.OAuth2AccessDeniedException; import org.springframework.security.oauth2.client.token.grant.client.ClientCredentialsResourceDetails; @@ -10,8 +12,13 @@ import org.springframework.security.oauth2.common.OAuth2AccessToken; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; +import java.net.URL; +import java.util.regex.Pattern; + import static java.util.Collections.singletonList; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT; @RunWith(SpringRunner.class) @@ -19,6 +26,14 @@ import static org.springframework.boot.test.context.SpringBootTest.WebEnvironmen @ActiveProfiles("authz") public class CustomConfigAuthorizationServerIntegrationTest extends OAuth2IntegrationTestSupport { + @LocalServerPort + private int port; + + @Before + public void setUp() throws Exception { + base = new URL("http://localhost:" + port); + } + @Test public void givenOAuth2Context_whenAccessTokenIsRequested_ThenAccessTokenValueIsNotNull() { ClientCredentialsResourceDetails resourceDetails = getClientCredentialsResourceDetails("baeldung", singletonList("read")); @@ -27,7 +42,29 @@ public class CustomConfigAuthorizationServerIntegrationTest extends OAuth2Integr OAuth2AccessToken accessToken = restTemplate.getAccessToken(); assertNotNull(accessToken); + } + @Test + public void givenOAuth2Context_whenAccessingAuthentication_ThenRespondTokenDetails() { + ClientCredentialsResourceDetails resourceDetails = getClientCredentialsResourceDetails("baeldung", singletonList("read")); + OAuth2RestTemplate restTemplate = getOAuth2RestTemplate(resourceDetails); + + String authentication = executeGetRequest(restTemplate, "/authentication"); + + Pattern pattern = Pattern.compile("\\{\"remoteAddress\":\".*" + + "\",\"sessionId\":null,\"tokenValue\":\".*" + + "\",\"tokenType\":\"Bearer\",\"decodedDetails\":null}"); + assertTrue("authentication", pattern.matcher(authentication).matches()); + } + + @Test + public void givenOAuth2Context_whenAccessingPrincipal_ThenRespondBaeldung() { + ClientCredentialsResourceDetails resourceDetails = getClientCredentialsResourceDetails("baeldung", singletonList("read")); + OAuth2RestTemplate restTemplate = getOAuth2RestTemplate(resourceDetails); + + String principal = executeGetRequest(restTemplate, "/principal"); + + assertEquals("baeldung", principal); } @Test(expected = OAuth2AccessDeniedException.class) diff --git a/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/DefaultConfigAuthorizationServerIntegrationTest.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/DefaultConfigAuthorizationServerIntegrationTest.java similarity index 100% rename from spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/DefaultConfigAuthorizationServerIntegrationTest.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/DefaultConfigAuthorizationServerIntegrationTest.java diff --git a/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/OAuth2IntegrationTestSupport.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/OAuth2IntegrationTestSupport.java similarity index 66% rename from spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/OAuth2IntegrationTestSupport.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/OAuth2IntegrationTestSupport.java index 3eef206c7d..a005965998 100644 --- a/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/OAuth2IntegrationTestSupport.java +++ b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springbootsecurity/oauth2server/OAuth2IntegrationTestSupport.java @@ -1,19 +1,33 @@ package com.baeldung.springbootsecurity.oauth2server; +import org.apache.commons.io.IOUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.security.oauth2.client.DefaultOAuth2ClientContext; import org.springframework.security.oauth2.client.OAuth2RestTemplate; import org.springframework.security.oauth2.client.token.grant.client.ClientCredentialsResourceDetails; +import org.springframework.web.client.RequestCallback; +import org.springframework.web.client.ResponseExtractor; +import java.net.URL; +import java.nio.charset.Charset; import java.util.List; import static java.lang.String.format; import static java.util.Collections.singletonList; +import static org.springframework.http.HttpMethod.GET; public class OAuth2IntegrationTestSupport { - @Value("${local.server.port}") protected int port; + public static final ResponseExtractor EXTRACT_BODY_AS_STRING = clientHttpResponse -> + IOUtils.toString(clientHttpResponse.getBody(), Charset.defaultCharset()); + private static final RequestCallback DO_NOTHING_CALLBACK = request -> { + }; + + @Value("${local.server.port}") + protected int port; + + protected URL base; protected ClientCredentialsResourceDetails getClientCredentialsResourceDetails(final String clientId, final List scopes) { ClientCredentialsResourceDetails resourceDetails = new ClientCredentialsResourceDetails(); @@ -31,4 +45,9 @@ public class OAuth2IntegrationTestSupport { restTemplate.setMessageConverters(singletonList(new MappingJackson2HttpMessageConverter())); return restTemplate; } + + protected String executeGetRequest(OAuth2RestTemplate restTemplate, String path) { + return restTemplate.execute(base.toString() + path, GET, DO_NOTHING_CALLBACK, EXTRACT_BODY_AS_STRING); + } + } diff --git a/spring-boot-security/src/test/java/com/baeldung/springsecuritytaglibs/HomeControllerUnitTest.java b/spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springsecuritytaglibs/HomeControllerUnitTest.java similarity index 100% rename from spring-boot-security/src/test/java/com/baeldung/springsecuritytaglibs/HomeControllerUnitTest.java rename to spring-boot-modules/spring-boot-security/src/test/java/com/baeldung/springsecuritytaglibs/HomeControllerUnitTest.java diff --git a/spring-boot-springdoc/README.md b/spring-boot-modules/spring-boot-springdoc/README.md similarity index 100% rename from spring-boot-springdoc/README.md rename to spring-boot-modules/spring-boot-springdoc/README.md diff --git a/spring-boot-springdoc/pom.xml b/spring-boot-modules/spring-boot-springdoc/pom.xml similarity index 84% rename from spring-boot-springdoc/pom.xml rename to spring-boot-modules/spring-boot-springdoc/pom.xml index 8c35e38ae6..9212e56c5a 100644 --- a/spring-boot-springdoc/pom.xml +++ b/spring-boot-modules/spring-boot-springdoc/pom.xml @@ -13,10 +13,11 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 + 1.8 @@ -36,12 +37,23 @@ org.springdoc springdoc-openapi-core - 1.1.45 + 1.1.49 + + + io.github.classgraph + classgraph + + org.springdoc springdoc-openapi-ui - 1.1.45 + 1.1.49 + + + io.github.classgraph + classgraph + 4.8.44 @@ -62,7 +74,7 @@ org.springframework.boot spring-boot-maven-plugin - 2.1.8.RELEASE + 2.2.2.RELEASE pre-integration-test diff --git a/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/SpringdocApplication.java b/spring-boot-modules/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/SpringdocApplication.java similarity index 100% rename from spring-boot-springdoc/src/main/java/com/baeldung/springdoc/SpringdocApplication.java rename to spring-boot-modules/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/SpringdocApplication.java diff --git a/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/controller/BookController.java b/spring-boot-modules/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/controller/BookController.java similarity index 100% rename from spring-boot-springdoc/src/main/java/com/baeldung/springdoc/controller/BookController.java rename to spring-boot-modules/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/controller/BookController.java diff --git a/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/exception/BookNotFoundException.java b/spring-boot-modules/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/exception/BookNotFoundException.java similarity index 100% rename from spring-boot-springdoc/src/main/java/com/baeldung/springdoc/exception/BookNotFoundException.java rename to spring-boot-modules/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/exception/BookNotFoundException.java diff --git a/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/exception/GlobalControllerExceptionHandler.java b/spring-boot-modules/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/exception/GlobalControllerExceptionHandler.java similarity index 100% rename from spring-boot-springdoc/src/main/java/com/baeldung/springdoc/exception/GlobalControllerExceptionHandler.java rename to spring-boot-modules/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/exception/GlobalControllerExceptionHandler.java diff --git a/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/model/Book.java b/spring-boot-modules/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/model/Book.java similarity index 100% rename from spring-boot-springdoc/src/main/java/com/baeldung/springdoc/model/Book.java rename to spring-boot-modules/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/model/Book.java diff --git a/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/repository/BookRepository.java b/spring-boot-modules/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/repository/BookRepository.java similarity index 100% rename from spring-boot-springdoc/src/main/java/com/baeldung/springdoc/repository/BookRepository.java rename to spring-boot-modules/spring-boot-springdoc/src/main/java/com/baeldung/springdoc/repository/BookRepository.java diff --git a/spring-boot-springdoc/src/main/resources/application.properties b/spring-boot-modules/spring-boot-springdoc/src/main/resources/application.properties similarity index 100% rename from spring-boot-springdoc/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-springdoc/src/main/resources/application.properties diff --git a/spring-boot-springdoc/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-springdoc/src/main/resources/logback.xml similarity index 100% rename from spring-boot-springdoc/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-springdoc/src/main/resources/logback.xml diff --git a/spring-boot-springdoc/src/test/java/com/baeldung/springdoc/SpringContextTest.java b/spring-boot-modules/spring-boot-springdoc/src/test/java/com/baeldung/springdoc/SpringContextTest.java similarity index 100% rename from spring-boot-springdoc/src/test/java/com/baeldung/springdoc/SpringContextTest.java rename to spring-boot-modules/spring-boot-springdoc/src/test/java/com/baeldung/springdoc/SpringContextTest.java diff --git a/spring-boot-testing/.gitignore b/spring-boot-modules/spring-boot-testing/.gitignore similarity index 100% rename from spring-boot-testing/.gitignore rename to spring-boot-modules/spring-boot-testing/.gitignore diff --git a/spring-boot-testing/.mvn/wrapper/maven-wrapper.properties b/spring-boot-modules/spring-boot-testing/.mvn/wrapper/maven-wrapper.properties similarity index 100% rename from spring-boot-testing/.mvn/wrapper/maven-wrapper.properties rename to spring-boot-modules/spring-boot-testing/.mvn/wrapper/maven-wrapper.properties diff --git a/spring-boot-testing/README.md b/spring-boot-modules/spring-boot-testing/README.md similarity index 100% rename from spring-boot-testing/README.md rename to spring-boot-modules/spring-boot-testing/README.md diff --git a/spring-boot-testing/mvnw b/spring-boot-modules/spring-boot-testing/mvnw similarity index 100% rename from spring-boot-testing/mvnw rename to spring-boot-modules/spring-boot-testing/mvnw diff --git a/spring-boot-testing/mvnw.cmd b/spring-boot-modules/spring-boot-testing/mvnw.cmd similarity index 100% rename from spring-boot-testing/mvnw.cmd rename to spring-boot-modules/spring-boot-testing/mvnw.cmd diff --git a/spring-boot-testing/pom.xml b/spring-boot-modules/spring-boot-testing/pom.xml similarity index 97% rename from spring-boot-testing/pom.xml rename to spring-boot-modules/spring-boot-testing/pom.xml index 5f358072d3..8b16b13733 100644 --- a/spring-boot-testing/pom.xml +++ b/spring-boot-modules/spring-boot-testing/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 @@ -132,6 +132,7 @@ 1.2-groovy-2.4 1.6 0.7.2 + 2.1.9.RELEASE diff --git a/spring-boot-testing/src/main/java/com/baeldung/boot/Application.java b/spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/boot/Application.java similarity index 100% rename from spring-boot-testing/src/main/java/com/baeldung/boot/Application.java rename to spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/boot/Application.java diff --git a/spring-boot-testing/src/main/java/com/baeldung/boot/controller/rest/HomeController.java b/spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/boot/controller/rest/HomeController.java similarity index 100% rename from spring-boot-testing/src/main/java/com/baeldung/boot/controller/rest/HomeController.java rename to spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/boot/controller/rest/HomeController.java diff --git a/spring-boot-testing/src/main/java/com/baeldung/boot/controller/rest/WebController.java b/spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/boot/controller/rest/WebController.java similarity index 100% rename from spring-boot-testing/src/main/java/com/baeldung/boot/controller/rest/WebController.java rename to spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/boot/controller/rest/WebController.java diff --git a/spring-boot-testing/src/main/java/com/baeldung/boot/embeddedRedis/configuration/RedisConfiguration.java b/spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/boot/embeddedRedis/configuration/RedisConfiguration.java similarity index 100% rename from spring-boot-testing/src/main/java/com/baeldung/boot/embeddedRedis/configuration/RedisConfiguration.java rename to spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/boot/embeddedRedis/configuration/RedisConfiguration.java diff --git a/spring-boot-testing/src/main/java/com/baeldung/boot/embeddedRedis/configuration/RedisProperties.java b/spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/boot/embeddedRedis/configuration/RedisProperties.java similarity index 100% rename from spring-boot-testing/src/main/java/com/baeldung/boot/embeddedRedis/configuration/RedisProperties.java rename to spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/boot/embeddedRedis/configuration/RedisProperties.java diff --git a/spring-boot-testing/src/main/java/com/baeldung/boot/embeddedRedis/domain/User.java b/spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/boot/embeddedRedis/domain/User.java similarity index 100% rename from spring-boot-testing/src/main/java/com/baeldung/boot/embeddedRedis/domain/User.java rename to spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/boot/embeddedRedis/domain/User.java diff --git a/spring-boot-testing/src/main/java/com/baeldung/boot/embeddedRedis/domain/repository/UserRepository.java b/spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/boot/embeddedRedis/domain/repository/UserRepository.java similarity index 100% rename from spring-boot-testing/src/main/java/com/baeldung/boot/embeddedRedis/domain/repository/UserRepository.java rename to spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/boot/embeddedRedis/domain/repository/UserRepository.java diff --git a/spring-boot-testing/src/main/java/com/baeldung/component/OtherComponent.java b/spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/component/OtherComponent.java similarity index 100% rename from spring-boot-testing/src/main/java/com/baeldung/component/OtherComponent.java rename to spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/component/OtherComponent.java diff --git a/spring-boot-testing/src/main/java/com/baeldung/testloglevel/TestLogLevelApplication.java b/spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/testloglevel/TestLogLevelApplication.java similarity index 100% rename from spring-boot-testing/src/main/java/com/baeldung/testloglevel/TestLogLevelApplication.java rename to spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/testloglevel/TestLogLevelApplication.java diff --git a/spring-boot-testing/src/main/java/com/baeldung/testloglevel/TestLogLevelController.java b/spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/testloglevel/TestLogLevelController.java similarity index 100% rename from spring-boot-testing/src/main/java/com/baeldung/testloglevel/TestLogLevelController.java rename to spring-boot-modules/spring-boot-testing/src/main/java/com/baeldung/testloglevel/TestLogLevelController.java diff --git a/spring-boot-testing/src/main/resources/application-test.properties b/spring-boot-modules/spring-boot-testing/src/main/resources/application-test.properties similarity index 100% rename from spring-boot-testing/src/main/resources/application-test.properties rename to spring-boot-modules/spring-boot-testing/src/main/resources/application-test.properties diff --git a/spring-boot-testing/src/main/resources/application.properties b/spring-boot-modules/spring-boot-testing/src/main/resources/application.properties similarity index 100% rename from spring-boot-testing/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-testing/src/main/resources/application.properties diff --git a/spring-boot-testing/src/test/groovy/com/baeldung/boot/LoadContextTest.groovy b/spring-boot-modules/spring-boot-testing/src/test/groovy/com/baeldung/boot/LoadContextTest.groovy similarity index 100% rename from spring-boot-testing/src/test/groovy/com/baeldung/boot/LoadContextTest.groovy rename to spring-boot-modules/spring-boot-testing/src/test/groovy/com/baeldung/boot/LoadContextTest.groovy diff --git a/spring-boot-testing/src/test/groovy/com/baeldung/boot/WebControllerTest.groovy b/spring-boot-modules/spring-boot-testing/src/test/groovy/com/baeldung/boot/WebControllerTest.groovy similarity index 100% rename from spring-boot-testing/src/test/groovy/com/baeldung/boot/WebControllerTest.groovy rename to spring-boot-modules/spring-boot-testing/src/test/groovy/com/baeldung/boot/WebControllerTest.groovy diff --git a/spring-boot-testing/src/test/groovy/com/baeldung/boot/WebControllerTest.groovy alias b/spring-boot-modules/spring-boot-testing/src/test/groovy/com/baeldung/boot/WebControllerTest.groovy alias similarity index 100% rename from spring-boot-testing/src/test/groovy/com/baeldung/boot/WebControllerTest.groovy alias rename to spring-boot-modules/spring-boot-testing/src/test/groovy/com/baeldung/boot/WebControllerTest.groovy alias diff --git a/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig1IntegrationTest.java b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig1IntegrationTest.java similarity index 76% rename from spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig1IntegrationTest.java rename to spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig1IntegrationTest.java index a4a29cddf3..2ca0c74901 100644 --- a/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig1IntegrationTest.java +++ b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig1IntegrationTest.java @@ -1,26 +1,32 @@ package com.baeldung.autoconfig.exclude; -import static org.junit.Assert.assertEquals; +import com.baeldung.boot.Application; import io.restassured.RestAssured; - import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; +import org.springframework.boot.web.server.LocalServerPort; import org.springframework.http.HttpStatus; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit4.SpringRunner; -import com.baeldung.boot.Application; +import static org.junit.Assert.assertEquals; @RunWith(SpringRunner.class) -@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.DEFINED_PORT) +@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.RANDOM_PORT) @TestPropertySource(properties = "spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration") public class ExcludeAutoConfig1IntegrationTest { + /** + * Encapsulates the random port the test server is listening on. + */ + @LocalServerPort + private int port; + @Test public void givenSecurityConfigExcluded_whenAccessHome_thenNoAuthenticationRequired() { - int statusCode = RestAssured.get("http://localhost:8080/").statusCode(); + int statusCode = RestAssured.get("http://localhost:" + port).statusCode(); assertEquals(HttpStatus.OK.value(), statusCode); } } diff --git a/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig2IntegrationTest.java b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig2IntegrationTest.java similarity index 74% rename from spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig2IntegrationTest.java rename to spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig2IntegrationTest.java index cdf79b159c..c0bd6570a1 100644 --- a/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig2IntegrationTest.java +++ b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig2IntegrationTest.java @@ -1,26 +1,32 @@ package com.baeldung.autoconfig.exclude; -import static org.junit.Assert.assertEquals; +import com.baeldung.boot.Application; import io.restassured.RestAssured; - import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; +import org.springframework.boot.web.server.LocalServerPort; import org.springframework.http.HttpStatus; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; -import com.baeldung.boot.Application; +import static org.junit.Assert.assertEquals; @RunWith(SpringRunner.class) -@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.DEFINED_PORT) +@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.RANDOM_PORT) @ActiveProfiles("test") public class ExcludeAutoConfig2IntegrationTest { + /** + * Encapsulates the random port the test server is listening on. + */ + @LocalServerPort + private int port; + @Test public void givenSecurityConfigExcluded_whenAccessHome_thenNoAuthenticationRequired() { - int statusCode = RestAssured.get("http://localhost:8080/").statusCode(); + int statusCode = RestAssured.get("http://localhost:" + port).statusCode(); assertEquals(HttpStatus.OK.value(), statusCode); } } diff --git a/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig3IntegrationTest.java b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig3IntegrationTest.java similarity index 77% rename from spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig3IntegrationTest.java rename to spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig3IntegrationTest.java index 0e45d1e9e5..1642d4b932 100644 --- a/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig3IntegrationTest.java +++ b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig3IntegrationTest.java @@ -1,27 +1,33 @@ package com.baeldung.autoconfig.exclude; -import static org.junit.Assert.assertEquals; +import com.baeldung.boot.Application; import io.restassured.RestAssured; - import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; +import org.springframework.boot.web.server.LocalServerPort; import org.springframework.http.HttpStatus; import org.springframework.test.context.junit4.SpringRunner; -import com.baeldung.boot.Application; +import static org.junit.Assert.assertEquals; @RunWith(SpringRunner.class) -@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.DEFINED_PORT) +@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.RANDOM_PORT) @EnableAutoConfiguration(exclude=SecurityAutoConfiguration.class) public class ExcludeAutoConfig3IntegrationTest { + /** + * Encapsulates the random port the test server is listening on. + */ + @LocalServerPort + private int port; + @Test public void givenSecurityConfigExcluded_whenAccessHome_thenNoAuthenticationRequired() { - int statusCode = RestAssured.get("http://localhost:8080/").statusCode(); + int statusCode = RestAssured.get("http://localhost:" + port).statusCode(); assertEquals(HttpStatus.OK.value(), statusCode); } } diff --git a/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig4IntegrationTest.java b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig4IntegrationTest.java similarity index 70% rename from spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig4IntegrationTest.java rename to spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig4IntegrationTest.java index 8429aed6cd..1aa453348b 100644 --- a/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig4IntegrationTest.java +++ b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/ExcludeAutoConfig4IntegrationTest.java @@ -1,22 +1,29 @@ package com.baeldung.autoconfig.exclude; -import static org.junit.Assert.assertEquals; import io.restassured.RestAssured; - import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; +import org.springframework.boot.web.server.LocalServerPort; import org.springframework.http.HttpStatus; import org.springframework.test.context.junit4.SpringRunner; +import static org.junit.Assert.assertEquals; + @RunWith(SpringRunner.class) -@SpringBootTest(classes = TestApplication.class, webEnvironment = WebEnvironment.DEFINED_PORT) +@SpringBootTest(classes = TestApplication.class, webEnvironment = WebEnvironment.RANDOM_PORT) public class ExcludeAutoConfig4IntegrationTest { + /** + * Encapsulates the random port the test server is listening on. + */ + @LocalServerPort + private int port; + @Test public void givenSecurityConfigExcluded_whenAccessHome_thenNoAuthenticationRequired() { - int statusCode = RestAssured.get("http://localhost:8080/").statusCode(); + int statusCode = RestAssured.get("http://localhost:" + port).statusCode(); assertEquals(HttpStatus.OK.value(), statusCode); } } diff --git a/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/TestApplication.java b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/TestApplication.java similarity index 100% rename from spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/TestApplication.java rename to spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/autoconfig/exclude/TestApplication.java diff --git a/spring-boot-testing/src/test/java/com/baeldung/boot/SpringContextTest.java b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/boot/SpringContextTest.java similarity index 100% rename from spring-boot-testing/src/test/java/com/baeldung/boot/SpringContextTest.java rename to spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/boot/SpringContextTest.java diff --git a/spring-boot-testing/src/test/java/com/baeldung/boot/autoconfig/AutoConfigIntegrationTest.java b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/boot/autoconfig/AutoConfigIntegrationTest.java similarity index 73% rename from spring-boot-testing/src/test/java/com/baeldung/boot/autoconfig/AutoConfigIntegrationTest.java rename to spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/boot/autoconfig/AutoConfigIntegrationTest.java index fe71f44ddf..44a02c0c80 100644 --- a/spring-boot-testing/src/test/java/com/baeldung/boot/autoconfig/AutoConfigIntegrationTest.java +++ b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/boot/autoconfig/AutoConfigIntegrationTest.java @@ -1,30 +1,36 @@ package com.baeldung.boot.autoconfig; -import static org.junit.Assert.assertEquals; +import com.baeldung.boot.Application; import io.restassured.RestAssured; - import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; +import org.springframework.boot.web.server.LocalServerPort; import org.springframework.http.HttpStatus; import org.springframework.test.context.junit4.SpringRunner; -import com.baeldung.boot.Application; +import static org.junit.Assert.assertEquals; @RunWith(SpringRunner.class) -@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.DEFINED_PORT) +@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.RANDOM_PORT) public class AutoConfigIntegrationTest { + /** + * Encapsulates the random port the test server is listening on. + */ + @LocalServerPort + private int port; + @Test public void givenNoAuthentication_whenAccessHome_thenUnauthorized() { - int statusCode = RestAssured.get("http://localhost:8080/").statusCode(); + int statusCode = RestAssured.get("http://localhost:" + port).statusCode(); assertEquals(HttpStatus.UNAUTHORIZED.value(), statusCode); } @Test public void givenAuthentication_whenAccessHome_thenOK() { - int statusCode = RestAssured.given().auth().basic("john", "123").get("http://localhost:8080/").statusCode(); + int statusCode = RestAssured.given().auth().basic("john", "123").get("http://localhost:" + port).statusCode(); assertEquals(HttpStatus.OK.value(), statusCode); } } diff --git a/spring-boot-testing/src/test/java/com/baeldung/boot/embeddedRedis/TestRedisConfiguration.java b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/boot/embeddedRedis/TestRedisConfiguration.java similarity index 100% rename from spring-boot-testing/src/test/java/com/baeldung/boot/embeddedRedis/TestRedisConfiguration.java rename to spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/boot/embeddedRedis/TestRedisConfiguration.java diff --git a/spring-boot-testing/src/test/java/com/baeldung/boot/embeddedRedis/domain/repository/UserRepositoryIntegrationTest.java b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/boot/embeddedRedis/domain/repository/UserRepositoryIntegrationTest.java similarity index 100% rename from spring-boot-testing/src/test/java/com/baeldung/boot/embeddedRedis/domain/repository/UserRepositoryIntegrationTest.java rename to spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/boot/embeddedRedis/domain/repository/UserRepositoryIntegrationTest.java diff --git a/spring-boot-testing/src/test/java/com/baeldung/testloglevel/LogbackMultiProfileTestLogLevelIntegrationTest.java b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/testloglevel/LogbackMultiProfileTestLogLevelIntegrationTest.java similarity index 94% rename from spring-boot-testing/src/test/java/com/baeldung/testloglevel/LogbackMultiProfileTestLogLevelIntegrationTest.java rename to spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/testloglevel/LogbackMultiProfileTestLogLevelIntegrationTest.java index 7a1eb4adbe..f8bd61e5c7 100644 --- a/spring-boot-testing/src/test/java/com/baeldung/testloglevel/LogbackMultiProfileTestLogLevelIntegrationTest.java +++ b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/testloglevel/LogbackMultiProfileTestLogLevelIntegrationTest.java @@ -1,7 +1,5 @@ package com.baeldung.testloglevel; -import static org.assertj.core.api.Assertions.assertThat; - import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -13,9 +11,14 @@ import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.rule.OutputCapture; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.ResponseEntity; +import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; +import static org.assertj.core.api.Assertions.assertThat; +import static org.springframework.test.annotation.DirtiesContext.ClassMode.AFTER_CLASS; + +@DirtiesContext(classMode = AFTER_CLASS) @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, classes = TestLogLevelApplication.class) @EnableAutoConfiguration(exclude = SecurityAutoConfiguration.class) diff --git a/spring-boot-testing/src/test/java/com/baeldung/testloglevel/LogbackTestLogLevelIntegrationTest.java b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/testloglevel/LogbackTestLogLevelIntegrationTest.java similarity index 94% rename from spring-boot-testing/src/test/java/com/baeldung/testloglevel/LogbackTestLogLevelIntegrationTest.java rename to spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/testloglevel/LogbackTestLogLevelIntegrationTest.java index af3bafdc2e..ffe9d400ed 100644 --- a/spring-boot-testing/src/test/java/com/baeldung/testloglevel/LogbackTestLogLevelIntegrationTest.java +++ b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/testloglevel/LogbackTestLogLevelIntegrationTest.java @@ -1,7 +1,5 @@ package com.baeldung.testloglevel; -import static org.assertj.core.api.Assertions.assertThat; - import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -13,9 +11,14 @@ import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.rule.OutputCapture; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.ResponseEntity; +import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; +import static org.assertj.core.api.Assertions.assertThat; +import static org.springframework.test.annotation.DirtiesContext.ClassMode.AFTER_CLASS; + +@DirtiesContext(classMode = AFTER_CLASS) @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, classes = TestLogLevelApplication.class) @EnableAutoConfiguration(exclude = SecurityAutoConfiguration.class) diff --git a/spring-boot-testing/src/test/java/com/baeldung/testloglevel/TestLogLevelWithProfileIntegrationTest.java b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/testloglevel/TestLogLevelWithProfileIntegrationTest.java similarity index 94% rename from spring-boot-testing/src/test/java/com/baeldung/testloglevel/TestLogLevelWithProfileIntegrationTest.java rename to spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/testloglevel/TestLogLevelWithProfileIntegrationTest.java index 5609ce6c01..6e80f50c00 100644 --- a/spring-boot-testing/src/test/java/com/baeldung/testloglevel/TestLogLevelWithProfileIntegrationTest.java +++ b/spring-boot-modules/spring-boot-testing/src/test/java/com/baeldung/testloglevel/TestLogLevelWithProfileIntegrationTest.java @@ -11,12 +11,15 @@ import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.rule.OutputCapture; import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.http.ResponseEntity; +import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; import static org.assertj.core.api.Assertions.assertThat; +import static org.springframework.test.annotation.DirtiesContext.ClassMode.AFTER_CLASS; @RunWith(SpringRunner.class) +@DirtiesContext(classMode = AFTER_CLASS) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, classes = TestLogLevelApplication.class) @EnableAutoConfiguration(exclude = SecurityAutoConfiguration.class) @ActiveProfiles("logging-test") diff --git a/spring-boot-testing/src/test/resources/application-logback-test.properties b/spring-boot-modules/spring-boot-testing/src/test/resources/application-logback-test.properties similarity index 100% rename from spring-boot-testing/src/test/resources/application-logback-test.properties rename to spring-boot-modules/spring-boot-testing/src/test/resources/application-logback-test.properties diff --git a/spring-boot-testing/src/test/resources/application-logback-test2.properties b/spring-boot-modules/spring-boot-testing/src/test/resources/application-logback-test2.properties similarity index 100% rename from spring-boot-testing/src/test/resources/application-logback-test2.properties rename to spring-boot-modules/spring-boot-testing/src/test/resources/application-logback-test2.properties diff --git a/spring-boot-testing/src/test/resources/application-logging-test.properties b/spring-boot-modules/spring-boot-testing/src/test/resources/application-logging-test.properties similarity index 100% rename from spring-boot-testing/src/test/resources/application-logging-test.properties rename to spring-boot-modules/spring-boot-testing/src/test/resources/application-logging-test.properties diff --git a/spring-boot-testing/src/test/resources/application-test.properties b/spring-boot-modules/spring-boot-testing/src/test/resources/application-test.properties similarity index 100% rename from spring-boot-testing/src/test/resources/application-test.properties rename to spring-boot-modules/spring-boot-testing/src/test/resources/application-test.properties diff --git a/spring-boot-testing/src/test/resources/application.properties b/spring-boot-modules/spring-boot-testing/src/test/resources/application.properties similarity index 100% rename from spring-boot-testing/src/test/resources/application.properties rename to spring-boot-modules/spring-boot-testing/src/test/resources/application.properties diff --git a/spring-boot-testing/src/test/resources/logback-multiprofile.xml b/spring-boot-modules/spring-boot-testing/src/test/resources/logback-multiprofile.xml similarity index 100% rename from spring-boot-testing/src/test/resources/logback-multiprofile.xml rename to spring-boot-modules/spring-boot-testing/src/test/resources/logback-multiprofile.xml diff --git a/spring-boot-testing/src/test/resources/logback-test.xml b/spring-boot-modules/spring-boot-testing/src/test/resources/logback-test.xml similarity index 100% rename from spring-boot-testing/src/test/resources/logback-test.xml rename to spring-boot-modules/spring-boot-testing/src/test/resources/logback-test.xml diff --git a/spring-boot-vue/.gitignore b/spring-boot-modules/spring-boot-vue/.gitignore similarity index 100% rename from spring-boot-vue/.gitignore rename to spring-boot-modules/spring-boot-vue/.gitignore diff --git a/spring-boot-vue/README.md b/spring-boot-modules/spring-boot-vue/README.md similarity index 100% rename from spring-boot-vue/README.md rename to spring-boot-modules/spring-boot-vue/README.md diff --git a/spring-boot-vue/pom.xml b/spring-boot-modules/spring-boot-vue/pom.xml similarity index 96% rename from spring-boot-vue/pom.xml rename to spring-boot-modules/spring-boot-vue/pom.xml index 98bba784d2..0a6307e46b 100644 --- a/spring-boot-vue/pom.xml +++ b/spring-boot-modules/spring-boot-vue/pom.xml @@ -12,7 +12,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-2 + ../../parent-boot-2 diff --git a/spring-boot-vue/src/main/java/com/baeldung/springbootmvc/SpringBootMvcApplication.java b/spring-boot-modules/spring-boot-vue/src/main/java/com/baeldung/springbootmvc/SpringBootMvcApplication.java similarity index 100% rename from spring-boot-vue/src/main/java/com/baeldung/springbootmvc/SpringBootMvcApplication.java rename to spring-boot-modules/spring-boot-vue/src/main/java/com/baeldung/springbootmvc/SpringBootMvcApplication.java diff --git a/spring-boot-vue/src/main/java/com/baeldung/springbootmvc/controllers/MainController.java b/spring-boot-modules/spring-boot-vue/src/main/java/com/baeldung/springbootmvc/controllers/MainController.java similarity index 100% rename from spring-boot-vue/src/main/java/com/baeldung/springbootmvc/controllers/MainController.java rename to spring-boot-modules/spring-boot-vue/src/main/java/com/baeldung/springbootmvc/controllers/MainController.java diff --git a/spring-boot-vue/src/main/resources/application.properties b/spring-boot-modules/spring-boot-vue/src/main/resources/application.properties similarity index 100% rename from spring-boot-vue/src/main/resources/application.properties rename to spring-boot-modules/spring-boot-vue/src/main/resources/application.properties diff --git a/spring-boot-runtime/src/main/resources/logback.xml b/spring-boot-modules/spring-boot-vue/src/main/resources/logback.xml similarity index 100% rename from spring-boot-runtime/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot-vue/src/main/resources/logback.xml diff --git a/spring-boot-vue/src/main/resources/static/favicon.ico b/spring-boot-modules/spring-boot-vue/src/main/resources/static/favicon.ico similarity index 100% rename from spring-boot-vue/src/main/resources/static/favicon.ico rename to spring-boot-modules/spring-boot-vue/src/main/resources/static/favicon.ico diff --git a/spring-boot-vue/src/main/resources/templates/index.html b/spring-boot-modules/spring-boot-vue/src/main/resources/templates/index.html similarity index 100% rename from spring-boot-vue/src/main/resources/templates/index.html rename to spring-boot-modules/spring-boot-vue/src/main/resources/templates/index.html diff --git a/spring-boot-vue/src/test/java/com/baeldung/springbootmvc/SpringBootMvcApplicationIntegrationTest.java b/spring-boot-modules/spring-boot-vue/src/test/java/com/baeldung/springbootmvc/SpringBootMvcApplicationIntegrationTest.java similarity index 100% rename from spring-boot-vue/src/test/java/com/baeldung/springbootmvc/SpringBootMvcApplicationIntegrationTest.java rename to spring-boot-modules/spring-boot-vue/src/test/java/com/baeldung/springbootmvc/SpringBootMvcApplicationIntegrationTest.java diff --git a/spring-boot-vue/src/test/java/org/baeldung/SpringContextTest.java b/spring-boot-modules/spring-boot-vue/src/test/java/org/baeldung/SpringContextTest.java similarity index 100% rename from spring-boot-vue/src/test/java/org/baeldung/SpringContextTest.java rename to spring-boot-modules/spring-boot-vue/src/test/java/org/baeldung/SpringContextTest.java diff --git a/spring-boot/.gitignore b/spring-boot-modules/spring-boot/.gitignore similarity index 89% rename from spring-boot/.gitignore rename to spring-boot-modules/spring-boot/.gitignore index 88e3308e9d..da7c2c5c0a 100644 --- a/spring-boot/.gitignore +++ b/spring-boot-modules/spring-boot/.gitignore @@ -1,5 +1,5 @@ -/target/ -.settings/ -.classpath -.project - +/target/ +.settings/ +.classpath +.project + diff --git a/spring-boot/.mvn/wrapper/maven-wrapper.properties b/spring-boot-modules/spring-boot/.mvn/wrapper/maven-wrapper.properties similarity index 100% rename from spring-boot/.mvn/wrapper/maven-wrapper.properties rename to spring-boot-modules/spring-boot/.mvn/wrapper/maven-wrapper.properties diff --git a/spring-boot/README.MD b/spring-boot-modules/spring-boot/README.MD similarity index 83% rename from spring-boot/README.MD rename to spring-boot-modules/spring-boot/README.MD index 2423d6d331..217d9e90b2 100644 --- a/spring-boot/README.MD +++ b/spring-boot-modules/spring-boot/README.MD @@ -16,7 +16,6 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Create a Custom FailureAnalyzer with Spring Boot](https://www.baeldung.com/spring-boot-failure-analyzer) - [Dynamic DTO Validation Config Retrieved from the Database](https://www.baeldung.com/spring-dynamic-dto-validation) - [Custom Information in Spring Boot Info Endpoint](https://www.baeldung.com/spring-boot-info-actuator-custom) -- [Using @JsonComponent in Spring Boot](https://www.baeldung.com/spring-boot-jsoncomponent) - [Testing in Spring Boot](https://www.baeldung.com/spring-boot-testing) - [How to Get All Spring-Managed Beans?](https://www.baeldung.com/spring-show-all-beans) - [Spring Boot and Togglz Aspect](https://www.baeldung.com/spring-togglz) @@ -31,8 +30,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Guide to the Favicon in Spring Boot](https://www.baeldung.com/spring-boot-favicon) - [Spring Shutdown Callbacks](https://www.baeldung.com/spring-shutdown-callbacks) - [Container Configuration in Spring Boot 2](https://www.baeldung.com/embeddedservletcontainercustomizer-configurableembeddedservletcontainer-spring-boot) -- [Introduction to Chaos Monkey](https://www.baeldung.com/spring-boot-chaos-monkey) -- [Display Auto-Configuration Report in Spring Boot](https://www.baeldung.com/spring-boot-auto-configuration-report) -- [Injecting Git Information Into Spring](https://www.baeldung.com/spring-git-information) - [Validation in Spring Boot](https://www.baeldung.com/spring-boot-bean-validation) -- [Guide to Creating and Running a Jar File in Java](https://www.baeldung.com/java-create-jar) diff --git a/spring-boot/mvnw b/spring-boot-modules/spring-boot/mvnw similarity index 100% rename from spring-boot/mvnw rename to spring-boot-modules/spring-boot/mvnw diff --git a/spring-boot/mvnw.cmd b/spring-boot-modules/spring-boot/mvnw.cmd similarity index 97% rename from spring-boot/mvnw.cmd rename to spring-boot-modules/spring-boot/mvnw.cmd index 4f0b068a03..6a6eec39ba 100755 --- a/spring-boot/mvnw.cmd +++ b/spring-boot-modules/spring-boot/mvnw.cmd @@ -1,145 +1,145 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Maven2 Start Up Batch script -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM M2_HOME - location of maven2's installed home dir -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" -if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" - -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" -if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%" == "on" pause - -if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% - -exit /B %ERROR_CODE% +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" + +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/spring-boot/pom.xml b/spring-boot-modules/spring-boot/pom.xml similarity index 82% rename from spring-boot/pom.xml rename to spring-boot-modules/spring-boot/pom.xml index b8ebd27e13..e0ff9ae2f9 100644 --- a/spring-boot/pom.xml +++ b/spring-boot-modules/spring-boot/pom.xml @@ -1,268 +1,234 @@ - - - 4.0.0 - spring-boot - spring-boot - war - This is simple boot application for Spring boot actuator test - 0.0.1-SNAPSHOT - - - parent-boot-2 - com.baeldung - 0.0.1-SNAPSHOT - ../parent-boot-2 - - - - - - - org.junit.jupiter - junit-jupiter-api - test - - - org.junit.jupiter - junit-jupiter-engine - test - - - - - org.junit.platform - junit-platform-launcher - ${junit-platform.version} - test - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-data-jpa - - - org.ehcache - ehcache - - - org.hibernate - hibernate-ehcache - - - org.springframework.boot - spring-boot-starter-actuator - - - - com.graphql-java - graphql-spring-boot-starter - ${graphql-spring-boot-starter.version} - - - com.graphql-java - graphql-java-tools - ${graphql-java-tools.version} - - - com.graphql-java - graphiql-spring-boot-starter - ${graphiql-spring-boot-starter.version} - - - - org.springframework.boot - spring-boot-starter-tomcat - - - - org.springframework.boot - spring-boot-starter-test - test - - - - io.dropwizard.metrics - metrics-core - - - - com.h2database - h2 - - - - org.springframework.boot - spring-boot-starter - - - com.jayway.jsonpath - json-path - test - - - - com.google.guava - guava - ${guava.version} - - - - org.apache.tomcat - tomcat-servlet-api - ${tomee-servlet-api.version} - provided - - - - org.togglz - togglz-spring-boot-starter - ${togglz.version} - - - - org.togglz - togglz-spring-security - ${togglz.version} - - - - org.apache.activemq - artemis-server - - - - com.rometools - rome - ${rome.version} - - - - de.codecentric - chaos-monkey-spring-boot - ${chaos.monkey.version} - - - - javax.validation - validation-api - - - - - spring-boot - - - src/main/resources - true - - - - - - - org.apache.maven.plugins - maven-war-plugin - - - - pl.project13.maven - git-commit-id-plugin - ${git-commit-id-plugin.version} - - - get-the-git-infos - - revision - - initialize - - - validate-the-git-infos - - validateRevision - - package - - - - true - ${project.build.outputDirectory}/git.properties - - - - - org.apache.maven.plugins - maven-resources-plugin - - - @ - - false - - - - - - - - - autoconfiguration - - - - org.apache.maven.plugins - maven-surefire-plugin - - - integration-test - - test - - - - **/*LiveTest.java - **/*IntegrationTest.java - **/*IntTest.java - - - **/AutoconfigurationTest.java - - - - - - - json - - - - - - - - - - - com.baeldung.intro.App - 8.5.11 - 2.4.1.Final - 1.9.0 - 2.0.0 - 5.0.2 - 5.0.2 - 5.2.4 - 18.0 - 2.2.4 - @ - - - + + + 4.0.0 + spring-boot + spring-boot + war + This is simple boot application for Spring boot actuator test + 0.0.1-SNAPSHOT + + + parent-boot-2 + com.baeldung + 0.0.1-SNAPSHOT + ../../parent-boot-2 + + + + + + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + + + org.junit.platform + junit-platform-launcher + ${junit-platform.version} + test + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.ehcache + ehcache + + + org.hibernate + hibernate-ehcache + + + org.springframework.boot + spring-boot-starter-actuator + + + + com.graphql-java + graphql-spring-boot-starter + ${graphql-spring-boot-starter.version} + + + com.graphql-java + graphql-java-tools + ${graphql-java-tools.version} + + + com.graphql-java + graphiql-spring-boot-starter + ${graphiql-spring-boot-starter.version} + + + + org.springframework.boot + spring-boot-starter-tomcat + + + + org.springframework.boot + spring-boot-starter-test + test + + + + io.dropwizard.metrics + metrics-core + + + + com.h2database + h2 + + + + org.springframework.boot + spring-boot-starter + + + com.jayway.jsonpath + json-path + test + + + + com.google.guava + guava + ${guava.version} + + + + org.apache.tomcat + tomcat-servlet-api + ${tomee-servlet-api.version} + provided + + + + org.togglz + togglz-spring-boot-starter + ${togglz.version} + + + + org.togglz + togglz-spring-security + ${togglz.version} + + + + org.apache.activemq + artemis-server + + + + com.rometools + rome + ${rome.version} + + + + javax.validation + validation-api + + + + + spring-boot + + + src/main/resources + true + + + + + + + org.apache.maven.plugins + maven-war-plugin + + + + org.apache.maven.plugins + maven-resources-plugin + + + @ + + false + + + + + + + + + autoconfiguration + + + + org.apache.maven.plugins + maven-surefire-plugin + + + integration-test + + test + + + + **/*LiveTest.java + **/*IntegrationTest.java + **/*IntTest.java + + + **/AutoconfigurationTest.java + + + + + + + json + + + + + + + + + + + com.baeldung.intro.App + 8.5.11 + 2.4.1.Final + 1.9.0 + 5.0.2 + 5.0.2 + 5.2.4 + 18.0 + @ + + + diff --git a/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/SpringBootAnnotatedApp.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/SpringBootAnnotatedApp.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/SpringBootAnnotatedApp.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/SpringBootAnnotatedApp.java diff --git a/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/SpringBootPlainApp.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/SpringBootPlainApp.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/SpringBootPlainApp.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/SpringBootPlainApp.java diff --git a/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/components/AttrListener.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/components/AttrListener.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/components/AttrListener.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/components/AttrListener.java diff --git a/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/components/EchoServlet.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/components/EchoServlet.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/components/EchoServlet.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/components/EchoServlet.java diff --git a/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/components/HelloFilter.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/components/HelloFilter.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/components/HelloFilter.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/components/HelloFilter.java diff --git a/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/components/HelloServlet.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/components/HelloServlet.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/components/HelloServlet.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/annotation/servletcomponentscan/components/HelloServlet.java diff --git a/spring-boot/src/main/java/com/baeldung/beanvalidation/application/Application.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/beanvalidation/application/Application.java similarity index 97% rename from spring-boot/src/main/java/com/baeldung/beanvalidation/application/Application.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/beanvalidation/application/Application.java index b37eec9da0..e2b933a67e 100644 --- a/spring-boot/src/main/java/com/baeldung/beanvalidation/application/Application.java +++ b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/beanvalidation/application/Application.java @@ -1,28 +1,28 @@ -package com.baeldung.beanvalidation.application; - -import com.baeldung.beanvalidation.application.entities.User; -import com.baeldung.beanvalidation.application.repositories.UserRepository; - -import org.springframework.boot.CommandLineRunner; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.Bean; - -@SpringBootApplication -public class Application { - - public static void main(String[] args) { - SpringApplication.run(Application.class, args); - } - - @Bean - public CommandLineRunner run(UserRepository userRepository) throws Exception { - return (String[] args) -> { - User user1 = new User("Bob", "bob@domain.com"); - User user2 = new User("Jenny", "jenny@domain.com"); - userRepository.save(user1); - userRepository.save(user2); - userRepository.findAll().forEach(System.out::println); - }; - } -} +package com.baeldung.beanvalidation.application; + +import com.baeldung.beanvalidation.application.entities.User; +import com.baeldung.beanvalidation.application.repositories.UserRepository; + +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; + +@SpringBootApplication +public class Application { + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } + + @Bean + public CommandLineRunner run(UserRepository userRepository) throws Exception { + return (String[] args) -> { + User user1 = new User("Bob", "bob@domain.com"); + User user2 = new User("Jenny", "jenny@domain.com"); + userRepository.save(user1); + userRepository.save(user2); + userRepository.findAll().forEach(System.out::println); + }; + } +} diff --git a/spring-boot/src/main/java/com/baeldung/beanvalidation/application/controllers/UserController.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/beanvalidation/application/controllers/UserController.java similarity index 97% rename from spring-boot/src/main/java/com/baeldung/beanvalidation/application/controllers/UserController.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/beanvalidation/application/controllers/UserController.java index 0c47e27e25..abda9a9449 100644 --- a/spring-boot/src/main/java/com/baeldung/beanvalidation/application/controllers/UserController.java +++ b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/beanvalidation/application/controllers/UserController.java @@ -1,53 +1,53 @@ -package com.baeldung.beanvalidation.application.controllers; - -import com.baeldung.beanvalidation.application.entities.User; -import com.baeldung.beanvalidation.application.repositories.UserRepository; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.validation.Valid; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.FieldError; -import org.springframework.web.bind.MethodArgumentNotValidException; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class UserController { - - private final UserRepository userRepository; - - @Autowired - public UserController(UserRepository userRepository) { - this.userRepository = userRepository; - } - - @GetMapping("/users") - public List getUsers() { - return (List) userRepository.findAll(); - } - - @PostMapping("/users") - ResponseEntity addUser(@Valid @RequestBody User user) { - return ResponseEntity.ok("User is valid"); - } - - @ResponseStatus(HttpStatus.BAD_REQUEST) - @ExceptionHandler(MethodArgumentNotValidException.class) - public Map handleValidationExceptions(MethodArgumentNotValidException ex) { - Map errors = new HashMap<>(); - ex.getBindingResult().getAllErrors().forEach((error) -> { - String fieldName = ((FieldError) error).getField(); - String errorMessage = error.getDefaultMessage(); - errors.put(fieldName, errorMessage); - }); - return errors; - } -} +package com.baeldung.beanvalidation.application.controllers; + +import com.baeldung.beanvalidation.application.entities.User; +import com.baeldung.beanvalidation.application.repositories.UserRepository; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.validation.Valid; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.FieldError; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class UserController { + + private final UserRepository userRepository; + + @Autowired + public UserController(UserRepository userRepository) { + this.userRepository = userRepository; + } + + @GetMapping("/users") + public List getUsers() { + return (List) userRepository.findAll(); + } + + @PostMapping("/users") + ResponseEntity addUser(@Valid @RequestBody User user) { + return ResponseEntity.ok("User is valid"); + } + + @ResponseStatus(HttpStatus.BAD_REQUEST) + @ExceptionHandler(MethodArgumentNotValidException.class) + public Map handleValidationExceptions(MethodArgumentNotValidException ex) { + Map errors = new HashMap<>(); + ex.getBindingResult().getAllErrors().forEach((error) -> { + String fieldName = ((FieldError) error).getField(); + String errorMessage = error.getDefaultMessage(); + errors.put(fieldName, errorMessage); + }); + return errors; + } +} diff --git a/spring-boot/src/main/java/com/baeldung/beanvalidation/application/entities/User.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/beanvalidation/application/entities/User.java similarity index 95% rename from spring-boot/src/main/java/com/baeldung/beanvalidation/application/entities/User.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/beanvalidation/application/entities/User.java index 8233d08f4e..511ce47775 100644 --- a/spring-boot/src/main/java/com/baeldung/beanvalidation/application/entities/User.java +++ b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/beanvalidation/application/entities/User.java @@ -1,50 +1,50 @@ -package com.baeldung.beanvalidation.application.entities; - -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.validation.constraints.NotBlank; - -@Entity -public class User { - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - private long id; - - @NotBlank(message = "Name is mandatory") - private String name; - - @NotBlank(message = "Email is mandatory") - private String email; - - public User(){} - - public User(String name, String email) { - this.name = name; - this.email = email; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - @Override - public String toString() { - return "User{" + "id=" + id + ", name=" + name + ", email=" + email + '}'; - } -} +package com.baeldung.beanvalidation.application.entities; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.validation.constraints.NotBlank; + +@Entity +public class User { + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private long id; + + @NotBlank(message = "Name is mandatory") + private String name; + + @NotBlank(message = "Email is mandatory") + private String email; + + public User(){} + + public User(String name, String email) { + this.name = name; + this.email = email; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + @Override + public String toString() { + return "User{" + "id=" + id + ", name=" + name + ", email=" + email + '}'; + } +} diff --git a/spring-boot/src/main/java/com/baeldung/beanvalidation/application/repositories/UserRepository.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/beanvalidation/application/repositories/UserRepository.java similarity index 97% rename from spring-boot/src/main/java/com/baeldung/beanvalidation/application/repositories/UserRepository.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/beanvalidation/application/repositories/UserRepository.java index 8bf7a9f8b2..7b55d15a01 100644 --- a/spring-boot/src/main/java/com/baeldung/beanvalidation/application/repositories/UserRepository.java +++ b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/beanvalidation/application/repositories/UserRepository.java @@ -1,9 +1,9 @@ -package com.baeldung.beanvalidation.application.repositories; - -import org.springframework.data.repository.CrudRepository; -import org.springframework.stereotype.Repository; - -import com.baeldung.beanvalidation.application.entities.User; - -@Repository -public interface UserRepository extends CrudRepository {} +package com.baeldung.beanvalidation.application.repositories; + +import org.springframework.data.repository.CrudRepository; +import org.springframework.stereotype.Repository; + +import com.baeldung.beanvalidation.application.entities.User; + +@Repository +public interface UserRepository extends CrudRepository {} diff --git a/spring-boot/src/main/java/com/baeldung/bootcustomfilters/FilterConfig.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/bootcustomfilters/FilterConfig.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/bootcustomfilters/FilterConfig.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/bootcustomfilters/FilterConfig.java diff --git a/spring-boot/src/main/java/com/baeldung/bootcustomfilters/SpringBootFiltersApplication.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/bootcustomfilters/SpringBootFiltersApplication.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/bootcustomfilters/SpringBootFiltersApplication.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/bootcustomfilters/SpringBootFiltersApplication.java diff --git a/spring-boot/src/main/java/com/baeldung/bootcustomfilters/controller/UserController.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/bootcustomfilters/controller/UserController.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/bootcustomfilters/controller/UserController.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/bootcustomfilters/controller/UserController.java diff --git a/spring-boot/src/main/java/com/baeldung/bootcustomfilters/filters/RequestResponseLoggingFilter.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/bootcustomfilters/filters/RequestResponseLoggingFilter.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/bootcustomfilters/filters/RequestResponseLoggingFilter.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/bootcustomfilters/filters/RequestResponseLoggingFilter.java diff --git a/spring-boot/src/main/java/com/baeldung/bootcustomfilters/filters/TransactionFilter.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/bootcustomfilters/filters/TransactionFilter.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/bootcustomfilters/filters/TransactionFilter.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/bootcustomfilters/filters/TransactionFilter.java diff --git a/spring-boot/src/main/java/com/baeldung/bootcustomfilters/model/User.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/bootcustomfilters/model/User.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/bootcustomfilters/model/User.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/bootcustomfilters/model/User.java diff --git a/spring-boot-modules/spring-boot/src/main/java/com/baeldung/buildproperties/Application.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/buildproperties/Application.java new file mode 100644 index 0000000000..405cec3eac --- /dev/null +++ b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/buildproperties/Application.java @@ -0,0 +1,18 @@ +package com.baeldung.buildproperties; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.PropertySource; + +@SpringBootApplication +@ComponentScan(basePackages = "com.baeldung.buildproperties") +@PropertySource("classpath:build.properties") +//@PropertySource("classpath:build.yml") +public class Application { + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } + +} diff --git a/spring-boot-modules/spring-boot/src/main/java/com/baeldung/buildproperties/BuildInfoService.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/buildproperties/BuildInfoService.java new file mode 100644 index 0000000000..2a0d27188e --- /dev/null +++ b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/buildproperties/BuildInfoService.java @@ -0,0 +1,21 @@ +package com.baeldung.buildproperties; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +@Service +public class BuildInfoService { + @Value("${application-description}") + private String applicationDescription; + + @Value("${application-version}") + private String applicationVersion; + + public String getApplicationDescription() { + return applicationDescription; + } + + public String getApplicationVersion() { + return applicationVersion; + } +} diff --git a/spring-boot/src/main/java/com/baeldung/displayallbeans/Application.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/displayallbeans/Application.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/displayallbeans/Application.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/displayallbeans/Application.java diff --git a/spring-boot/src/main/java/com/baeldung/displayallbeans/controller/FooController.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/displayallbeans/controller/FooController.java similarity index 96% rename from spring-boot/src/main/java/com/baeldung/displayallbeans/controller/FooController.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/displayallbeans/controller/FooController.java index 630820ff9f..5b5b4ae834 100644 --- a/spring-boot/src/main/java/com/baeldung/displayallbeans/controller/FooController.java +++ b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/displayallbeans/controller/FooController.java @@ -1,23 +1,23 @@ -package com.baeldung.displayallbeans.controller; - -import java.util.Map; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; - -import com.baeldung.displayallbeans.service.FooService; - -@Controller -public class FooController { - @Autowired - private FooService fooService; - - @GetMapping(value = "/displayallbeans") - public ResponseEntity getHeaderAndBody(Map model) { - model.put("header", fooService.getHeader()); - model.put("message", fooService.getBody()); - return ResponseEntity.ok("displayallbeans"); - } -} +package com.baeldung.displayallbeans.controller; + +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +import com.baeldung.displayallbeans.service.FooService; + +@Controller +public class FooController { + @Autowired + private FooService fooService; + + @GetMapping(value = "/displayallbeans") + public ResponseEntity getHeaderAndBody(Map model) { + model.put("header", fooService.getHeader()); + model.put("message", fooService.getBody()); + return ResponseEntity.ok("displayallbeans"); + } +} diff --git a/spring-boot/src/main/java/com/baeldung/displayallbeans/service/FooService.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/displayallbeans/service/FooService.java similarity index 96% rename from spring-boot/src/main/java/com/baeldung/displayallbeans/service/FooService.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/displayallbeans/service/FooService.java index 1f3c15ee0e..d3f1ea294e 100644 --- a/spring-boot/src/main/java/com/baeldung/displayallbeans/service/FooService.java +++ b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/displayallbeans/service/FooService.java @@ -1,16 +1,16 @@ -package com.baeldung.displayallbeans.service; - -import org.springframework.stereotype.Service; - -@Service -public class FooService { - - public String getHeader() { - return "Display All Beans"; - } - - public String getBody() { - return "This is a sample application that displays all beans " + "in Spring IoC container using ListableBeanFactory interface " + "and Spring Boot Actuators."; - } - -} +package com.baeldung.displayallbeans.service; + +import org.springframework.stereotype.Service; + +@Service +public class FooService { + + public String getHeader() { + return "Display All Beans"; + } + + public String getBody() { + return "This is a sample application that displays all beans " + "in Spring IoC container using ListableBeanFactory interface " + "and Spring Boot Actuators."; + } + +} diff --git a/spring-boot/src/main/java/com/baeldung/dynamicvalidation/ContactInfo.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/dynamicvalidation/ContactInfo.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/dynamicvalidation/ContactInfo.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/dynamicvalidation/ContactInfo.java diff --git a/spring-boot/src/main/java/com/baeldung/dynamicvalidation/ContactInfoValidator.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/dynamicvalidation/ContactInfoValidator.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/dynamicvalidation/ContactInfoValidator.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/dynamicvalidation/ContactInfoValidator.java diff --git a/spring-boot/src/main/java/com/baeldung/dynamicvalidation/DynamicValidationApp.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/dynamicvalidation/DynamicValidationApp.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/dynamicvalidation/DynamicValidationApp.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/dynamicvalidation/DynamicValidationApp.java diff --git a/spring-boot/src/main/java/com/baeldung/dynamicvalidation/config/CustomerController.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/dynamicvalidation/config/CustomerController.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/dynamicvalidation/config/CustomerController.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/dynamicvalidation/config/CustomerController.java diff --git a/spring-boot/src/main/java/com/baeldung/dynamicvalidation/config/PersistenceConfig.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/dynamicvalidation/config/PersistenceConfig.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/dynamicvalidation/config/PersistenceConfig.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/dynamicvalidation/config/PersistenceConfig.java diff --git a/spring-boot/src/main/java/com/baeldung/dynamicvalidation/dao/ContactInfoExpressionRepository.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/dynamicvalidation/dao/ContactInfoExpressionRepository.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/dynamicvalidation/dao/ContactInfoExpressionRepository.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/dynamicvalidation/dao/ContactInfoExpressionRepository.java diff --git a/spring-boot/src/main/java/com/baeldung/dynamicvalidation/model/ContactInfoExpression.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/dynamicvalidation/model/ContactInfoExpression.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/dynamicvalidation/model/ContactInfoExpression.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/dynamicvalidation/model/ContactInfoExpression.java diff --git a/spring-boot/src/main/java/com/baeldung/dynamicvalidation/model/Customer.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/dynamicvalidation/model/Customer.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/dynamicvalidation/model/Customer.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/dynamicvalidation/model/Customer.java diff --git a/spring-boot/src/main/java/com/baeldung/errorhandling/ErrorHandlingApplication.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/errorhandling/ErrorHandlingApplication.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/errorhandling/ErrorHandlingApplication.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/errorhandling/ErrorHandlingApplication.java diff --git a/spring-boot/src/main/java/com/baeldung/errorhandling/controllers/IndexController.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/errorhandling/controllers/IndexController.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/errorhandling/controllers/IndexController.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/errorhandling/controllers/IndexController.java diff --git a/spring-boot/src/main/java/com/baeldung/errorhandling/controllers/MyErrorController.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/errorhandling/controllers/MyErrorController.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/errorhandling/controllers/MyErrorController.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/errorhandling/controllers/MyErrorController.java diff --git a/spring-boot/src/main/java/com/baeldung/failureanalyzer/FailureAnalyzerApplication.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/failureanalyzer/FailureAnalyzerApplication.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/failureanalyzer/FailureAnalyzerApplication.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/failureanalyzer/FailureAnalyzerApplication.java diff --git a/spring-boot/src/main/java/com/baeldung/failureanalyzer/MyBeanNotOfRequiredTypeFailureAnalyzer.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/failureanalyzer/MyBeanNotOfRequiredTypeFailureAnalyzer.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/failureanalyzer/MyBeanNotOfRequiredTypeFailureAnalyzer.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/failureanalyzer/MyBeanNotOfRequiredTypeFailureAnalyzer.java diff --git a/spring-boot/src/main/java/com/baeldung/failureanalyzer/MyDAO.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/failureanalyzer/MyDAO.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/failureanalyzer/MyDAO.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/failureanalyzer/MyDAO.java diff --git a/spring-boot/src/main/java/com/baeldung/failureanalyzer/MySecondDAO.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/failureanalyzer/MySecondDAO.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/failureanalyzer/MySecondDAO.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/failureanalyzer/MySecondDAO.java diff --git a/spring-boot/src/main/java/com/baeldung/failureanalyzer/MyService.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/failureanalyzer/MyService.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/failureanalyzer/MyService.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/failureanalyzer/MyService.java diff --git a/spring-boot/src/main/java/com/baeldung/graphql/Author.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/Author.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/graphql/Author.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/Author.java diff --git a/spring-boot/src/main/java/com/baeldung/graphql/AuthorDao.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/AuthorDao.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/graphql/AuthorDao.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/AuthorDao.java diff --git a/spring-boot/src/main/java/com/baeldung/graphql/AuthorResolver.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/AuthorResolver.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/graphql/AuthorResolver.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/AuthorResolver.java diff --git a/spring-boot/src/main/java/com/baeldung/graphql/GraphqlConfiguration.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/GraphqlConfiguration.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/graphql/GraphqlConfiguration.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/GraphqlConfiguration.java diff --git a/spring-boot/src/main/java/com/baeldung/graphql/Mutation.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/Mutation.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/graphql/Mutation.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/Mutation.java diff --git a/spring-boot/src/main/java/com/baeldung/graphql/Post.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/Post.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/graphql/Post.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/Post.java diff --git a/spring-boot/src/main/java/com/baeldung/graphql/PostDao.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/PostDao.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/graphql/PostDao.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/PostDao.java diff --git a/spring-boot/src/main/java/com/baeldung/graphql/PostResolver.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/PostResolver.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/graphql/PostResolver.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/PostResolver.java diff --git a/spring-boot/src/main/java/com/baeldung/graphql/Query.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/Query.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/graphql/Query.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/graphql/Query.java diff --git a/spring-boot/src/main/java/com/baeldung/internationalization/InternationalizationApp.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/internationalization/InternationalizationApp.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/internationalization/InternationalizationApp.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/internationalization/InternationalizationApp.java diff --git a/spring-boot/src/main/java/com/baeldung/internationalization/config/MvcConfig.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/internationalization/config/MvcConfig.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/internationalization/config/MvcConfig.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/internationalization/config/MvcConfig.java diff --git a/spring-boot/src/main/java/com/baeldung/internationalization/config/PageController.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/internationalization/config/PageController.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/internationalization/config/PageController.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/internationalization/config/PageController.java diff --git a/spring-boot/src/main/java/com/baeldung/intro/App.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/intro/App.java similarity index 96% rename from spring-boot/src/main/java/com/baeldung/intro/App.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/intro/App.java index b5d53f0da3..77cdf4ddb9 100644 --- a/spring-boot/src/main/java/com/baeldung/intro/App.java +++ b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/intro/App.java @@ -1,11 +1,11 @@ -package com.baeldung.intro; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class App { - public static void main(String[] args) { - SpringApplication.run(App.class, args); - } -} +package com.baeldung.intro; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class App { + public static void main(String[] args) { + SpringApplication.run(App.class, args); + } +} diff --git a/spring-boot/src/main/java/com/baeldung/intro/controller/HomeController.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/intro/controller/HomeController.java similarity index 95% rename from spring-boot/src/main/java/com/baeldung/intro/controller/HomeController.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/intro/controller/HomeController.java index 32f22f2cae..4797d6e593 100644 --- a/spring-boot/src/main/java/com/baeldung/intro/controller/HomeController.java +++ b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/intro/controller/HomeController.java @@ -1,18 +1,18 @@ -package com.baeldung.intro.controller; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class HomeController { - - @GetMapping("/") - public String root() { - return "Index Page"; - } - - @GetMapping("/local") - public String local() { - return "/local"; - } -} +package com.baeldung.intro.controller; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class HomeController { + + @GetMapping("/") + public String root() { + return "Index Page"; + } + + @GetMapping("/local") + public String local() { + return "/local"; + } +} diff --git a/spring-boot/src/main/java/com/baeldung/jsondateformat/Contact.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/jsondateformat/Contact.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/jsondateformat/Contact.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/jsondateformat/Contact.java diff --git a/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactApp.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactApp.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/jsondateformat/ContactApp.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactApp.java diff --git a/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactAppConfig.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactAppConfig.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/jsondateformat/ContactAppConfig.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactAppConfig.java diff --git a/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactController.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactController.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/jsondateformat/ContactController.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactController.java diff --git a/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactWithJavaUtilDate.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactWithJavaUtilDate.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/jsondateformat/ContactWithJavaUtilDate.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactWithJavaUtilDate.java diff --git a/spring-boot/src/main/java/com/baeldung/jsondateformat/PlainContact.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/jsondateformat/PlainContact.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/jsondateformat/PlainContact.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/jsondateformat/PlainContact.java diff --git a/spring-boot/src/main/java/com/baeldung/jsondateformat/PlainContactWithJavaUtilDate.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/jsondateformat/PlainContactWithJavaUtilDate.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/jsondateformat/PlainContactWithJavaUtilDate.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/jsondateformat/PlainContactWithJavaUtilDate.java diff --git a/spring-boot/src/main/java/com/baeldung/kong/QueryController.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/kong/QueryController.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/kong/QueryController.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/kong/QueryController.java diff --git a/spring-boot/src/main/java/com/baeldung/kong/StockApp.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/kong/StockApp.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/kong/StockApp.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/kong/StockApp.java diff --git a/spring-boot/src/main/java/com/baeldung/rss/ArticleFeedView.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/rss/ArticleFeedView.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/rss/ArticleFeedView.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/rss/ArticleFeedView.java diff --git a/spring-boot/src/main/java/com/baeldung/rss/ArticleRssController.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/rss/ArticleRssController.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/rss/ArticleRssController.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/rss/ArticleRssController.java diff --git a/spring-boot/src/main/java/com/baeldung/rss/CustomContainer.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/rss/CustomContainer.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/rss/CustomContainer.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/rss/CustomContainer.java diff --git a/spring-boot/src/main/java/com/baeldung/rss/RssApp.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/rss/RssApp.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/rss/RssApp.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/rss/RssApp.java diff --git a/spring-boot/src/main/java/com/baeldung/servletinitializer/WarInitializerApplication.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/servletinitializer/WarInitializerApplication.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/servletinitializer/WarInitializerApplication.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/servletinitializer/WarInitializerApplication.java diff --git a/spring-boot/src/main/java/com/baeldung/servlets/ApplicationMain.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/ApplicationMain.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/servlets/ApplicationMain.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/ApplicationMain.java diff --git a/spring-boot/src/main/java/com/baeldung/servlets/configuration/WebAppInitializer.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/configuration/WebAppInitializer.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/servlets/configuration/WebAppInitializer.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/configuration/WebAppInitializer.java diff --git a/spring-boot/src/main/java/com/baeldung/servlets/configuration/WebMvcConfigure.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/configuration/WebMvcConfigure.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/servlets/configuration/WebMvcConfigure.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/configuration/WebMvcConfigure.java diff --git a/spring-boot/src/main/java/com/baeldung/servlets/props/Constants.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/props/Constants.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/servlets/props/Constants.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/props/Constants.java diff --git a/spring-boot/src/main/java/com/baeldung/servlets/props/PropertyLoader.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/props/PropertyLoader.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/servlets/props/PropertyLoader.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/props/PropertyLoader.java diff --git a/spring-boot/src/main/java/com/baeldung/servlets/props/PropertySourcesLoader.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/props/PropertySourcesLoader.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/servlets/props/PropertySourcesLoader.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/props/PropertySourcesLoader.java diff --git a/spring-boot/src/main/java/com/baeldung/servlets/servlets/GenericCustomServlet.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/servlets/GenericCustomServlet.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/servlets/servlets/GenericCustomServlet.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/servlets/GenericCustomServlet.java diff --git a/spring-boot/src/main/java/com/baeldung/servlets/servlets/javaee/AnnotationServlet.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/servlets/javaee/AnnotationServlet.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/servlets/servlets/javaee/AnnotationServlet.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/servlets/javaee/AnnotationServlet.java diff --git a/spring-boot/src/main/java/com/baeldung/servlets/servlets/javaee/EEWebXmlServlet.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/servlets/javaee/EEWebXmlServlet.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/servlets/servlets/javaee/EEWebXmlServlet.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/servlets/javaee/EEWebXmlServlet.java diff --git a/spring-boot/src/main/java/com/baeldung/servlets/servlets/springboot/SpringRegistrationBeanServlet.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/servlets/springboot/SpringRegistrationBeanServlet.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/servlets/servlets/springboot/SpringRegistrationBeanServlet.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/servlets/springboot/SpringRegistrationBeanServlet.java diff --git a/spring-boot/src/main/java/com/baeldung/servlets/servlets/springboot/embedded/EmbeddedTomcatExample.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/servlets/springboot/embedded/EmbeddedTomcatExample.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/servlets/servlets/springboot/embedded/EmbeddedTomcatExample.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/servlets/servlets/springboot/embedded/EmbeddedTomcatExample.java diff --git a/spring-boot/src/main/java/com/baeldung/shutdownhooks/ShutdownHookApplication.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/ShutdownHookApplication.java similarity index 96% rename from spring-boot/src/main/java/com/baeldung/shutdownhooks/ShutdownHookApplication.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/ShutdownHookApplication.java index 7cce34a06c..44ec9e25ab 100644 --- a/spring-boot/src/main/java/com/baeldung/shutdownhooks/ShutdownHookApplication.java +++ b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/ShutdownHookApplication.java @@ -1,14 +1,14 @@ -package com.baeldung.shutdownhooks; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -@EnableAutoConfiguration -public class ShutdownHookApplication { - - public static void main(String args[]) { - SpringApplication.run(ShutdownHookApplication.class, args); - } -} +package com.baeldung.shutdownhooks; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +@EnableAutoConfiguration +public class ShutdownHookApplication { + + public static void main(String args[]) { + SpringApplication.run(ShutdownHookApplication.class, args); + } +} diff --git a/spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean1.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean1.java similarity index 95% rename from spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean1.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean1.java index e85b9395d3..545599ce25 100644 --- a/spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean1.java +++ b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean1.java @@ -1,14 +1,14 @@ -package com.baeldung.shutdownhooks.beans; - -import javax.annotation.PreDestroy; - -import org.springframework.stereotype.Component; - -@Component -public class Bean1 { - - @PreDestroy - public void destroy() { - System.out.println("Shutdown triggered using @PreDestroy."); - } -} +package com.baeldung.shutdownhooks.beans; + +import javax.annotation.PreDestroy; + +import org.springframework.stereotype.Component; + +@Component +public class Bean1 { + + @PreDestroy + public void destroy() { + System.out.println("Shutdown triggered using @PreDestroy."); + } +} diff --git a/spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean2.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean2.java similarity index 96% rename from spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean2.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean2.java index e85d12e791..b586c1430a 100644 --- a/spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean2.java +++ b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean2.java @@ -1,14 +1,14 @@ -package com.baeldung.shutdownhooks.beans; - -import org.springframework.beans.factory.DisposableBean; -import org.springframework.stereotype.Component; - -@Component -public class Bean2 implements DisposableBean { - - @Override - public void destroy() throws Exception { - System.out.println("Shutdown triggered using DisposableBean."); - } - -} +package com.baeldung.shutdownhooks.beans; + +import org.springframework.beans.factory.DisposableBean; +import org.springframework.stereotype.Component; + +@Component +public class Bean2 implements DisposableBean { + + @Override + public void destroy() throws Exception { + System.out.println("Shutdown triggered using DisposableBean."); + } + +} diff --git a/spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean3.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean3.java similarity index 95% rename from spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean3.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean3.java index bed1d50ee7..25a56e2859 100644 --- a/spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean3.java +++ b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/beans/Bean3.java @@ -1,8 +1,8 @@ -package com.baeldung.shutdownhooks.beans; - -public class Bean3 { - - public void destroy() { - System.out.println("Shutdown triggered using bean destroy method."); - } -} +package com.baeldung.shutdownhooks.beans; + +public class Bean3 { + + public void destroy() { + System.out.println("Shutdown triggered using bean destroy method."); + } +} diff --git a/spring-boot/src/main/java/com/baeldung/shutdownhooks/config/ExampleServletContextListener.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/config/ExampleServletContextListener.java similarity index 96% rename from spring-boot/src/main/java/com/baeldung/shutdownhooks/config/ExampleServletContextListener.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/config/ExampleServletContextListener.java index 07d729cb83..03ad5524b6 100644 --- a/spring-boot/src/main/java/com/baeldung/shutdownhooks/config/ExampleServletContextListener.java +++ b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/config/ExampleServletContextListener.java @@ -1,18 +1,18 @@ -package com.baeldung.shutdownhooks.config; - -import javax.servlet.ServletContextEvent; -import javax.servlet.ServletContextListener; - -public class ExampleServletContextListener implements ServletContextListener { - - @Override - public void contextDestroyed(ServletContextEvent event) { - System.out.println("Shutdown triggered using ServletContextListener."); - } - - @Override - public void contextInitialized(ServletContextEvent event) { - // Triggers when context initializes - } - -} +package com.baeldung.shutdownhooks.config; + +import javax.servlet.ServletContextEvent; +import javax.servlet.ServletContextListener; + +public class ExampleServletContextListener implements ServletContextListener { + + @Override + public void contextDestroyed(ServletContextEvent event) { + System.out.println("Shutdown triggered using ServletContextListener."); + } + + @Override + public void contextInitialized(ServletContextEvent event) { + // Triggers when context initializes + } + +} diff --git a/spring-boot/src/main/java/com/baeldung/shutdownhooks/config/ShutdownHookConfiguration.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/config/ShutdownHookConfiguration.java similarity index 96% rename from spring-boot/src/main/java/com/baeldung/shutdownhooks/config/ShutdownHookConfiguration.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/config/ShutdownHookConfiguration.java index 2d0712e19b..7d487dfc21 100644 --- a/spring-boot/src/main/java/com/baeldung/shutdownhooks/config/ShutdownHookConfiguration.java +++ b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/shutdownhooks/config/ShutdownHookConfiguration.java @@ -1,25 +1,25 @@ -package com.baeldung.shutdownhooks.config; - -import javax.servlet.ServletContextListener; - -import org.springframework.boot.web.servlet.ServletListenerRegistrationBean; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import com.baeldung.shutdownhooks.beans.Bean3; - -@Configuration -public class ShutdownHookConfiguration { - - @Bean(destroyMethod = "destroy") - public Bean3 initializeBean3() { - return new Bean3(); - } - - @Bean - ServletListenerRegistrationBean servletListener() { - ServletListenerRegistrationBean srb = new ServletListenerRegistrationBean<>(); - srb.setListener(new ExampleServletContextListener()); - return srb; - } -} +package com.baeldung.shutdownhooks.config; + +import javax.servlet.ServletContextListener; + +import org.springframework.boot.web.servlet.ServletListenerRegistrationBean; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import com.baeldung.shutdownhooks.beans.Bean3; + +@Configuration +public class ShutdownHookConfiguration { + + @Bean(destroyMethod = "destroy") + public Bean3 initializeBean3() { + return new Bean3(); + } + + @Bean + ServletListenerRegistrationBean servletListener() { + ServletListenerRegistrationBean srb = new ServletListenerRegistrationBean<>(); + srb.setListener(new ExampleServletContextListener()); + return srb; + } +} diff --git a/spring-boot/src/main/java/com/baeldung/toggle/Employee.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/Employee.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/toggle/Employee.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/Employee.java diff --git a/spring-boot/src/main/java/com/baeldung/toggle/EmployeeRepository.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/EmployeeRepository.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/toggle/EmployeeRepository.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/EmployeeRepository.java diff --git a/spring-boot/src/main/java/com/baeldung/toggle/FeatureAssociation.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/FeatureAssociation.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/toggle/FeatureAssociation.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/FeatureAssociation.java diff --git a/spring-boot/src/main/java/com/baeldung/toggle/FeaturesAspect.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/FeaturesAspect.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/toggle/FeaturesAspect.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/FeaturesAspect.java diff --git a/spring-boot/src/main/java/com/baeldung/toggle/MyFeatures.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/MyFeatures.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/toggle/MyFeatures.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/MyFeatures.java diff --git a/spring-boot/src/main/java/com/baeldung/toggle/SalaryController.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/SalaryController.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/toggle/SalaryController.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/SalaryController.java diff --git a/spring-boot/src/main/java/com/baeldung/toggle/SalaryService.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/SalaryService.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/toggle/SalaryService.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/SalaryService.java diff --git a/spring-boot/src/main/java/com/baeldung/toggle/ToggleApplication.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/ToggleApplication.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/toggle/ToggleApplication.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/ToggleApplication.java diff --git a/spring-boot/src/main/java/com/baeldung/toggle/ToggleConfiguration.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/ToggleConfiguration.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/toggle/ToggleConfiguration.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/toggle/ToggleConfiguration.java diff --git a/spring-boot/src/main/java/com/baeldung/utils/UtilsApplication.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/utils/UtilsApplication.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/utils/UtilsApplication.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/utils/UtilsApplication.java diff --git a/spring-boot/src/main/java/com/baeldung/utils/controller/UtilsController.java b/spring-boot-modules/spring-boot/src/main/java/com/baeldung/utils/controller/UtilsController.java similarity index 100% rename from spring-boot/src/main/java/com/baeldung/utils/controller/UtilsController.java rename to spring-boot-modules/spring-boot/src/main/java/com/baeldung/utils/controller/UtilsController.java diff --git a/spring-boot/src/main/java/org/baeldung/boot/Application.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/Application.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/boot/Application.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/Application.java diff --git a/spring-boot/src/main/java/org/baeldung/boot/config/H2JpaConfig.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/config/H2JpaConfig.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/boot/config/H2JpaConfig.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/config/H2JpaConfig.java diff --git a/spring-boot/src/main/java/org/baeldung/boot/config/WebConfig.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/config/WebConfig.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/boot/config/WebConfig.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/config/WebConfig.java diff --git a/spring-boot/src/main/java/org/baeldung/boot/controller/servlet/HelloWorldServlet.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/controller/servlet/HelloWorldServlet.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/boot/controller/servlet/HelloWorldServlet.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/controller/servlet/HelloWorldServlet.java diff --git a/spring-boot/src/main/java/org/baeldung/boot/controller/servlet/SpringHelloWorldServlet.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/controller/servlet/SpringHelloWorldServlet.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/boot/controller/servlet/SpringHelloWorldServlet.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/controller/servlet/SpringHelloWorldServlet.java diff --git a/spring-boot/src/main/java/org/baeldung/boot/converter/GenericBigDecimalConverter.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/converter/GenericBigDecimalConverter.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/boot/converter/GenericBigDecimalConverter.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/converter/GenericBigDecimalConverter.java diff --git a/spring-boot/src/main/java/org/baeldung/boot/converter/StringToEmployeeConverter.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/converter/StringToEmployeeConverter.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/boot/converter/StringToEmployeeConverter.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/converter/StringToEmployeeConverter.java diff --git a/spring-boot/src/main/java/org/baeldung/boot/converter/StringToEnumConverterFactory.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/converter/StringToEnumConverterFactory.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/boot/converter/StringToEnumConverterFactory.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/converter/StringToEnumConverterFactory.java diff --git a/spring-boot/src/main/java/org/baeldung/boot/converter/controller/StringToEmployeeConverterController.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/converter/controller/StringToEmployeeConverterController.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/boot/converter/controller/StringToEmployeeConverterController.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/converter/controller/StringToEmployeeConverterController.java diff --git a/spring-boot/src/main/java/org/baeldung/boot/domain/Modes.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/domain/Modes.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/boot/domain/Modes.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/boot/domain/Modes.java diff --git a/spring-boot/src/main/java/org/baeldung/common/error/MyCustomErrorController.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/common/error/MyCustomErrorController.java similarity index 95% rename from spring-boot/src/main/java/org/baeldung/common/error/MyCustomErrorController.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/common/error/MyCustomErrorController.java index 6b342a1bfb..df0e3ec0b2 100644 --- a/spring-boot/src/main/java/org/baeldung/common/error/MyCustomErrorController.java +++ b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/common/error/MyCustomErrorController.java @@ -1,24 +1,24 @@ -package org.baeldung.common.error; - -import org.springframework.boot.web.servlet.error.ErrorController; -import org.springframework.web.bind.annotation.GetMapping; - -public class MyCustomErrorController implements ErrorController { - - private static final String PATH = "/error"; - - public MyCustomErrorController() { - // TODO Auto-generated constructor stub - } - - @GetMapping(value = PATH) - public String error() { - return "Error haven"; - } - - @Override - public String getErrorPath() { - return PATH; - } - -} +package org.baeldung.common.error; + +import org.springframework.boot.web.servlet.error.ErrorController; +import org.springframework.web.bind.annotation.GetMapping; + +public class MyCustomErrorController implements ErrorController { + + private static final String PATH = "/error"; + + public MyCustomErrorController() { + // TODO Auto-generated constructor stub + } + + @GetMapping(value = PATH) + public String error() { + return "Error haven"; + } + + @Override + public String getErrorPath() { + return PATH; + } + +} diff --git a/spring-boot/src/main/java/org/baeldung/common/error/SpringHelloServletRegistrationBean.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/common/error/SpringHelloServletRegistrationBean.java similarity index 96% rename from spring-boot/src/main/java/org/baeldung/common/error/SpringHelloServletRegistrationBean.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/common/error/SpringHelloServletRegistrationBean.java index 723afddd06..774cf1b970 100644 --- a/spring-boot/src/main/java/org/baeldung/common/error/SpringHelloServletRegistrationBean.java +++ b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/common/error/SpringHelloServletRegistrationBean.java @@ -1,15 +1,15 @@ -package org.baeldung.common.error; - -import org.springframework.boot.web.servlet.ServletRegistrationBean; - -import javax.servlet.Servlet; - -public class SpringHelloServletRegistrationBean extends ServletRegistrationBean { - - public SpringHelloServletRegistrationBean() { - } - - public SpringHelloServletRegistrationBean(Servlet servlet, String... urlMappings) { - super(servlet, urlMappings); - } -} +package org.baeldung.common.error; + +import org.springframework.boot.web.servlet.ServletRegistrationBean; + +import javax.servlet.Servlet; + +public class SpringHelloServletRegistrationBean extends ServletRegistrationBean { + + public SpringHelloServletRegistrationBean() { + } + + public SpringHelloServletRegistrationBean(Servlet servlet, String... urlMappings) { + super(servlet, urlMappings); + } +} diff --git a/spring-boot/src/main/java/org/baeldung/common/error/controller/ErrorController.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/common/error/controller/ErrorController.java similarity index 95% rename from spring-boot/src/main/java/org/baeldung/common/error/controller/ErrorController.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/common/error/controller/ErrorController.java index 3e26f8c9d8..ac5f92e9c9 100644 --- a/spring-boot/src/main/java/org/baeldung/common/error/controller/ErrorController.java +++ b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/common/error/controller/ErrorController.java @@ -1,22 +1,22 @@ -package org.baeldung.common.error.controller; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class ErrorController { - - public ErrorController() { - } - - @GetMapping("/400") - String error400() { - return "Error Code: 400 occured."; - } - - @GetMapping("/errorHaven") - String errorHeaven() { - return "You have reached the haven of errors!!!"; - } - -} +package org.baeldung.common.error.controller; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class ErrorController { + + public ErrorController() { + } + + @GetMapping("/400") + String error400() { + return "Error Code: 400 occured."; + } + + @GetMapping("/errorHaven") + String errorHeaven() { + return "You have reached the haven of errors!!!"; + } + +} diff --git a/spring-boot/src/main/java/org/baeldung/common/properties/MyServletContainerCustomizationBean.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/common/properties/MyServletContainerCustomizationBean.java similarity index 97% rename from spring-boot/src/main/java/org/baeldung/common/properties/MyServletContainerCustomizationBean.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/common/properties/MyServletContainerCustomizationBean.java index f6ab017298..d553d44769 100644 --- a/spring-boot/src/main/java/org/baeldung/common/properties/MyServletContainerCustomizationBean.java +++ b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/common/properties/MyServletContainerCustomizationBean.java @@ -1,25 +1,25 @@ -package org.baeldung.common.properties; - -import org.springframework.boot.web.server.ErrorPage; -import org.springframework.boot.web.server.WebServerFactoryCustomizer; -import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory; -import org.springframework.http.HttpStatus; -import org.springframework.stereotype.Component; - -@Component -public class MyServletContainerCustomizationBean implements WebServerFactoryCustomizer { - - public MyServletContainerCustomizationBean() { - - } - - @Override - public void customize(ConfigurableServletWebServerFactory container) { - container.setPort(8084); - container.setContextPath("/springbootapp"); - - container.addErrorPages(new ErrorPage(HttpStatus.BAD_REQUEST, "/400")); - container.addErrorPages(new ErrorPage("/errorHaven")); - } - -} +package org.baeldung.common.properties; + +import org.springframework.boot.web.server.ErrorPage; +import org.springframework.boot.web.server.WebServerFactoryCustomizer; +import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory; +import org.springframework.http.HttpStatus; +import org.springframework.stereotype.Component; + +@Component +public class MyServletContainerCustomizationBean implements WebServerFactoryCustomizer { + + public MyServletContainerCustomizationBean() { + + } + + @Override + public void customize(ConfigurableServletWebServerFactory container) { + container.setPort(8084); + container.setContextPath("/springbootapp"); + + container.addErrorPages(new ErrorPage(HttpStatus.BAD_REQUEST, "/400")); + container.addErrorPages(new ErrorPage("/errorHaven")); + } + +} diff --git a/spring-boot/src/main/java/org/baeldung/common/resources/ExecutorServiceExitCodeGenerator.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/common/resources/ExecutorServiceExitCodeGenerator.java similarity index 96% rename from spring-boot/src/main/java/org/baeldung/common/resources/ExecutorServiceExitCodeGenerator.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/common/resources/ExecutorServiceExitCodeGenerator.java index be33d64c5d..64853a9941 100644 --- a/spring-boot/src/main/java/org/baeldung/common/resources/ExecutorServiceExitCodeGenerator.java +++ b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/common/resources/ExecutorServiceExitCodeGenerator.java @@ -1,28 +1,28 @@ -package org.baeldung.common.resources; - -import org.springframework.boot.ExitCodeGenerator; - -import java.util.Objects; -import java.util.concurrent.ExecutorService; - -public class ExecutorServiceExitCodeGenerator implements ExitCodeGenerator { - - private ExecutorService executorService; - - public ExecutorServiceExitCodeGenerator(ExecutorService executorService) { - } - - @Override - public int getExitCode() { - try { - if (!Objects.isNull(executorService)) { - executorService.shutdownNow(); - return 1; - } - - return 0; - } catch (SecurityException ex) { - return 0; - } - } -} +package org.baeldung.common.resources; + +import org.springframework.boot.ExitCodeGenerator; + +import java.util.Objects; +import java.util.concurrent.ExecutorService; + +public class ExecutorServiceExitCodeGenerator implements ExitCodeGenerator { + + private ExecutorService executorService; + + public ExecutorServiceExitCodeGenerator(ExecutorService executorService) { + } + + @Override + public int getExitCode() { + try { + if (!Objects.isNull(executorService)) { + executorService.shutdownNow(); + return 1; + } + + return 0; + } catch (SecurityException ex) { + return 0; + } + } +} diff --git a/spring-boot/src/main/java/org/baeldung/demo/DemoApplication.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/DemoApplication.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/demo/DemoApplication.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/DemoApplication.java diff --git a/spring-boot/src/main/java/org/baeldung/demo/boottest/Employee.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/boottest/Employee.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/demo/boottest/Employee.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/boottest/Employee.java diff --git a/spring-boot/src/main/java/org/baeldung/demo/boottest/EmployeeRepository.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/boottest/EmployeeRepository.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/demo/boottest/EmployeeRepository.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/boottest/EmployeeRepository.java diff --git a/spring-boot/src/main/java/org/baeldung/demo/boottest/EmployeeRestController.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/boottest/EmployeeRestController.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/demo/boottest/EmployeeRestController.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/boottest/EmployeeRestController.java diff --git a/spring-boot/src/main/java/org/baeldung/demo/boottest/EmployeeService.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/boottest/EmployeeService.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/demo/boottest/EmployeeService.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/boottest/EmployeeService.java diff --git a/spring-boot/src/main/java/org/baeldung/demo/boottest/EmployeeServiceImpl.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/boottest/EmployeeServiceImpl.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/demo/boottest/EmployeeServiceImpl.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/boottest/EmployeeServiceImpl.java diff --git a/spring-boot/src/main/java/org/baeldung/demo/components/FooService.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/components/FooService.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/demo/components/FooService.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/components/FooService.java diff --git a/spring-boot/src/main/java/org/baeldung/demo/exceptions/CommonException.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/exceptions/CommonException.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/demo/exceptions/CommonException.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/exceptions/CommonException.java diff --git a/spring-boot/src/main/java/org/baeldung/demo/exceptions/FooNotFoundException.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/exceptions/FooNotFoundException.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/demo/exceptions/FooNotFoundException.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/exceptions/FooNotFoundException.java diff --git a/spring-boot/src/main/java/org/baeldung/demo/model/Foo.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/model/Foo.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/demo/model/Foo.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/model/Foo.java diff --git a/spring-boot/src/main/java/org/baeldung/demo/repository/FooRepository.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/repository/FooRepository.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/demo/repository/FooRepository.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/repository/FooRepository.java diff --git a/spring-boot/src/main/java/org/baeldung/demo/service/FooController.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/service/FooController.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/demo/service/FooController.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/demo/service/FooController.java diff --git a/spring-boot/src/main/java/org/baeldung/endpoints/info/TotalUsersInfoContributor.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/endpoints/info/TotalUsersInfoContributor.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/endpoints/info/TotalUsersInfoContributor.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/endpoints/info/TotalUsersInfoContributor.java diff --git a/spring-boot/src/main/java/org/baeldung/main/SpringBootApplication.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/main/SpringBootApplication.java similarity index 97% rename from spring-boot/src/main/java/org/baeldung/main/SpringBootApplication.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/main/SpringBootApplication.java index 30ac94221b..a203659d63 100644 --- a/spring-boot/src/main/java/org/baeldung/main/SpringBootApplication.java +++ b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/main/SpringBootApplication.java @@ -1,63 +1,63 @@ -package org.baeldung.main; - -import org.baeldung.boot.controller.servlet.HelloWorldServlet; -import org.baeldung.boot.controller.servlet.SpringHelloWorldServlet; -import org.baeldung.common.error.SpringHelloServletRegistrationBean; -import org.baeldung.common.resources.ExecutorServiceExitCodeGenerator; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -@RestController -@EnableAutoConfiguration -@ComponentScan({ "org.baeldung.common.error", "org.baeldung.common.error.controller", "org.baeldung.common.properties", "org.baeldung.common.resources", "org.baeldung.endpoints", "org.baeldung.service", "org.baeldung.monitor.jmx", "org.baeldung.boot.config" }) -public class SpringBootApplication { - - private static ApplicationContext applicationContext; - - @GetMapping("/") - String home() { - return "TADA!!! You are in Spring Boot Actuator test application."; - } - - public static void main(String[] args) { - applicationContext = SpringApplication.run(SpringBootApplication.class, args); - } - - @Bean - public ExecutorService executorService() { - return Executors.newFixedThreadPool(10); - } - - @Bean - public HelloWorldServlet helloWorldServlet() { - return new HelloWorldServlet(); - } - - @Bean - public SpringHelloServletRegistrationBean servletRegistrationBean() { - SpringHelloServletRegistrationBean bean = new SpringHelloServletRegistrationBean(new SpringHelloWorldServlet(), "/springHelloWorld/*"); - bean.setLoadOnStartup(1); - bean.addInitParameter("message", "SpringHelloWorldServlet special message"); - return bean; - } - - @Bean - @Autowired - public ExecutorServiceExitCodeGenerator executorServiceExitCodeGenerator(ExecutorService executorService) { - return new ExecutorServiceExitCodeGenerator(executorService); - } - - public void shutDown(ExecutorServiceExitCodeGenerator executorServiceExitCodeGenerator) { - SpringApplication.exit(applicationContext, executorServiceExitCodeGenerator); - } - -} +package org.baeldung.main; + +import org.baeldung.boot.controller.servlet.HelloWorldServlet; +import org.baeldung.boot.controller.servlet.SpringHelloWorldServlet; +import org.baeldung.common.error.SpringHelloServletRegistrationBean; +import org.baeldung.common.resources.ExecutorServiceExitCodeGenerator; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +@RestController +@EnableAutoConfiguration +@ComponentScan({ "org.baeldung.common.error", "org.baeldung.common.error.controller", "org.baeldung.common.properties", "org.baeldung.common.resources", "org.baeldung.endpoints", "org.baeldung.service", "org.baeldung.monitor.jmx", "org.baeldung.boot.config" }) +public class SpringBootApplication { + + private static ApplicationContext applicationContext; + + @GetMapping("/") + String home() { + return "TADA!!! You are in Spring Boot Actuator test application."; + } + + public static void main(String[] args) { + applicationContext = SpringApplication.run(SpringBootApplication.class, args); + } + + @Bean + public ExecutorService executorService() { + return Executors.newFixedThreadPool(10); + } + + @Bean + public HelloWorldServlet helloWorldServlet() { + return new HelloWorldServlet(); + } + + @Bean + public SpringHelloServletRegistrationBean servletRegistrationBean() { + SpringHelloServletRegistrationBean bean = new SpringHelloServletRegistrationBean(new SpringHelloWorldServlet(), "/springHelloWorld/*"); + bean.setLoadOnStartup(1); + bean.addInitParameter("message", "SpringHelloWorldServlet special message"); + return bean; + } + + @Bean + @Autowired + public ExecutorServiceExitCodeGenerator executorServiceExitCodeGenerator(ExecutorService executorService) { + return new ExecutorServiceExitCodeGenerator(executorService); + } + + public void shutDown(ExecutorServiceExitCodeGenerator executorServiceExitCodeGenerator) { + SpringApplication.exit(applicationContext, executorServiceExitCodeGenerator); + } + +} diff --git a/spring-boot/src/main/java/org/baeldung/model/User.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/model/User.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/model/User.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/model/User.java diff --git a/spring-boot/src/main/java/org/baeldung/repository/UserRepository.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/repository/UserRepository.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/repository/UserRepository.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/repository/UserRepository.java diff --git a/spring-boot/src/main/java/org/baeldung/session/exception/Application.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/session/exception/Application.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/session/exception/Application.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/session/exception/Application.java diff --git a/spring-boot/src/main/java/org/baeldung/session/exception/repository/FooRepository.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/session/exception/repository/FooRepository.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/session/exception/repository/FooRepository.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/session/exception/repository/FooRepository.java diff --git a/spring-boot/src/main/java/org/baeldung/session/exception/repository/FooRepositoryImpl.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/session/exception/repository/FooRepositoryImpl.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/session/exception/repository/FooRepositoryImpl.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/session/exception/repository/FooRepositoryImpl.java diff --git a/spring-boot/src/main/java/org/baeldung/startup/AppStartupRunner.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/startup/AppStartupRunner.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/startup/AppStartupRunner.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/startup/AppStartupRunner.java diff --git a/spring-boot/src/main/java/org/baeldung/startup/CommandLineAppStartupRunner.java b/spring-boot-modules/spring-boot/src/main/java/org/baeldung/startup/CommandLineAppStartupRunner.java similarity index 100% rename from spring-boot/src/main/java/org/baeldung/startup/CommandLineAppStartupRunner.java rename to spring-boot-modules/spring-boot/src/main/java/org/baeldung/startup/CommandLineAppStartupRunner.java diff --git a/spring-boot/src/main/resources/META-INF/spring.factories b/spring-boot-modules/spring-boot/src/main/resources/META-INF/spring.factories similarity index 100% rename from spring-boot/src/main/resources/META-INF/spring.factories rename to spring-boot-modules/spring-boot/src/main/resources/META-INF/spring.factories diff --git a/spring-boot/src/main/resources/application-errorhandling.properties b/spring-boot-modules/spring-boot/src/main/resources/application-errorhandling.properties similarity index 100% rename from spring-boot/src/main/resources/application-errorhandling.properties rename to spring-boot-modules/spring-boot/src/main/resources/application-errorhandling.properties diff --git a/spring-boot/src/main/resources/application.properties b/spring-boot-modules/spring-boot/src/main/resources/application.properties similarity index 50% rename from spring-boot/src/main/resources/application.properties rename to spring-boot-modules/spring-boot/src/main/resources/application.properties index 918fe5ea67..7de79da574 100644 --- a/spring-boot/src/main/resources/application.properties +++ b/spring-boot-modules/spring-boot/src/main/resources/application.properties @@ -1,74 +1,44 @@ -server.port=9090 -server.servlet.contextPath=/springbootapp -management.server.port=8081 -management.server.address=127.0.0.1 -#debug=true -spring.jpa.show-sql=true -spring.jpa.hibernate.ddl-auto = update - -management.endpoints.jmx.domain=Spring Sample Application -spring.jmx.unique-names=true - -management.endpoints.web.exposure.include=* -management.endpoint.shutdown.enabled=true - -##jolokia.config.debug=true -##endpoints.jolokia.enabled=true -##endpoints.jolokia.path=jolokia - -spring.jmx.enabled=true - -## for pretty printing of json when endpoints accessed over HTTP -http.mappers.jsonPrettyPrint=true - -## Configuring info endpoint -info.app.name=Spring Sample Application -info.app.description=This is my first spring boot application G1 -info.app.version=1.0.0 -info.java-vendor = ${java.specification.vendor} - -logging.level.org.springframework=INFO - -#Servlet Configuration -servlet.name=dispatcherExample -servlet.mapping=/dispatcherExampleURL - -#spring.banner.charset=UTF-8 -#spring.banner.location=classpath:banner.txt -#spring.banner.image.location=classpath:banner.gif -#spring.banner.image.width= //TODO -#spring.banner.image.height= //TODO -#spring.banner.image.margin= //TODO -#spring.banner.image.invert= //TODO - -contactInfoType=email - -#chaos monkey for spring boot props -management.endpoint.chaosmonkey.enabled=true -management.endpoint.chaosmonkeyjmx.enabled=true - -spring.profiles.active=chaos-monkey -#Determine whether should execute or not -chaos.monkey.enabled=true -#How many requests are to be attacked. 1: attack each request; 5: each 5th request is attacked -chaos.monkey.assaults.level=1 -#Minimum latency in ms added to the request -chaos.monkey.assaults.latencyRangeStart=3000 -#Maximum latency in ms added to the request -chaos.monkey.assaults.latencyRangeEnd=15000 -#Latency assault active -chaos.monkey.assaults.latencyActive=true -#Exception assault active -chaos.monkey.assaults.exceptionsActive=false -#AppKiller assault active -chaos.monkey.assaults.killApplicationActive=false -#Controller watcher active -chaos.monkey.watcher.controller=false -#RestController watcher active -chaos.monkey.watcher.restController=false -#Service watcher active -chaos.monkey.watcher.service=true -#Repository watcher active -chaos.monkey.watcher.repository=false -#Component watcher active -chaos.monkey.watcher.component=false +server.port=9090 +server.servlet.contextPath=/springbootapp +management.server.port=8081 +management.server.address=127.0.0.1 +#debug=true +spring.jpa.show-sql=true +spring.jpa.hibernate.ddl-auto = update + +management.endpoints.jmx.domain=Spring Sample Application +spring.jmx.unique-names=true + +management.endpoints.web.exposure.include=* +management.endpoint.shutdown.enabled=true + +##jolokia.config.debug=true +##endpoints.jolokia.enabled=true +##endpoints.jolokia.path=jolokia + +spring.jmx.enabled=true + +## for pretty printing of json when endpoints accessed over HTTP +http.mappers.jsonPrettyPrint=true + +## Configuring info endpoint +info.app.name=Spring Sample Application +info.app.description=This is my first spring boot application G1 +info.app.version=1.0.0 +info.java-vendor = ${java.specification.vendor} + +logging.level.org.springframework=INFO + +#Servlet Configuration +servlet.name=dispatcherExample +servlet.mapping=/dispatcherExampleURL + +#spring.banner.charset=UTF-8 +#spring.banner.location=classpath:banner.txt +#spring.banner.image.location=classpath:banner.gif +#spring.banner.image.width= //TODO +#spring.banner.image.height= //TODO +#spring.banner.image.margin= //TODO +#spring.banner.image.invert= //TODO + +contactInfoType=email \ No newline at end of file diff --git a/spring-boot/src/main/resources/banner.txt b/spring-boot-modules/spring-boot/src/main/resources/banner.txt similarity index 100% rename from spring-boot/src/main/resources/banner.txt rename to spring-boot-modules/spring-boot/src/main/resources/banner.txt diff --git a/spring-boot/src/main/resources/build.properties b/spring-boot-modules/spring-boot/src/main/resources/build.properties similarity index 100% rename from spring-boot/src/main/resources/build.properties rename to spring-boot-modules/spring-boot/src/main/resources/build.properties diff --git a/spring-boot-modules/spring-boot/src/main/resources/build.yml b/spring-boot-modules/spring-boot/src/main/resources/build.yml new file mode 100644 index 0000000000..528d2e3440 --- /dev/null +++ b/spring-boot-modules/spring-boot/src/main/resources/build.yml @@ -0,0 +1,2 @@ +application-description: ^project.description^ +application-version: ^project.version^ \ No newline at end of file diff --git a/spring-boot/src/main/resources/custom.properties b/spring-boot-modules/spring-boot/src/main/resources/custom.properties similarity index 100% rename from spring-boot/src/main/resources/custom.properties rename to spring-boot-modules/spring-boot/src/main/resources/custom.properties diff --git a/spring-boot/src/main/resources/data-expressions.sql b/spring-boot-modules/spring-boot/src/main/resources/data-expressions.sql similarity index 100% rename from spring-boot/src/main/resources/data-expressions.sql rename to spring-boot-modules/spring-boot/src/main/resources/data-expressions.sql diff --git a/spring-boot/src/main/resources/data.sql b/spring-boot-modules/spring-boot/src/main/resources/data.sql similarity index 100% rename from spring-boot/src/main/resources/data.sql rename to spring-boot-modules/spring-boot/src/main/resources/data.sql diff --git a/spring-boot/src/main/resources/demo.properties b/spring-boot-modules/spring-boot/src/main/resources/demo.properties similarity index 100% rename from spring-boot/src/main/resources/demo.properties rename to spring-boot-modules/spring-boot/src/main/resources/demo.properties diff --git a/spring-boot/src/main/resources/graphql/blog.graphqls b/spring-boot-modules/spring-boot/src/main/resources/graphql/blog.graphqls similarity index 100% rename from spring-boot/src/main/resources/graphql/blog.graphqls rename to spring-boot-modules/spring-boot/src/main/resources/graphql/blog.graphqls diff --git a/spring-boot/src/main/resources/logback.xml b/spring-boot-modules/spring-boot/src/main/resources/logback.xml similarity index 100% rename from spring-boot/src/main/resources/logback.xml rename to spring-boot-modules/spring-boot/src/main/resources/logback.xml diff --git a/spring-boot/src/main/resources/messages.properties b/spring-boot-modules/spring-boot/src/main/resources/messages.properties similarity index 100% rename from spring-boot/src/main/resources/messages.properties rename to spring-boot-modules/spring-boot/src/main/resources/messages.properties diff --git a/spring-boot/src/main/resources/messages_fr.properties b/spring-boot-modules/spring-boot/src/main/resources/messages_fr.properties similarity index 100% rename from spring-boot/src/main/resources/messages_fr.properties rename to spring-boot-modules/spring-boot/src/main/resources/messages_fr.properties diff --git a/spring-boot/src/main/resources/persistence-generic-entity.properties b/spring-boot-modules/spring-boot/src/main/resources/persistence-generic-entity.properties similarity index 100% rename from spring-boot/src/main/resources/persistence-generic-entity.properties rename to spring-boot-modules/spring-boot/src/main/resources/persistence-generic-entity.properties diff --git a/spring-boot/src/main/resources/templates/error/404.html b/spring-boot-modules/spring-boot/src/main/resources/public/error/404.html similarity index 100% rename from spring-boot/src/main/resources/templates/error/404.html rename to spring-boot-modules/spring-boot/src/main/resources/public/error/404.html diff --git a/spring-boot/src/main/resources/schema-expressions.sql b/spring-boot-modules/spring-boot/src/main/resources/schema-expressions.sql similarity index 100% rename from spring-boot/src/main/resources/schema-expressions.sql rename to spring-boot-modules/spring-boot/src/main/resources/schema-expressions.sql diff --git a/spring-boot/src/main/resources/schema.sql b/spring-boot-modules/spring-boot/src/main/resources/schema.sql similarity index 100% rename from spring-boot/src/main/resources/schema.sql rename to spring-boot-modules/spring-boot/src/main/resources/schema.sql diff --git a/spring-boot/src/main/resources/shutdown/shutdown.bat b/spring-boot-modules/spring-boot/src/main/resources/shutdown/shutdown.bat similarity index 100% rename from spring-boot/src/main/resources/shutdown/shutdown.bat rename to spring-boot-modules/spring-boot/src/main/resources/shutdown/shutdown.bat diff --git a/spring-boot/src/main/resources/static/internationalization.js b/spring-boot-modules/spring-boot/src/main/resources/static/internationalization.js similarity index 100% rename from spring-boot/src/main/resources/static/internationalization.js rename to spring-boot-modules/spring-boot/src/main/resources/static/internationalization.js diff --git a/spring-boot/src/main/resources/templates/customer.html b/spring-boot-modules/spring-boot/src/main/resources/templates/customer.html similarity index 100% rename from spring-boot/src/main/resources/templates/customer.html rename to spring-boot-modules/spring-boot/src/main/resources/templates/customer.html diff --git a/spring-boot/src/main/resources/templates/customers.html b/spring-boot-modules/spring-boot/src/main/resources/templates/customers.html similarity index 100% rename from spring-boot/src/main/resources/templates/customers.html rename to spring-boot-modules/spring-boot/src/main/resources/templates/customers.html diff --git a/spring-boot/src/main/resources/templates/displayallbeans.html b/spring-boot-modules/spring-boot/src/main/resources/templates/displayallbeans.html similarity index 100% rename from spring-boot/src/main/resources/templates/displayallbeans.html rename to spring-boot-modules/spring-boot/src/main/resources/templates/displayallbeans.html diff --git a/spring-boot/src/main/resources/templates/error-404.html b/spring-boot-modules/spring-boot/src/main/resources/templates/error-404.html similarity index 100% rename from spring-boot/src/main/resources/templates/error-404.html rename to spring-boot-modules/spring-boot/src/main/resources/templates/error-404.html diff --git a/spring-boot/src/main/resources/templates/error-500.html b/spring-boot-modules/spring-boot/src/main/resources/templates/error-500.html similarity index 100% rename from spring-boot/src/main/resources/templates/error-500.html rename to spring-boot-modules/spring-boot/src/main/resources/templates/error-500.html diff --git a/spring-boot/src/main/resources/templates/error.html b/spring-boot-modules/spring-boot/src/main/resources/templates/error.html similarity index 100% rename from spring-boot/src/main/resources/templates/error.html rename to spring-boot-modules/spring-boot/src/main/resources/templates/error.html diff --git a/spring-boot/src/main/resources/public/error/404.html b/spring-boot-modules/spring-boot/src/main/resources/templates/error/404.html similarity index 94% rename from spring-boot/src/main/resources/public/error/404.html rename to spring-boot-modules/spring-boot/src/main/resources/templates/error/404.html index 02d6092bee..df83ce219b 100644 --- a/spring-boot/src/main/resources/public/error/404.html +++ b/spring-boot-modules/spring-boot/src/main/resources/templates/error/404.html @@ -1,8 +1,8 @@ - - - RESOURCE NOT FOUND - - -

404 RESOURCE NOT FOUND

- + + + RESOURCE NOT FOUND + + +

404 RESOURCE NOT FOUND

+ \ No newline at end of file diff --git a/spring-boot/src/main/resources/templates/external.html b/spring-boot-modules/spring-boot/src/main/resources/templates/external.html similarity index 100% rename from spring-boot/src/main/resources/templates/external.html rename to spring-boot-modules/spring-boot/src/main/resources/templates/external.html diff --git a/spring-boot/src/main/resources/templates/index.html b/spring-boot-modules/spring-boot/src/main/resources/templates/index.html similarity index 100% rename from spring-boot/src/main/resources/templates/index.html rename to spring-boot-modules/spring-boot/src/main/resources/templates/index.html diff --git a/spring-boot/src/main/resources/templates/international.html b/spring-boot-modules/spring-boot/src/main/resources/templates/international.html similarity index 100% rename from spring-boot/src/main/resources/templates/international.html rename to spring-boot-modules/spring-boot/src/main/resources/templates/international.html diff --git a/spring-boot/src/main/resources/templates/layout.html b/spring-boot-modules/spring-boot/src/main/resources/templates/layout.html similarity index 100% rename from spring-boot/src/main/resources/templates/layout.html rename to spring-boot-modules/spring-boot/src/main/resources/templates/layout.html diff --git a/spring-boot/src/main/resources/templates/other.html b/spring-boot-modules/spring-boot/src/main/resources/templates/other.html similarity index 100% rename from spring-boot/src/main/resources/templates/other.html rename to spring-boot-modules/spring-boot/src/main/resources/templates/other.html diff --git a/spring-boot/src/main/resources/templates/utils.html b/spring-boot-modules/spring-boot/src/main/resources/templates/utils.html similarity index 100% rename from spring-boot/src/main/resources/templates/utils.html rename to spring-boot-modules/spring-boot/src/main/resources/templates/utils.html diff --git a/spring-boot/src/main/webapp/WEB-INF/context.xml b/spring-boot-modules/spring-boot/src/main/webapp/WEB-INF/context.xml similarity index 100% rename from spring-boot/src/main/webapp/WEB-INF/context.xml rename to spring-boot-modules/spring-boot/src/main/webapp/WEB-INF/context.xml diff --git a/spring-boot/src/main/webapp/WEB-INF/dispatcher.xml b/spring-boot-modules/spring-boot/src/main/webapp/WEB-INF/dispatcher.xml similarity index 100% rename from spring-boot/src/main/webapp/WEB-INF/dispatcher.xml rename to spring-boot-modules/spring-boot/src/main/webapp/WEB-INF/dispatcher.xml diff --git a/spring-boot/src/main/webapp/WEB-INF/web.xml b/spring-boot-modules/spring-boot/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from spring-boot/src/main/webapp/WEB-INF/web.xml rename to spring-boot-modules/spring-boot/src/main/webapp/WEB-INF/web.xml diff --git a/spring-boot/src/main/webapp/annotationservlet.jsp b/spring-boot-modules/spring-boot/src/main/webapp/annotationservlet.jsp similarity index 100% rename from spring-boot/src/main/webapp/annotationservlet.jsp rename to spring-boot-modules/spring-boot/src/main/webapp/annotationservlet.jsp diff --git a/spring-boot/src/main/webapp/index.jsp b/spring-boot-modules/spring-boot/src/main/webapp/index.jsp similarity index 100% rename from spring-boot/src/main/webapp/index.jsp rename to spring-boot-modules/spring-boot/src/main/webapp/index.jsp diff --git a/spring-boot/src/test/java/com/baeldung/annotation/servletcomponentscan/SpringBootWithServletComponentIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/annotation/servletcomponentscan/SpringBootWithServletComponentIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/annotation/servletcomponentscan/SpringBootWithServletComponentIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/annotation/servletcomponentscan/SpringBootWithServletComponentIntegrationTest.java diff --git a/spring-boot/src/test/java/com/baeldung/annotation/servletcomponentscan/SpringBootWithoutServletComponentIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/annotation/servletcomponentscan/SpringBootWithoutServletComponentIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/annotation/servletcomponentscan/SpringBootWithoutServletComponentIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/annotation/servletcomponentscan/SpringBootWithoutServletComponentIntegrationTest.java diff --git a/spring-boot/src/test/java/com/baeldung/beanvalidation/application/UserControllerIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/beanvalidation/application/UserControllerIntegrationTest.java similarity index 88% rename from spring-boot/src/test/java/com/baeldung/beanvalidation/application/UserControllerIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/beanvalidation/application/UserControllerIntegrationTest.java index 07d9b0807e..21fcaf922c 100644 --- a/spring-boot/src/test/java/com/baeldung/beanvalidation/application/UserControllerIntegrationTest.java +++ b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/beanvalidation/application/UserControllerIntegrationTest.java @@ -1,70 +1,71 @@ -package com.baeldung.beanvalidation.application; - -import com.baeldung.beanvalidation.application.controllers.UserController; -import com.baeldung.beanvalidation.application.repositories.UserRepository; - -import java.nio.charset.Charset; -import static org.assertj.core.api.Assertions.assertThat; -import org.hamcrest.core.Is; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; -import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; -import org.springframework.boot.test.mock.mockito.MockBean; -import org.springframework.http.MediaType; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; -import org.springframework.test.web.servlet.result.MockMvcResultMatchers; - -@RunWith(SpringRunner.class) -@WebMvcTest -@AutoConfigureMockMvc -public class UserControllerIntegrationTest { - - @MockBean - private UserRepository userRepository; - - @Autowired - UserController userController; - - @Autowired - private MockMvc mockMvc; - - @Test - public void whenUserControllerInjected_thenNotNull() throws Exception { - assertThat(userController).isNotNull(); - } - - @Test - public void whenGetRequestToUsers_thenCorrectResponse() throws Exception { - mockMvc.perform(MockMvcRequestBuilders.get("/users") - .contentType(MediaType.APPLICATION_JSON_UTF8)) - .andExpect(MockMvcResultMatchers.status().isOk()) - .andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON_UTF8)); - - } - - @Test - public void whenPostRequestToUsersAndValidUser_thenCorrectResponse() throws Exception { - MediaType textPlainUtf8 = new MediaType(MediaType.TEXT_PLAIN, Charset.forName("UTF-8")); - String user = "{\"name\": \"bob\", \"email\" : \"bob@domain.com\"}"; - mockMvc.perform(MockMvcRequestBuilders.post("/users") - .content(user) - .contentType(MediaType.APPLICATION_JSON_UTF8)) - .andExpect(MockMvcResultMatchers.status().isOk()) - .andExpect(MockMvcResultMatchers.content().contentType(textPlainUtf8)); - } - - @Test - public void whenPostRequestToUsersAndInValidUser_thenCorrectReponse() throws Exception { - String user = "{\"name\": \"\", \"email\" : \"bob@domain.com\"}"; - mockMvc.perform(MockMvcRequestBuilders.post("/users") - .content(user) - .contentType(MediaType.APPLICATION_JSON_UTF8)) - .andExpect(MockMvcResultMatchers.status().isBadRequest()) - .andExpect(MockMvcResultMatchers.jsonPath("$.name", Is.is("Name is mandatory"))) - .andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON_UTF8)); - } -} +package com.baeldung.beanvalidation.application; + +import com.baeldung.beanvalidation.application.controllers.UserController; +import com.baeldung.beanvalidation.application.repositories.UserRepository; +import org.hamcrest.core.Is; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.http.MediaType; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; +import org.springframework.test.web.servlet.result.MockMvcResultMatchers; + +import java.nio.charset.Charset; + +import static org.assertj.core.api.Assertions.assertThat; + +@RunWith(SpringRunner.class) +@WebMvcTest +@AutoConfigureMockMvc +public class UserControllerIntegrationTest { + + @MockBean + private UserRepository userRepository; + + @Autowired + UserController userController; + + @Autowired + private MockMvc mockMvc; + + @Test + public void whenUserControllerInjected_thenNotNull() throws Exception { + assertThat(userController).isNotNull(); + } + + @Test + public void whenGetRequestToUsers_thenCorrectResponse() throws Exception { + mockMvc.perform(MockMvcRequestBuilders.get("/users") + .contentType(MediaType.APPLICATION_JSON)) + .andExpect(MockMvcResultMatchers.status().isOk()) + .andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON)); + + } + + @Test + public void whenPostRequestToUsersAndValidUser_thenCorrectResponse() throws Exception { + MediaType textPlainUtf8 = new MediaType(MediaType.TEXT_PLAIN, Charset.forName("UTF-8")); + String user = "{\"name\": \"bob\", \"email\" : \"bob@domain.com\"}"; + mockMvc.perform(MockMvcRequestBuilders.post("/users") + .content(user) + .contentType(MediaType.APPLICATION_JSON)) + .andExpect(MockMvcResultMatchers.status().isOk()) + .andExpect(MockMvcResultMatchers.content().contentType(textPlainUtf8)); + } + + @Test + public void whenPostRequestToUsersAndInValidUser_thenCorrectReponse() throws Exception { + String user = "{\"name\": \"\", \"email\" : \"bob@domain.com\"}"; + mockMvc.perform(MockMvcRequestBuilders.post("/users") + .content(user) + .contentType(MediaType.APPLICATION_JSON)) + .andExpect(MockMvcResultMatchers.status().isBadRequest()) + .andExpect(MockMvcResultMatchers.jsonPath("$.name", Is.is("Name is mandatory"))) + .andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON)); + } +} diff --git a/spring-boot-modules/spring-boot/src/test/java/com/baeldung/buildproperties/BuildInfoServiceIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/buildproperties/BuildInfoServiceIntegrationTest.java new file mode 100644 index 0000000000..cb056fe56d --- /dev/null +++ b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/buildproperties/BuildInfoServiceIntegrationTest.java @@ -0,0 +1,24 @@ +package com.baeldung.buildproperties; + +import static org.junit.Assert.assertThat; + +import org.hamcrest.Matchers; +import org.junit.jupiter.api.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = Application.class) +class BuildInfoServiceIntegrationTest { + + @Autowired + private BuildInfoService service; + + @Test + void whenGetApplicationDescription_thenSuccess() { + assertThat(service.getApplicationDescription(), Matchers.is("This is simple boot application for Spring boot actuator test")); + assertThat(service.getApplicationVersion(), Matchers.is("0.0.1-SNAPSHOT")); + } +} diff --git a/spring-boot/src/test/java/com/baeldung/displayallbeans/DisplayBeanIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/displayallbeans/DisplayBeanIntegrationTest.java similarity index 97% rename from spring-boot/src/test/java/com/baeldung/displayallbeans/DisplayBeanIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/displayallbeans/DisplayBeanIntegrationTest.java index e933920a96..f08a755fc7 100644 --- a/spring-boot/src/test/java/com/baeldung/displayallbeans/DisplayBeanIntegrationTest.java +++ b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/displayallbeans/DisplayBeanIntegrationTest.java @@ -1,101 +1,101 @@ -package com.baeldung.displayallbeans; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.BDDAssertions.then; - -import java.net.URI; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; -import java.util.Map; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.actuate.beans.BeansEndpoint.ContextBeans; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.test.web.client.TestRestTemplate; -import org.springframework.boot.web.server.LocalServerPort; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.RequestEntity; -import org.springframework.http.ResponseEntity; -import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.web.context.WebApplicationContext; - -@RunWith(SpringRunner.class) -@SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -@TestPropertySource(properties = { "management.port=0", "management.endpoints.web.exposure.include=*" }) -public class DisplayBeanIntegrationTest { - - @LocalServerPort - private int port; - - @Value("${local.management.port}") - private int mgt; - - @Autowired - private TestRestTemplate testRestTemplate; - - @Autowired - private WebApplicationContext context; - - private static final String ACTUATOR_PATH = "/actuator"; - - @Test - public void givenRestTemplate_whenAccessServerUrl_thenHttpStatusOK() throws Exception { - ResponseEntity entity = this.testRestTemplate.getForEntity("http://localhost:" + this.port + "/displayallbeans", String.class); - - then(entity.getStatusCode()).isEqualTo(HttpStatus.OK); - } - - @Test - public void givenRestTemplate_whenAccessEndpointUrl_thenHttpStatusOK() throws Exception { - ParameterizedTypeReference> responseType = new ParameterizedTypeReference>() { - }; - RequestEntity requestEntity = RequestEntity.get(new URI("http://localhost:" + this.mgt + ACTUATOR_PATH + "/beans")) - .accept(MediaType.APPLICATION_JSON) - .build(); - ResponseEntity> entity = this.testRestTemplate.exchange(requestEntity, responseType); - - then(entity.getStatusCode()).isEqualTo(HttpStatus.OK); - } - - @Test - public void givenRestTemplate_whenAccessEndpointUrl_thenReturnsBeanNames() throws Exception { - RequestEntity requestEntity = RequestEntity.get(new URI("http://localhost:" + this.mgt + ACTUATOR_PATH + "/beans")) - .accept(MediaType.APPLICATION_JSON) - .build(); - ResponseEntity entity = this.testRestTemplate.exchange(requestEntity, BeanActuatorResponse.class); - - Collection beanNamesList = entity.getBody() - .getBeans(); - - assertThat(beanNamesList).contains("fooController", "fooService"); - } - - @Test - public void givenWebApplicationContext_whenAccessGetBeanDefinitionNames_thenReturnsBeanNames() throws Exception { - String[] beanNames = context.getBeanDefinitionNames(); - - List beanNamesList = Arrays.asList(beanNames); - assertThat(beanNamesList).contains("fooController", "fooService"); - } - - private static class BeanActuatorResponse { - private Map>>> contexts; - - public Collection getBeans() { - return this.contexts.get("application") - .get("beans") - .keySet(); - } - - public Map>>> getContexts() { - return contexts; - } - } -} +package com.baeldung.displayallbeans; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.BDDAssertions.then; + +import java.net.URI; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; +import java.util.Map; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.actuate.beans.BeansEndpoint.ContextBeans; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.web.client.TestRestTemplate; +import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.core.ParameterizedTypeReference; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.RequestEntity; +import org.springframework.http.ResponseEntity; +import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.web.context.WebApplicationContext; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) +@TestPropertySource(properties = { "management.port=0", "management.endpoints.web.exposure.include=*" }) +public class DisplayBeanIntegrationTest { + + @LocalServerPort + private int port; + + @Value("${local.management.port}") + private int mgt; + + @Autowired + private TestRestTemplate testRestTemplate; + + @Autowired + private WebApplicationContext context; + + private static final String ACTUATOR_PATH = "/actuator"; + + @Test + public void givenRestTemplate_whenAccessServerUrl_thenHttpStatusOK() throws Exception { + ResponseEntity entity = this.testRestTemplate.getForEntity("http://localhost:" + this.port + "/displayallbeans", String.class); + + then(entity.getStatusCode()).isEqualTo(HttpStatus.OK); + } + + @Test + public void givenRestTemplate_whenAccessEndpointUrl_thenHttpStatusOK() throws Exception { + ParameterizedTypeReference> responseType = new ParameterizedTypeReference>() { + }; + RequestEntity requestEntity = RequestEntity.get(new URI("http://localhost:" + this.mgt + ACTUATOR_PATH + "/beans")) + .accept(MediaType.APPLICATION_JSON) + .build(); + ResponseEntity> entity = this.testRestTemplate.exchange(requestEntity, responseType); + + then(entity.getStatusCode()).isEqualTo(HttpStatus.OK); + } + + @Test + public void givenRestTemplate_whenAccessEndpointUrl_thenReturnsBeanNames() throws Exception { + RequestEntity requestEntity = RequestEntity.get(new URI("http://localhost:" + this.mgt + ACTUATOR_PATH + "/beans")) + .accept(MediaType.APPLICATION_JSON) + .build(); + ResponseEntity entity = this.testRestTemplate.exchange(requestEntity, BeanActuatorResponse.class); + + Collection beanNamesList = entity.getBody() + .getBeans(); + + assertThat(beanNamesList).contains("fooController", "fooService"); + } + + @Test + public void givenWebApplicationContext_whenAccessGetBeanDefinitionNames_thenReturnsBeanNames() throws Exception { + String[] beanNames = context.getBeanDefinitionNames(); + + List beanNamesList = Arrays.asList(beanNames); + assertThat(beanNamesList).contains("fooController", "fooService"); + } + + private static class BeanActuatorResponse { + private Map>>> contexts; + + public Collection getBeans() { + return this.contexts.get("application") + .get("beans") + .keySet(); + } + + public Map>>> getContexts() { + return contexts; + } + } +} diff --git a/spring-boot/src/test/java/com/baeldung/failureanalyzer/FailureAnalyzerAppIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/failureanalyzer/FailureAnalyzerAppIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/failureanalyzer/FailureAnalyzerAppIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/failureanalyzer/FailureAnalyzerAppIntegrationTest.java diff --git a/spring-boot/src/test/java/com/baeldung/failureanalyzer/utils/ListAppender.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/failureanalyzer/utils/ListAppender.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/failureanalyzer/utils/ListAppender.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/failureanalyzer/utils/ListAppender.java diff --git a/spring-boot/src/test/java/com/baeldung/intro/AppLiveTest.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/intro/AppLiveTest.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/intro/AppLiveTest.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/intro/AppLiveTest.java diff --git a/spring-boot/src/test/java/com/baeldung/jsondateformat/ContactAppUnitTest.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/jsondateformat/ContactAppUnitTest.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/jsondateformat/ContactAppUnitTest.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/jsondateformat/ContactAppUnitTest.java diff --git a/spring-boot/src/test/java/com/baeldung/jsondateformat/ContactAppWithObjectMapperCustomizerUnitTest.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/jsondateformat/ContactAppWithObjectMapperCustomizerUnitTest.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/jsondateformat/ContactAppWithObjectMapperCustomizerUnitTest.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/jsondateformat/ContactAppWithObjectMapperCustomizerUnitTest.java diff --git a/spring-boot/src/test/java/com/baeldung/kong/KongAdminAPILiveTest.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/kong/KongAdminAPILiveTest.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/kong/KongAdminAPILiveTest.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/kong/KongAdminAPILiveTest.java diff --git a/spring-boot/src/test/java/com/baeldung/kong/KongLoadBalanceLiveTest.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/kong/KongLoadBalanceLiveTest.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/kong/KongLoadBalanceLiveTest.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/kong/KongLoadBalanceLiveTest.java diff --git a/spring-boot/src/test/java/com/baeldung/kong/domain/APIObject.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/kong/domain/APIObject.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/kong/domain/APIObject.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/kong/domain/APIObject.java diff --git a/spring-boot/src/test/java/com/baeldung/kong/domain/ConsumerObject.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/kong/domain/ConsumerObject.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/kong/domain/ConsumerObject.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/kong/domain/ConsumerObject.java diff --git a/spring-boot/src/test/java/com/baeldung/kong/domain/KeyAuthObject.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/kong/domain/KeyAuthObject.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/kong/domain/KeyAuthObject.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/kong/domain/KeyAuthObject.java diff --git a/spring-boot/src/test/java/com/baeldung/kong/domain/PluginObject.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/kong/domain/PluginObject.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/kong/domain/PluginObject.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/kong/domain/PluginObject.java diff --git a/spring-boot/src/test/java/com/baeldung/kong/domain/TargetObject.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/kong/domain/TargetObject.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/kong/domain/TargetObject.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/kong/domain/TargetObject.java diff --git a/spring-boot/src/test/java/com/baeldung/kong/domain/UpstreamObject.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/kong/domain/UpstreamObject.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/kong/domain/UpstreamObject.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/kong/domain/UpstreamObject.java diff --git a/spring-boot/src/test/java/com/baeldung/servletinitializer/WarInitializerApplicationIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/servletinitializer/WarInitializerApplicationIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/servletinitializer/WarInitializerApplicationIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/servletinitializer/WarInitializerApplicationIntegrationTest.java diff --git a/spring-boot/src/test/java/com/baeldung/toggle/ToggleIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/toggle/ToggleIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/toggle/ToggleIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/toggle/ToggleIntegrationTest.java diff --git a/spring-boot/src/test/java/com/baeldung/utils/UtilsControllerIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/com/baeldung/utils/UtilsControllerIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/com/baeldung/utils/UtilsControllerIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/com/baeldung/utils/UtilsControllerIntegrationTest.java diff --git a/spring-boot/src/test/java/org/baeldung/boot/ApplicationIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/org/baeldung/boot/ApplicationIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/org/baeldung/boot/ApplicationIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/org/baeldung/boot/ApplicationIntegrationTest.java diff --git a/spring-boot/src/test/java/org/baeldung/boot/DemoApplicationIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/org/baeldung/boot/DemoApplicationIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/org/baeldung/boot/DemoApplicationIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/org/baeldung/boot/DemoApplicationIntegrationTest.java diff --git a/spring-boot/src/test/java/org/baeldung/boot/repository/FooRepositoryIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/org/baeldung/boot/repository/FooRepositoryIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/org/baeldung/boot/repository/FooRepositoryIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/org/baeldung/boot/repository/FooRepositoryIntegrationTest.java diff --git a/spring-boot/src/test/java/org/baeldung/boot/repository/HibernateSessionIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/org/baeldung/boot/repository/HibernateSessionIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/org/baeldung/boot/repository/HibernateSessionIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/org/baeldung/boot/repository/HibernateSessionIntegrationTest.java diff --git a/spring-boot/src/test/java/org/baeldung/boot/repository/NoHibernateSessionIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/org/baeldung/boot/repository/NoHibernateSessionIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/org/baeldung/boot/repository/NoHibernateSessionIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/org/baeldung/boot/repository/NoHibernateSessionIntegrationTest.java diff --git a/spring-boot/src/test/java/org/baeldung/converter/CustomConverterIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/org/baeldung/converter/CustomConverterIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/org/baeldung/converter/CustomConverterIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/org/baeldung/converter/CustomConverterIntegrationTest.java diff --git a/spring-boot/src/test/java/org/baeldung/converter/controller/StringToEmployeeConverterControllerIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/org/baeldung/converter/controller/StringToEmployeeConverterControllerIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/org/baeldung/converter/controller/StringToEmployeeConverterControllerIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/org/baeldung/converter/controller/StringToEmployeeConverterControllerIntegrationTest.java diff --git a/spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeControllerIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeControllerIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeControllerIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeControllerIntegrationTest.java diff --git a/spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeRepositoryIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeRepositoryIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeRepositoryIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeRepositoryIntegrationTest.java diff --git a/spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeRestControllerIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeRestControllerIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeRestControllerIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeRestControllerIntegrationTest.java diff --git a/spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeServiceImplIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeServiceImplIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeServiceImplIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/org/baeldung/demo/boottest/EmployeeServiceImplIntegrationTest.java diff --git a/spring-boot/src/test/java/org/baeldung/demo/boottest/JsonUtil.java b/spring-boot-modules/spring-boot/src/test/java/org/baeldung/demo/boottest/JsonUtil.java similarity index 100% rename from spring-boot/src/test/java/org/baeldung/demo/boottest/JsonUtil.java rename to spring-boot-modules/spring-boot/src/test/java/org/baeldung/demo/boottest/JsonUtil.java diff --git a/spring-boot/src/test/java/org/baeldung/repository/UserRepositoryIntegrationTest.java b/spring-boot-modules/spring-boot/src/test/java/org/baeldung/repository/UserRepositoryIntegrationTest.java similarity index 100% rename from spring-boot/src/test/java/org/baeldung/repository/UserRepositoryIntegrationTest.java rename to spring-boot-modules/spring-boot/src/test/java/org/baeldung/repository/UserRepositoryIntegrationTest.java diff --git a/spring-boot/src/test/resources/application-integrationtest.properties b/spring-boot-modules/spring-boot/src/test/resources/application-integrationtest.properties similarity index 100% rename from spring-boot/src/test/resources/application-integrationtest.properties rename to spring-boot-modules/spring-boot/src/test/resources/application-integrationtest.properties diff --git a/spring-boot/src/test/resources/application.properties b/spring-boot-modules/spring-boot/src/test/resources/application.properties similarity index 100% rename from spring-boot/src/test/resources/application.properties rename to spring-boot-modules/spring-boot/src/test/resources/application.properties diff --git a/spring-boot/src/test/resources/conversion.properties b/spring-boot-modules/spring-boot/src/test/resources/conversion.properties similarity index 100% rename from spring-boot/src/test/resources/conversion.properties rename to spring-boot-modules/spring-boot/src/test/resources/conversion.properties diff --git a/spring-boot/src/test/resources/exception-hibernate.properties b/spring-boot-modules/spring-boot/src/test/resources/exception-hibernate.properties similarity index 100% rename from spring-boot/src/test/resources/exception-hibernate.properties rename to spring-boot-modules/spring-boot/src/test/resources/exception-hibernate.properties diff --git a/spring-boot/src/test/resources/exception.properties b/spring-boot-modules/spring-boot/src/test/resources/exception.properties similarity index 100% rename from spring-boot/src/test/resources/exception.properties rename to spring-boot-modules/spring-boot/src/test/resources/exception.properties diff --git a/spring-boot/src/test/resources/import.sql b/spring-boot-modules/spring-boot/src/test/resources/import.sql similarity index 100% rename from spring-boot/src/test/resources/import.sql rename to spring-boot-modules/spring-boot/src/test/resources/import.sql diff --git a/spring-boot/src/test/resources/logback-test.xml b/spring-boot-modules/spring-boot/src/test/resources/logback-test.xml similarity index 100% rename from spring-boot/src/test/resources/logback-test.xml rename to spring-boot-modules/spring-boot/src/test/resources/logback-test.xml diff --git a/spring-boot/src/test/resources/org/baeldung/boot/expected.json b/spring-boot-modules/spring-boot/src/test/resources/org/baeldung/boot/expected.json similarity index 100% rename from spring-boot/src/test/resources/org/baeldung/boot/expected.json rename to spring-boot-modules/spring-boot/src/test/resources/org/baeldung/boot/expected.json diff --git a/spring-boot-parent/spring-boot-with-custom-parent/pom.xml b/spring-boot-parent/spring-boot-with-custom-parent/pom.xml index 8a55f252d6..1eb4255c7e 100644 --- a/spring-boot-parent/spring-boot-with-custom-parent/pom.xml +++ b/spring-boot-parent/spring-boot-with-custom-parent/pom.xml @@ -11,6 +11,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT + ../../parent-boot-2 diff --git a/spring-boot-parent/spring-boot-with-starter-parent/pom.xml b/spring-boot-parent/spring-boot-with-starter-parent/pom.xml index ed2cb8646c..05c61fc4cc 100644 --- a/spring-boot-parent/spring-boot-with-starter-parent/pom.xml +++ b/spring-boot-parent/spring-boot-with-starter-parent/pom.xml @@ -9,10 +9,10 @@ spring-boot-with-starter-parent - org.springframework.boot - spring-boot-starter-parent - 2.1.5.RELEASE - + com.baeldung + parent-boot-2 + 0.0.1-SNAPSHOT + ../../parent-boot-2 @@ -38,7 +38,7 @@ 1.8 - 2.1.1.RELEASE + 2.1.5.RELEASE 4.11 diff --git a/spring-boot-rest/README.md b/spring-boot-rest/README.md index 3909a99c65..f78c88d30b 100644 --- a/spring-boot-rest/README.md +++ b/spring-boot-rest/README.md @@ -10,7 +10,6 @@ This module contains articles about Spring Boot RESTful APIs. - [Testing REST with multiple MIME types](https://www.baeldung.com/testing-rest-api-with-multiple-media-types) - [Testing Web APIs with Postman Collections](https://www.baeldung.com/postman-testing-collections) - [Spring Boot Consuming and Producing JSON](https://www.baeldung.com/spring-boot-json) -- [Error Handling for REST with Spring](https://www.baeldung.com/exception-handling-for-rest-with-spring) ### E-book @@ -26,3 +25,6 @@ These articles are part of the Spring REST E-book: 8. [An Intro to Spring HATEOAS](https://www.baeldung.com/spring-hateoas-tutorial) 9. [REST Pagination in Spring](https://www.baeldung.com/rest-api-pagination-in-spring) 10. [Test a REST API with Java](https://www.baeldung.com/integration-testing-a-rest-api) + +NOTE: +Since this is a module tied to an e-book, it should not be moved or used to store the code for any further article. diff --git a/spring-boot-rest/pom.xml b/spring-boot-rest/pom.xml index 10dacf99e8..2483aab6be 100644 --- a/spring-boot-rest/pom.xml +++ b/spring-boot-rest/pom.xml @@ -95,6 +95,7 @@ 27.0.1-jre 1.4.11.1 2.3.5 + 2.1.9.RELEASE diff --git a/spring-boot-rest/src/main/java/com/baeldung/spring/WebConfig.java b/spring-boot-rest/src/main/java/com/baeldung/spring/WebConfig.java index ab16b61e1d..13a9933fa6 100644 --- a/spring-boot-rest/src/main/java/com/baeldung/spring/WebConfig.java +++ b/spring-boot-rest/src/main/java/com/baeldung/spring/WebConfig.java @@ -14,8 +14,6 @@ import org.springframework.web.filter.ShallowEtagHeaderFilter; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @Configuration -// If we want to enable xml configurations for message-converter: -// @ImportResource("classpath:WEB-INF/api-servlet.xml") public class WebConfig implements WebMvcConfigurer { // @Override diff --git a/spring-boot-rest/src/main/resources/WEB-INF/api-servlet.xml b/spring-boot-rest/src/main/resources/WEB-INF/api-servlet.xml deleted file mode 100644 index 78e38e1448..0000000000 --- a/spring-boot-rest/src/main/resources/WEB-INF/api-servlet.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-boot-rest/src/test/java/com/baeldung/springhateoas/CustomerControllerIntegrationTest.java b/spring-boot-rest/src/test/java/com/baeldung/springhateoas/CustomerControllerIntegrationTest.java index b08da6d2cd..644ce5132a 100644 --- a/spring-boot-rest/src/test/java/com/baeldung/springhateoas/CustomerControllerIntegrationTest.java +++ b/spring-boot-rest/src/test/java/com/baeldung/springhateoas/CustomerControllerIntegrationTest.java @@ -70,7 +70,7 @@ public class CustomerControllerIntegrationTest { this.mvc.perform(get("/customers/" + DEFAULT_CUSTOMER_ID + "/orders").accept(MediaTypes.HAL_JSON_VALUE)) .andExpect(status().isOk()) - .andExpect(jsonPath("$._embedded.orderList[0]._links.self.href", + .andExpect(jsonPath("$._embedded.orders[0]._links.self.href", is("http://localhost/customers/customer1/order1"))) .andExpect(jsonPath("$._links.self.href", is("http://localhost/customers/customer1/orders"))); } @@ -89,8 +89,8 @@ public class CustomerControllerIntegrationTest { this.mvc.perform(get("/customers/").accept(MediaTypes.HAL_JSON_VALUE)) .andExpect(status().isOk()) .andExpect( - jsonPath("$._embedded.customerList[0]._links.self.href", is("http://localhost/customers/customer1"))) - .andExpect(jsonPath("$._embedded.customerList[0]._links.allOrders.href", + jsonPath("$._embedded.customers[0]._links.self.href", is("http://localhost/customers/customer1"))) + .andExpect(jsonPath("$._embedded.customers[0]._links.allOrders.href", is("http://localhost/customers/customer1/orders"))) .andExpect(jsonPath("$._links.self.href", is("http://localhost/customers"))); } diff --git a/spring-boot-security/src/main/resources/logback.xml b/spring-boot-security/src/main/resources/logback.xml deleted file mode 100644 index 7d900d8ea8..0000000000 --- a/spring-boot-security/src/main/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - \ No newline at end of file diff --git a/spring-boot-testing/.mvn/wrapper/maven-wrapper.jar b/spring-boot-testing/.mvn/wrapper/maven-wrapper.jar deleted file mode 100644 index 9cc84ea9b4..0000000000 Binary files a/spring-boot-testing/.mvn/wrapper/maven-wrapper.jar and /dev/null differ diff --git a/spring-boot-vue/src/main/resources/logback.xml b/spring-boot-vue/src/main/resources/logback.xml deleted file mode 100644 index 7d900d8ea8..0000000000 --- a/spring-boot-vue/src/main/resources/logback.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - \ No newline at end of file diff --git a/spring-boot/.factorypath b/spring-boot/.factorypath deleted file mode 100644 index 22b8a1ce95..0000000000 --- a/spring-boot/.factorypath +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/spring-boot/src/main/java/com/baeldung/git/README.md b/spring-boot/src/main/java/com/baeldung/git/README.md deleted file mode 100644 index 7e6a597c28..0000000000 --- a/spring-boot/src/main/java/com/baeldung/git/README.md +++ /dev/null @@ -1,2 +0,0 @@ -### Relevant Articles: -- [Injecting Git Information Into Spring](http://www.baeldung.com/spring-git-information) diff --git a/spring-boot/src/test/java/com/baeldung/beandefinitionoverrideexception/SpringBootBeanDefinitionOverrideExceptionIntegrationTest.java b/spring-boot/src/test/java/com/baeldung/beandefinitionoverrideexception/SpringBootBeanDefinitionOverrideExceptionIntegrationTest.java new file mode 100644 index 0000000000..c900bab26c --- /dev/null +++ b/spring-boot/src/test/java/com/baeldung/beandefinitionoverrideexception/SpringBootBeanDefinitionOverrideExceptionIntegrationTest.java @@ -0,0 +1,26 @@ +package com.baeldung.beandefinitionoverrideexception; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.context.ApplicationContext; +import org.springframework.test.context.junit4.SpringRunner; + +import static org.assertj.core.api.Assertions.assertThat; + + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = {TestConfiguration1.class, TestConfiguration2.class}, properties = {"spring.main.allow-bean-definition-overriding=true"}) +public class SpringBootBeanDefinitionOverrideExceptionIntegrationTest { + + @Autowired + private ApplicationContext applicationContext; + + @Test + public void whenBeanOverridingAllowed_thenTestBean2OverridesTestBean1() { + Object testBean = applicationContext.getBean("testBean"); + + assertThat(testBean.getClass()).isEqualTo(TestConfiguration2.TestBean2.class); + } +} diff --git a/spring-boot/src/test/java/com/baeldung/beandefinitionoverrideexception/TestConfiguration1.java b/spring-boot/src/test/java/com/baeldung/beandefinitionoverrideexception/TestConfiguration1.java new file mode 100644 index 0000000000..a0e8ea3028 --- /dev/null +++ b/spring-boot/src/test/java/com/baeldung/beandefinitionoverrideexception/TestConfiguration1.java @@ -0,0 +1,27 @@ +package com.baeldung.beandefinitionoverrideexception; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class TestConfiguration1 { + + class TestBean1 { + + private String name; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + } + + @Bean + public TestBean1 testBean() { + return new TestBean1(); + } + +} diff --git a/spring-boot/src/test/java/com/baeldung/beandefinitionoverrideexception/TestConfiguration2.java b/spring-boot/src/test/java/com/baeldung/beandefinitionoverrideexception/TestConfiguration2.java new file mode 100644 index 0000000000..842b84c866 --- /dev/null +++ b/spring-boot/src/test/java/com/baeldung/beandefinitionoverrideexception/TestConfiguration2.java @@ -0,0 +1,28 @@ +package com.baeldung.beandefinitionoverrideexception; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class TestConfiguration2 { + + class TestBean2 { + + private String name; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + } + + @Bean + public TestBean2 testBean() { + return new TestBean2(); + } + +} diff --git a/spring-cloud/spring-cloud-kubernetes/kubernetes-guide/client-service/pom.xml b/spring-cloud/spring-cloud-kubernetes/kubernetes-guide/client-service/pom.xml index e5f76d5d9c..07de78a92e 100644 --- a/spring-cloud/spring-cloud-kubernetes/kubernetes-guide/client-service/pom.xml +++ b/spring-cloud/spring-cloud-kubernetes/kubernetes-guide/client-service/pom.xml @@ -89,7 +89,7 @@ - Finchley.SR2 + Hoxton.SR1 1.0.0.RELEASE diff --git a/spring-cloud/spring-cloud-zuul/pom.xml b/spring-cloud/spring-cloud-zuul/pom.xml index b1f2e886de..e0a63ae00b 100644 --- a/spring-cloud/spring-cloud-zuul/pom.xml +++ b/spring-cloud/spring-cloud-zuul/pom.xml @@ -19,6 +19,7 @@ spring-zuul-foos-resource spring-zuul-ui spring-zuul-rate-limiting + spring-zuul-post-filter
diff --git a/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/.gitignore b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/.gitignore new file mode 100644 index 0000000000..0af075f75a --- /dev/null +++ b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/.gitignore @@ -0,0 +1,2 @@ +target/* +*.iml diff --git a/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/pom.xml b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/pom.xml new file mode 100644 index 0000000000..c13aeb890e --- /dev/null +++ b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/pom.xml @@ -0,0 +1,25 @@ + + + + spring-cloud-zuul + com.baeldung.spring.cloud + 0.0.1-SNAPSHOT + + 4.0.0 + spring-zuul-post-filter + + + Hoxton.SR1 + + + + + org.springframework.cloud + spring-cloud-starter-netflix-zuul + + + + + \ No newline at end of file diff --git a/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/main/java/com/baeldung/ZuulPostFilterApplication.java b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/main/java/com/baeldung/ZuulPostFilterApplication.java new file mode 100644 index 0000000000..c9aad4e08d --- /dev/null +++ b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/main/java/com/baeldung/ZuulPostFilterApplication.java @@ -0,0 +1,14 @@ +package com.baeldung; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.netflix.zuul.EnableZuulProxy; + +@SpringBootApplication +@EnableZuulProxy +public class ZuulPostFilterApplication { + + public static void main(String... args) { + SpringApplication.run(ZuulPostFilterApplication.class, args); + } +} diff --git a/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/main/java/com/baeldung/controllers/GreetingController.java b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/main/java/com/baeldung/controllers/GreetingController.java new file mode 100644 index 0000000000..bd21b098ab --- /dev/null +++ b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/main/java/com/baeldung/controllers/GreetingController.java @@ -0,0 +1,16 @@ +package com.baeldung.controllers; + +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; + +@Controller +@RequestMapping("/greeting") +public class GreetingController { + + @GetMapping("/simple") + public ResponseEntity getSimple() { + return ResponseEntity.ok("Hi"); + } +} diff --git a/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/main/java/com/baeldung/filters/ResponseLogFilter.java b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/main/java/com/baeldung/filters/ResponseLogFilter.java new file mode 100644 index 0000000000..e589e27d46 --- /dev/null +++ b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/main/java/com/baeldung/filters/ResponseLogFilter.java @@ -0,0 +1,58 @@ +package com.baeldung.filters; + +import com.google.common.io.CharStreams; +import com.netflix.zuul.ZuulFilter; +import com.netflix.zuul.context.RequestContext; +import com.netflix.zuul.exception.ZuulException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import java.io.InputStream; +import java.io.InputStreamReader; + +import static org.springframework.cloud.netflix.zuul.filters.support.FilterConstants.POST_TYPE; + +@Component +public class ResponseLogFilter extends ZuulFilter { + + private Logger logger = LoggerFactory.getLogger(ResponseLogFilter.class); + + @Override + public String filterType() { + return POST_TYPE; + } + + @Override + public int filterOrder() { + return 0; + } + + @Override + public boolean shouldFilter() { + return true; + } + + @Override + public Object run() throws ZuulException { + + RequestContext context = RequestContext.getCurrentContext(); + try (final InputStream responseDataStream = context.getResponseDataStream()) { + + if(responseDataStream == null) { + logger.info("BODY: {}", ""); + return null; + } + + String responseData = CharStreams.toString(new InputStreamReader(responseDataStream, "UTF-8")); + logger.info("BODY: {}", responseData); + + context.setResponseBody(responseData); + } + catch (Throwable e) { + e.printStackTrace(); + } + + return null; + } +} diff --git a/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/main/resources/application.yml b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/main/resources/application.yml new file mode 100644 index 0000000000..ebcc7c8be7 --- /dev/null +++ b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/main/resources/application.yml @@ -0,0 +1,11 @@ +server: + port: 8080 +zuul: + prefix: /api + routes: + greeting-service: + path: /greeting/** + url: forward:/greeting + foos-service: + path: /foos/** + url: http://localhost:8081/spring-zuul-foos-resource/foos \ No newline at end of file diff --git a/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/test/java/com/baeldung/ZuulPostFilterLiveTest.java b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/test/java/com/baeldung/ZuulPostFilterLiveTest.java new file mode 100644 index 0000000000..475508879e --- /dev/null +++ b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/src/test/java/com/baeldung/ZuulPostFilterLiveTest.java @@ -0,0 +1,30 @@ +package com.baeldung; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.web.client.TestRestTemplate; +import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.http.ResponseEntity; +import org.springframework.test.context.junit4.SpringRunner; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +@RunWith(SpringRunner.class) +@SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.DEFINED_PORT) +public class ZuulPostFilterLiveTest { + + @LocalServerPort + private int port; + private static final String SIMPLE_GREETING = "/api/greeting/simple"; + private TestRestTemplate restTemplate = new TestRestTemplate(); + + @Test + public void whenClientCallApi_thenLogAndReturnResponseBody() { + String url = "http://localhost:" + port + SIMPLE_GREETING; + ResponseEntity response = restTemplate.getForEntity(url, String.class); + assertTrue(response.getStatusCode().is2xxSuccessful()); + assertEquals(response.getBody(), "Hi"); + } +} diff --git a/spring-core-2/README.md b/spring-core-2/README.md index 0ed303162d..1fb591f693 100644 --- a/spring-core-2/README.md +++ b/spring-core-2/README.md @@ -16,5 +16,5 @@ This module contains articles about core Spring functionality - [Spring Null-Safety Annotations](https://www.baeldung.com/spring-null-safety-annotations) - [Using @Autowired in Abstract Classes](https://www.baeldung.com/spring-autowired-abstract-class) - [Guide to the Spring BeanFactory](https://www.baeldung.com/spring-beanfactory) -- [Read HttpServletRequest Multiple Times](https://www.baeldung.com/spring-reading-httpservletrequest-multiple-times) -- More articles: [[<-- prev]](/spring-core)[[next -->]](/spring-core-3) \ No newline at end of file +- [Reading HttpServletRequest Multiple Times in Spring](https://www.baeldung.com/spring-reading-httpservletrequest-multiple-times) +- More articles: [[<-- prev]](/spring-core)[[next -->]](/spring-core-3) diff --git a/spring-core-2/pom.xml b/spring-core-2/pom.xml index 78b94880d0..4d474d8b2c 100644 --- a/spring-core-2/pom.xml +++ b/spring-core-2/pom.xml @@ -203,7 +203,7 @@ com.baeldung.sample.App - 5.0.6.RELEASE + 5.2.2.RELEASE 1.3.2 5.2.5.Final diff --git a/spring-ejb/README.md b/spring-ejb/README.md index 423d55ea22..8f6522266c 100644 --- a/spring-ejb/README.md +++ b/spring-ejb/README.md @@ -8,5 +8,5 @@ This module contains articles about Spring with EJB - [Java EE Session Beans](https://www.baeldung.com/ejb-session-beans) - [A Guide to Message Driven Beans in EJB](https://www.baeldung.com/ejb-message-driven-beans) - [Integration Guide for Spring and EJB](https://www.baeldung.com/spring-ejb) -- [Singleton Session Bean in Java EE](https://www.baeldung.com/java-ee-singleton-session-bean) +- [Singleton Session Bean in Jakarta EE](https://www.baeldung.com/java-ee-singleton-session-bean) diff --git a/spring-jinq/pom.xml b/spring-jinq/pom.xml index 991401c4a1..29fc3605d7 100644 --- a/spring-jinq/pom.xml +++ b/spring-jinq/pom.xml @@ -11,6 +11,7 @@ com.baeldung parent-boot-1 0.0.1-SNAPSHOT + ../parent-boot-1 diff --git a/spring-jooq/pom.xml b/spring-jooq/pom.xml index 620172f2a1..f3b8cce8dc 100644 --- a/spring-jooq/pom.xml +++ b/spring-jooq/pom.xml @@ -194,6 +194,7 @@ 1.5 1.0.0 org.jooq.example.spring.Application + 2.1.9.RELEASE \ No newline at end of file diff --git a/spring-mvc-basics-3/README.md b/spring-mvc-basics-3/README.md index b21f7b686a..180cee498b 100644 --- a/spring-mvc-basics-3/README.md +++ b/spring-mvc-basics-3/README.md @@ -11,5 +11,5 @@ This module contains articles about Spring MVC - [Using Enums as Request Parameters in Spring](https://www.baeldung.com/spring-enum-request-param) - [Excluding URLs for a Filter in a Spring Web Application](https://www.baeldung.com/spring-exclude-filter) - [Guide to Flash Attributes in a Spring Web Application](https://www.baeldung.com/spring-web-flash-attributes) -- More articles: [[more -->]](/spring-mvc-basics-4) -- More articles: [[<-- prev]](/spring-mvc-basics-2) +- [Handling URL Encoded Form Data in Spring REST](https://www.baeldung.com/spring-url-encoded-form-data) +- More articles: [[<-- prev]](/spring-mvc-basics-2)[[more -->]](/spring-mvc-basics-4) diff --git a/spring-mvc-basics-3/src/test/java/com/baeldung/SpringBootApplicationIntegrationTest.java b/spring-mvc-basics-3/src/test/java/com/baeldung/SpringBootApplicationIntegrationTest.java index 7190c4f427..bccca58aea 100644 --- a/spring-mvc-basics-3/src/test/java/com/baeldung/SpringBootApplicationIntegrationTest.java +++ b/spring-mvc-basics-3/src/test/java/com/baeldung/SpringBootApplicationIntegrationTest.java @@ -16,8 +16,6 @@ import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; -import java.nio.charset.Charset; - import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; @@ -39,31 +37,23 @@ public class SpringBootApplicationIntegrationTest { @Test public void givenRequestHasBeenMade_whenMeetsAllOfGivenConditions_thenCorrect() throws Exception { - MediaType contentType = new MediaType(MediaType.APPLICATION_JSON.getType(), MediaType.APPLICATION_JSON.getSubtype(), Charset.forName("utf8")); - - mockMvc.perform(MockMvcRequestBuilders.get("/entity/all")).andExpect(MockMvcResultMatchers.status().isOk()).andExpect(MockMvcResultMatchers.content().contentType(contentType)).andExpect(jsonPath("$", hasSize(4))); + mockMvc.perform(MockMvcRequestBuilders.get("/entity/all")).andExpect(MockMvcResultMatchers.status().isOk()).andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON)).andExpect(jsonPath("$", hasSize(4))); } @Test public void givenRequestHasBeenMade_whenMeetsFindByDateOfGivenConditions_thenCorrect() throws Exception { - MediaType contentType = new MediaType(MediaType.APPLICATION_JSON.getType(), MediaType.APPLICATION_JSON.getSubtype(), Charset.forName("utf8")); - - mockMvc.perform(MockMvcRequestBuilders.get("/entity/findbydate/{date}", "2011-12-03T10:15:30")).andExpect(MockMvcResultMatchers.status().isOk()).andExpect(MockMvcResultMatchers.content().contentType(contentType)) + mockMvc.perform(MockMvcRequestBuilders.get("/entity/findbydate/{date}", "2011-12-03T10:15:30")).andExpect(MockMvcResultMatchers.status().isOk()).andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON)) .andExpect(jsonPath("$.id", equalTo(1))); } @Test public void givenRequestHasBeenMade_whenMeetsFindByModeOfGivenConditions_thenCorrect() throws Exception { - MediaType contentType = new MediaType(MediaType.APPLICATION_JSON.getType(), MediaType.APPLICATION_JSON.getSubtype(), Charset.forName("utf8")); - - mockMvc.perform(MockMvcRequestBuilders.get("/entity/findbymode/{mode}", Modes.ALPHA.name())).andExpect(MockMvcResultMatchers.status().isOk()).andExpect(MockMvcResultMatchers.content().contentType(contentType)).andExpect(jsonPath("$.id", equalTo(1))); + mockMvc.perform(MockMvcRequestBuilders.get("/entity/findbymode/{mode}", Modes.ALPHA.name())).andExpect(MockMvcResultMatchers.status().isOk()).andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON)).andExpect(jsonPath("$.id", equalTo(1))); } @Test public void givenRequestHasBeenMade_whenMeetsFindByVersionOfGivenConditions_thenCorrect() throws Exception { - MediaType contentType = new MediaType(MediaType.APPLICATION_JSON.getType(), MediaType.APPLICATION_JSON.getSubtype(), Charset.forName("utf8")); - - mockMvc.perform(MockMvcRequestBuilders.get("/entity/findbyversion").header("Version", "1.0.0")).andExpect(MockMvcResultMatchers.status().isOk()).andExpect(MockMvcResultMatchers.content().contentType(contentType)) + mockMvc.perform(MockMvcRequestBuilders.get("/entity/findbyversion").header("Version", "1.0.0")).andExpect(MockMvcResultMatchers.status().isOk()).andExpect(MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON)) .andExpect(jsonPath("$.id", equalTo(1))); } } \ No newline at end of file diff --git a/spring-mvc-basics/src/test/java/com/baeldung/web/controller/EmployeeControllerContentNegotiationIntegrationTest.java b/spring-mvc-basics/src/test/java/com/baeldung/web/controller/EmployeeControllerContentNegotiationIntegrationTest.java index 6500955d23..4ccba79f9c 100644 --- a/spring-mvc-basics/src/test/java/com/baeldung/web/controller/EmployeeControllerContentNegotiationIntegrationTest.java +++ b/spring-mvc-basics/src/test/java/com/baeldung/web/controller/EmployeeControllerContentNegotiationIntegrationTest.java @@ -1,9 +1,5 @@ package com.baeldung.web.controller; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; @@ -12,6 +8,10 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; + @SpringBootTest @AutoConfigureMockMvc public class EmployeeControllerContentNegotiationIntegrationTest { @@ -23,7 +23,7 @@ public class EmployeeControllerContentNegotiationIntegrationTest { public void whenEndpointUsingJsonSuffixCalled_thenJsonResponseObtained() throws Exception { this.mockMvc.perform(get("/employee/1.json")) .andExpect(status().isOk()) - .andExpect(header().string(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_UTF8_VALUE)); + .andExpect(header().string(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)); } @Test @@ -37,7 +37,7 @@ public class EmployeeControllerContentNegotiationIntegrationTest { public void whenEndpointUsingJsonParameterCalled_thenJsonResponseObtained() throws Exception { this.mockMvc.perform(get("/employee/1?mediaType=json")) .andExpect(status().isOk()) - .andExpect(header().string(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_UTF8_VALUE)); + .andExpect(header().string(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)); } @Test @@ -51,7 +51,7 @@ public class EmployeeControllerContentNegotiationIntegrationTest { public void whenEndpointUsingJsonAcceptHeaderCalled_thenJsonResponseObtained() throws Exception { this.mockMvc.perform(get("/employee/1").header(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE)) .andExpect(status().isOk()) - .andExpect(header().string(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_UTF8_VALUE)); + .andExpect(header().string(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE)); } @Test diff --git a/spring-mvc-basics/src/test/java/com/baeldung/web/controller/SimpleBookControllerIntegrationTest.java b/spring-mvc-basics/src/test/java/com/baeldung/web/controller/SimpleBookControllerIntegrationTest.java index 87d70c2d29..8071828fa3 100644 --- a/spring-mvc-basics/src/test/java/com/baeldung/web/controller/SimpleBookControllerIntegrationTest.java +++ b/spring-mvc-basics/src/test/java/com/baeldung/web/controller/SimpleBookControllerIntegrationTest.java @@ -1,19 +1,17 @@ package com.baeldung.web.controller; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; + public class SimpleBookControllerIntegrationTest { private MockMvc mockMvc; - private static final String CONTENT_TYPE = "application/json;charset=UTF-8"; @BeforeEach public void setup() { @@ -25,7 +23,7 @@ public class SimpleBookControllerIntegrationTest { this.mockMvc .perform(get("/books/42")) .andExpect(status().isOk()) - .andExpect(content().contentType(CONTENT_TYPE)) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(jsonPath("$.id").value(42)); } diff --git a/spring-mvc-basics/src/test/java/com/baeldung/web/controller/SimpleBookRestControllerIntegrationTest.java b/spring-mvc-basics/src/test/java/com/baeldung/web/controller/SimpleBookRestControllerIntegrationTest.java index 294943f2e2..1062280f3b 100644 --- a/spring-mvc-basics/src/test/java/com/baeldung/web/controller/SimpleBookRestControllerIntegrationTest.java +++ b/spring-mvc-basics/src/test/java/com/baeldung/web/controller/SimpleBookRestControllerIntegrationTest.java @@ -1,19 +1,17 @@ package com.baeldung.web.controller; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; + public class SimpleBookRestControllerIntegrationTest { private MockMvc mockMvc; - private static final String CONTENT_TYPE = "application/json;charset=UTF-8"; @BeforeEach public void setup() { @@ -25,7 +23,7 @@ public class SimpleBookRestControllerIntegrationTest { this.mockMvc .perform(get("/books-rest/42")) .andExpect(status().isOk()) - .andExpect(content().contentType(CONTENT_TYPE)) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(jsonPath("$.id").value(42)); } diff --git a/spring-mvc-java-2/.gitignore b/spring-mvc-java-2/.gitignore new file mode 100644 index 0000000000..83c05e60c8 --- /dev/null +++ b/spring-mvc-java-2/.gitignore @@ -0,0 +1,13 @@ +*.class + +#folders# +/target +/neoDb* +/data +/src/main/webapp/WEB-INF/classes +*/META-INF/* + +# Packaged files # +*.jar +*.war +*.ear \ No newline at end of file diff --git a/spring-mvc-java-2/pom.xml b/spring-mvc-java-2/pom.xml new file mode 100644 index 0000000000..d5b7d087ab --- /dev/null +++ b/spring-mvc-java-2/pom.xml @@ -0,0 +1,39 @@ + + + 4.0.0 + spring-mvc-java-2 + 0.1-SNAPSHOT + spring-mvc-java-2 + war + + + com.baeldung + parent-boot-2 + 0.0.1-SNAPSHOT + ../parent-boot-2 + + + + + javax.servlet + javax.servlet-api + ${javax.version} + + + org.springframework + spring-webmvc + ${spring.mvc.version} + + + + + + 4.0.1 + 5.2.2.RELEASE + + + + + \ No newline at end of file diff --git a/spring-mvc-java-2/src/main/java/com/baeldung/cache/CacheControlController.java b/spring-mvc-java-2/src/main/java/com/baeldung/cache/CacheControlController.java new file mode 100644 index 0000000000..5bf095888e --- /dev/null +++ b/spring-mvc-java-2/src/main/java/com/baeldung/cache/CacheControlController.java @@ -0,0 +1,55 @@ +package com.baeldung.cache; + +import org.springframework.http.CacheControl; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.context.request.WebRequest; + +import javax.servlet.http.HttpServletResponse; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.concurrent.TimeUnit; + +@Controller +public class CacheControlController { + + @RequestMapping(value = "/hello/{name}", method = RequestMethod.GET) + public ResponseEntity helloWorld(@PathVariable String name) { + CacheControl cacheControl = CacheControl.maxAge(60, TimeUnit.SECONDS) + .noTransform() + .mustRevalidate(); + return ResponseEntity.ok() + .cacheControl(cacheControl) + .body("Hello " + name); + } + + @RequestMapping(value = "/home/{name}", method = RequestMethod.GET) + public String home(@PathVariable String name, final HttpServletResponse response) { + response.addHeader("Cache-Control", "max-age=60, must-revalidate, no-transform"); + return "home"; + } + + @RequestMapping(value = "/cache/{name}", method = RequestMethod.GET) + public ResponseEntity intercept(@PathVariable String name) { + return ResponseEntity.ok().body("Hello " + name); + } + + @RequestMapping(value = "/validate/{name}", method = RequestMethod.GET) + public ResponseEntity validate(@PathVariable String name, WebRequest request) { + + ZoneId zoneId = ZoneId.of("GMT"); + long lastModifiedTimestamp = LocalDateTime.of(2020, 02, 4, 19, 57, 45) + .atZone(zoneId).toInstant().toEpochMilli(); + + if (request.checkNotModified(lastModifiedTimestamp)) { + return ResponseEntity.status(304).build(); + } + + return ResponseEntity.ok().body("Hello " + name); + } + + +} diff --git a/spring-mvc-java-2/src/main/java/com/baeldung/cache/WebConfig.java b/spring-mvc-java-2/src/main/java/com/baeldung/cache/WebConfig.java new file mode 100644 index 0000000000..728479979c --- /dev/null +++ b/spring-mvc-java-2/src/main/java/com/baeldung/cache/WebConfig.java @@ -0,0 +1,41 @@ +package com.baeldung.cache; + +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.CacheControl; +import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.web.servlet.mvc.WebContentInterceptor; + +import java.util.concurrent.TimeUnit; + +@EnableWebMvc +@Configuration +@ComponentScan(basePackages = {"com.baeldung.cache"}) +public class WebConfig implements WebMvcConfigurer { + + @Override + public void addViewControllers(final ViewControllerRegistry registry) { + registry.addViewController("/").setViewName("index"); + } + + @Override + public void addResourceHandlers(final ResourceHandlerRegistry registry) { + registry.addResourceHandler("/resources/**").addResourceLocations("/resources/") + .setCacheControl(CacheControl.maxAge(60, TimeUnit.SECONDS) + .noTransform() + .mustRevalidate()); + } + + @Override + public void addInterceptors(InterceptorRegistry registry) { + WebContentInterceptor interceptor = new WebContentInterceptor(); + interceptor.addCacheMapping(CacheControl.maxAge(60, TimeUnit.SECONDS) + .noTransform() + .mustRevalidate(), "/cache/*"); + registry.addInterceptor(interceptor); + } +} \ No newline at end of file diff --git a/spring-mvc-java-2/src/main/webapp/resources/hello.css b/spring-mvc-java-2/src/main/webapp/resources/hello.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spring-mvc-java-2/src/test/java/com/baeldung/cache/CacheControlControllerIntegrationTest.java b/spring-mvc-java-2/src/test/java/com/baeldung/cache/CacheControlControllerIntegrationTest.java new file mode 100644 index 0000000000..ef408038ae --- /dev/null +++ b/spring-mvc-java-2/src/test/java/com/baeldung/cache/CacheControlControllerIntegrationTest.java @@ -0,0 +1,80 @@ +package com.baeldung.cache; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpHeaders; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit.jupiter.SpringExtension; +import org.springframework.test.context.web.WebAppConfiguration; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; +import org.springframework.test.web.servlet.result.MockMvcResultHandlers; +import org.springframework.test.web.servlet.result.MockMvcResultMatchers; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; +import org.springframework.web.context.WebApplicationContext; + +import static org.springframework.http.HttpHeaders.IF_UNMODIFIED_SINCE; + +@ExtendWith(SpringExtension.class) +@WebAppConfiguration +@ContextConfiguration(classes = {WebConfig.class, WebConfig.class}) +public class CacheControlControllerIntegrationTest { + + @Autowired + private WebApplicationContext wac; + + private MockMvc mockMvc; + + @BeforeEach + void setup() throws Exception { + this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build(); + } + + @Test + void whenResponseBody_thenReturnCacheHeader() throws Exception { + this.mockMvc.perform(MockMvcRequestBuilders.get("/hello/baeldung")) + .andDo(MockMvcResultHandlers.print()) + .andExpect(MockMvcResultMatchers.status().isOk()) + .andExpect(MockMvcResultMatchers.header().string("Cache-Control","max-age=60, must-revalidate, no-transform")); + } + + @Test + void whenViewName_thenReturnCacheHeader() throws Exception { + this.mockMvc.perform(MockMvcRequestBuilders.get("/home/baeldung")) + .andDo(MockMvcResultHandlers.print()) + .andExpect(MockMvcResultMatchers.status().isOk()) + .andExpect(MockMvcResultMatchers.header().string("Cache-Control","max-age=60, must-revalidate, no-transform")) + .andExpect(MockMvcResultMatchers.view().name("home")); + } + + @Test + void whenStaticResources_thenReturnCacheHeader() throws Exception { + this.mockMvc.perform(MockMvcRequestBuilders.get("/resources/hello.css")) + .andDo(MockMvcResultHandlers.print()) + .andExpect(MockMvcResultMatchers.status().isOk()) + .andExpect(MockMvcResultMatchers.header().string("Cache-Control","max-age=60, must-revalidate, no-transform")); + } + + @Test + void whenInterceptor_thenReturnCacheHeader() throws Exception { + this.mockMvc.perform(MockMvcRequestBuilders.get("/cache/baeldung")) + .andDo(MockMvcResultHandlers.print()) + .andExpect(MockMvcResultMatchers.status().isOk()) + .andExpect(MockMvcResultMatchers.header().string("Cache-Control","max-age=60, must-revalidate, no-transform")); + } + + @Test + void whenValidate_thenReturnCacheHeader() throws Exception { + HttpHeaders headers = new HttpHeaders(); + headers.add(IF_UNMODIFIED_SINCE, "Tue, 04 Feb 2020 19:57:25 GMT"); + this.mockMvc.perform(MockMvcRequestBuilders.get("/validate/baeldung").headers(headers)) + .andDo(MockMvcResultHandlers.print()) + .andExpect(MockMvcResultMatchers.status().is(304)); + } + + + + +} diff --git a/spring-mvc-java/pom.xml b/spring-mvc-java/pom.xml index 079a664a5d..0f3a1d65b9 100644 --- a/spring-mvc-java/pom.xml +++ b/spring-mvc-java/pom.xml @@ -223,6 +223,8 @@ + 2.1.9.RELEASE + 3.0.9.RELEASE diff --git a/spring-mvc-views/README.md b/spring-mvc-views/README.md new file mode 100644 index 0000000000..7aa05699f3 --- /dev/null +++ b/spring-mvc-views/README.md @@ -0,0 +1,3 @@ +### Relevant Articles: + +- [Spring MVC Themes](https://www.baeldung.com/spring-mvc-themes) diff --git a/spring-mvc-xml/pom.xml b/spring-mvc-xml/pom.xml index e93b426119..c389e41e29 100644 --- a/spring-mvc-xml/pom.xml +++ b/spring-mvc-xml/pom.xml @@ -92,6 +92,30 @@ ${spring-boot.version} test + + + + org.crashub + crash.embed.spring + ${crash.version} + + + org.crashub + crash.cli + ${crash.version} + + + org.crashub + crash.connectors.telnet + ${crash.version} + + + + + org.codehaus.groovy + groovy + ${groovy.version} +
@@ -137,6 +161,9 @@ 1.6.1 + + 1.3.2 + 3.0.0-rc-3 diff --git a/spring-mvc-xml/src/main/webapp/WEB-INF/crash/commands/message.groovy b/spring-mvc-xml/src/main/webapp/WEB-INF/crash/commands/message.groovy new file mode 100644 index 0000000000..d66ab13d96 --- /dev/null +++ b/spring-mvc-xml/src/main/webapp/WEB-INF/crash/commands/message.groovy @@ -0,0 +1,14 @@ +import org.crsh.cli.Command; +import org.crsh.cli.Usage; +import org.crsh.cli.Option; + +class message { + + @Usage("show my own message") + @Command + Object main(@Usage("custom message") @Option(names=["m","message"]) String message) { + if (message == null) + message = "No message given..."; + return message; + } +} \ No newline at end of file diff --git a/spring-mvc-xml/src/main/webapp/WEB-INF/crash/commands/message2.java b/spring-mvc-xml/src/main/webapp/WEB-INF/crash/commands/message2.java new file mode 100644 index 0000000000..d1ead88024 --- /dev/null +++ b/spring-mvc-xml/src/main/webapp/WEB-INF/crash/commands/message2.java @@ -0,0 +1,14 @@ +import org.crsh.command.BaseCommand; +import org.crsh.cli.Usage; +import org.crsh.cli.Command; +import org.crsh.cli.Option; + +public class message2 extends BaseCommand { + @Usage("show my own message using java") + @Command + public Object main(@Usage("custom message") @Option(names = { "m", "message" }) String message) { + if (message == null) + message = "No message given..."; + return message; + } +} \ No newline at end of file diff --git a/spring-mvc-xml/src/main/webapp/WEB-INF/crash/crash.properties b/spring-mvc-xml/src/main/webapp/WEB-INF/crash/crash.properties new file mode 100644 index 0000000000..f9ad0d7cf6 --- /dev/null +++ b/spring-mvc-xml/src/main/webapp/WEB-INF/crash/crash.properties @@ -0,0 +1 @@ +crash.telnet.port=50001 diff --git a/spring-mvc-xml/src/main/webapp/WEB-INF/crash/telnet.properties b/spring-mvc-xml/src/main/webapp/WEB-INF/crash/telnet.properties new file mode 100644 index 0000000000..99071d09ff --- /dev/null +++ b/spring-mvc-xml/src/main/webapp/WEB-INF/crash/telnet.properties @@ -0,0 +1,65 @@ +############################ +# Telnet daemon properties # +############################ + +##################### +# Terminals Section # +##################### + +# List of terminals available and defined below +terminals=vt100,ansi,windoof,xterm + +# vt100 implementation and aliases +term.vt100.class=net.wimpi.telnetd.io.terminal.vt100 +term.vt100.aliases=default,vt100-am,vt102,dec-vt100 + +# ansi implementation and aliases +term.ansi.class=net.wimpi.telnetd.io.terminal.ansi +term.ansi.aliases=color-xterm,xterm-color,vt320,vt220,linux,screen + +# windoof implementation and aliases +term.windoof.class=net.wimpi.telnetd.io.terminal.Windoof +term.windoof.aliases= + +# xterm implementation and aliases +term.xterm.class=net.wimpi.telnetd.io.terminal.xterm +term.xterm.aliases= + +################## +# Shells Section # +################## + +# List of shells available and defined below +shells=simple + +# shell implementations +shell.simple.class=org.crsh.telnet.term.TelnetHandler + +##################### +# Listeners Section # +##################### +listeners=std + + +# std listener specific properties + +#Basic listener and connection management settings (port is commented because CRaSH configures it) +# std.port=5000 +std.floodprotection=5 +std.maxcon=25 + + +# Timeout Settings for connections (ms) +std.time_to_warning=3600000 +std.time_to_timedout=60000 + +# Housekeeping thread active every 1 secs +std.housekeepinginterval=1000 + +std.inputmode=character + +# Login shell +std.loginshell=simple + +# Connection filter class +std.connectionfilter=none \ No newline at end of file diff --git a/spring-mvc-xml/src/main/webapp/WEB-INF/mvc-servlet.xml b/spring-mvc-xml/src/main/webapp/WEB-INF/mvc-servlet.xml index 5c8fa611ed..126fea996e 100644 --- a/spring-mvc-xml/src/main/webapp/WEB-INF/mvc-servlet.xml +++ b/spring-mvc-xml/src/main/webapp/WEB-INF/mvc-servlet.xml @@ -52,4 +52,15 @@ + + + + + + 5000 + + + diff --git a/spring-mvc-xml/src/main/webapp/WEB-INF/web.xml b/spring-mvc-xml/src/main/webapp/WEB-INF/web.xml index 6ff435b84b..4a3d6cb321 100644 --- a/spring-mvc-xml/src/main/webapp/WEB-INF/web.xml +++ b/spring-mvc-xml/src/main/webapp/WEB-INF/web.xml @@ -21,6 +21,9 @@ org.springframework.web.context.ContextLoaderListener + + org.crsh.plugin.WebPluginLifeCycle + diff --git a/spring-rest-angular/pom.xml b/spring-rest-angular/pom.xml index 1c6ab77a2d..1d50b4c76c 100644 --- a/spring-rest-angular/pom.xml +++ b/spring-rest-angular/pom.xml @@ -74,7 +74,7 @@ 19.0 - org.baeldung.web.main.Application + com.baeldung.web.main.Application diff --git a/spring-rest-angular/src/main/java/org/baeldung/web/dao/StudentRepository.java b/spring-rest-angular/src/main/java/com/baeldung/web/dao/StudentRepository.java similarity index 66% rename from spring-rest-angular/src/main/java/org/baeldung/web/dao/StudentRepository.java rename to spring-rest-angular/src/main/java/com/baeldung/web/dao/StudentRepository.java index 566d95da00..b69cf6f552 100644 --- a/spring-rest-angular/src/main/java/org/baeldung/web/dao/StudentRepository.java +++ b/spring-rest-angular/src/main/java/com/baeldung/web/dao/StudentRepository.java @@ -1,6 +1,6 @@ -package org.baeldung.web.dao; +package com.baeldung.web.dao; -import org.baeldung.web.entity.Student; +import com.baeldung.web.entity.Student; import org.springframework.data.jpa.repository.JpaRepository; public interface StudentRepository extends JpaRepository diff --git a/spring-rest-angular/src/main/java/org/baeldung/web/entity/Student.java b/spring-rest-angular/src/main/java/com/baeldung/web/entity/Student.java similarity index 97% rename from spring-rest-angular/src/main/java/org/baeldung/web/entity/Student.java rename to spring-rest-angular/src/main/java/com/baeldung/web/entity/Student.java index 0a0b60d87d..849b35cf24 100644 --- a/spring-rest-angular/src/main/java/org/baeldung/web/entity/Student.java +++ b/spring-rest-angular/src/main/java/com/baeldung/web/entity/Student.java @@ -1,4 +1,4 @@ -package org.baeldung.web.entity; +package com.baeldung.web.entity; import java.io.Serializable; diff --git a/spring-rest-angular/src/main/java/org/baeldung/web/exception/MyResourceNotFoundException.java b/spring-rest-angular/src/main/java/com/baeldung/web/exception/MyResourceNotFoundException.java similarity index 93% rename from spring-rest-angular/src/main/java/org/baeldung/web/exception/MyResourceNotFoundException.java rename to spring-rest-angular/src/main/java/com/baeldung/web/exception/MyResourceNotFoundException.java index 740caec59e..ae9c4543ec 100644 --- a/spring-rest-angular/src/main/java/org/baeldung/web/exception/MyResourceNotFoundException.java +++ b/spring-rest-angular/src/main/java/com/baeldung/web/exception/MyResourceNotFoundException.java @@ -1,4 +1,4 @@ -package org.baeldung.web.exception; +package com.baeldung.web.exception; public class MyResourceNotFoundException extends RuntimeException { diff --git a/spring-rest-angular/src/main/java/org/baeldung/web/main/Application.java b/spring-rest-angular/src/main/java/com/baeldung/web/main/Application.java similarity index 96% rename from spring-rest-angular/src/main/java/org/baeldung/web/main/Application.java rename to spring-rest-angular/src/main/java/com/baeldung/web/main/Application.java index fd10643c53..1f3f0aec39 100644 --- a/spring-rest-angular/src/main/java/org/baeldung/web/main/Application.java +++ b/spring-rest-angular/src/main/java/com/baeldung/web/main/Application.java @@ -1,4 +1,4 @@ -package org.baeldung.web.main; +package com.baeldung.web.main; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; diff --git a/spring-rest-angular/src/main/java/org/baeldung/web/main/PersistenceConfig.java b/spring-rest-angular/src/main/java/com/baeldung/web/main/PersistenceConfig.java similarity index 85% rename from spring-rest-angular/src/main/java/org/baeldung/web/main/PersistenceConfig.java rename to spring-rest-angular/src/main/java/com/baeldung/web/main/PersistenceConfig.java index 0fc6b74892..b964c753d2 100644 --- a/spring-rest-angular/src/main/java/org/baeldung/web/main/PersistenceConfig.java +++ b/spring-rest-angular/src/main/java/com/baeldung/web/main/PersistenceConfig.java @@ -1,4 +1,4 @@ -package org.baeldung.web.main; +package com.baeldung.web.main; import javax.sql.DataSource; @@ -12,9 +12,9 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; -@EnableJpaRepositories("org.baeldung.web.dao") -@ComponentScan(basePackages = { "org.baeldung.web" }) -@EntityScan("org.baeldung.web.entity") +@EnableJpaRepositories("com.baeldung.web.dao") +@ComponentScan(basePackages = { "com.baeldung.web" }) +@EntityScan("com.baeldung.web.entity") @Configuration public class PersistenceConfig { diff --git a/spring-rest-angular/src/main/java/org/baeldung/web/rest/StudentDirectoryRestController.java b/spring-rest-angular/src/main/java/com/baeldung/web/rest/StudentDirectoryRestController.java similarity index 83% rename from spring-rest-angular/src/main/java/org/baeldung/web/rest/StudentDirectoryRestController.java rename to spring-rest-angular/src/main/java/com/baeldung/web/rest/StudentDirectoryRestController.java index dc295a3d97..6197279384 100644 --- a/spring-rest-angular/src/main/java/org/baeldung/web/rest/StudentDirectoryRestController.java +++ b/spring-rest-angular/src/main/java/com/baeldung/web/rest/StudentDirectoryRestController.java @@ -1,8 +1,8 @@ -package org.baeldung.web.rest; +package com.baeldung.web.rest; -import org.baeldung.web.entity.Student; -import org.baeldung.web.exception.MyResourceNotFoundException; -import org.baeldung.web.service.StudentService; +import com.baeldung.web.entity.Student; +import com.baeldung.web.exception.MyResourceNotFoundException; +import com.baeldung.web.service.StudentService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/spring-rest-angular/src/main/java/org/baeldung/web/service/IOperations.java b/spring-rest-angular/src/main/java/com/baeldung/web/service/IOperations.java similarity index 81% rename from spring-rest-angular/src/main/java/org/baeldung/web/service/IOperations.java rename to spring-rest-angular/src/main/java/com/baeldung/web/service/IOperations.java index 2176c0bb70..60cb4382f4 100644 --- a/spring-rest-angular/src/main/java/org/baeldung/web/service/IOperations.java +++ b/spring-rest-angular/src/main/java/com/baeldung/web/service/IOperations.java @@ -1,4 +1,4 @@ -package org.baeldung.web.service; +package com.baeldung.web.service; import org.springframework.data.domain.Page; diff --git a/spring-rest-angular/src/main/java/com/baeldung/web/service/StudentService.java b/spring-rest-angular/src/main/java/com/baeldung/web/service/StudentService.java new file mode 100644 index 0000000000..65eb791904 --- /dev/null +++ b/spring-rest-angular/src/main/java/com/baeldung/web/service/StudentService.java @@ -0,0 +1,7 @@ +package com.baeldung.web.service; + +import com.baeldung.web.entity.Student; + +public interface StudentService extends IOperations { + +} diff --git a/spring-rest-angular/src/main/java/org/baeldung/web/service/StudentServiceImpl.java b/spring-rest-angular/src/main/java/com/baeldung/web/service/StudentServiceImpl.java similarity index 69% rename from spring-rest-angular/src/main/java/org/baeldung/web/service/StudentServiceImpl.java rename to spring-rest-angular/src/main/java/com/baeldung/web/service/StudentServiceImpl.java index c7bcdc5bd5..cacb0e7840 100644 --- a/spring-rest-angular/src/main/java/org/baeldung/web/service/StudentServiceImpl.java +++ b/spring-rest-angular/src/main/java/com/baeldung/web/service/StudentServiceImpl.java @@ -1,7 +1,7 @@ -package org.baeldung.web.service; +package com.baeldung.web.service; -import org.baeldung.web.dao.StudentRepository; -import org.baeldung.web.entity.Student; +import com.baeldung.web.dao.StudentRepository; +import com.baeldung.web.entity.Student; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; @@ -15,7 +15,7 @@ public class StudentServiceImpl implements StudentService { @Override public Page findPaginated(int page, int size) { - return dao.findAll(new PageRequest(page, size)); + return dao.findAll(PageRequest.of(page, size)); } } diff --git a/spring-rest-angular/src/main/java/org/baeldung/web/service/StudentService.java b/spring-rest-angular/src/main/java/org/baeldung/web/service/StudentService.java deleted file mode 100644 index 1b194f76e2..0000000000 --- a/spring-rest-angular/src/main/java/org/baeldung/web/service/StudentService.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.baeldung.web.service; - -import org.baeldung.web.entity.Student; - -public interface StudentService extends IOperations { - -} diff --git a/spring-rest-angular/src/test/java/org/baeldung/SpringContextTest.java b/spring-rest-angular/src/test/java/com/baeldung/SpringContextTest.java similarity index 85% rename from spring-rest-angular/src/test/java/org/baeldung/SpringContextTest.java rename to spring-rest-angular/src/test/java/com/baeldung/SpringContextTest.java index 9136ce43eb..ee8c553c76 100644 --- a/spring-rest-angular/src/test/java/org/baeldung/SpringContextTest.java +++ b/spring-rest-angular/src/test/java/com/baeldung/SpringContextTest.java @@ -1,6 +1,6 @@ -package org.baeldung; +package com.baeldung; -import org.baeldung.web.main.Application; +import com.baeldung.web.main.Application; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; diff --git a/spring-rest-angular/src/test/java/org/baeldung/web/service/StudentServiceIntegrationTest.java b/spring-rest-angular/src/test/java/com/baeldung/web/service/StudentServiceIntegrationTest.java similarity index 97% rename from spring-rest-angular/src/test/java/org/baeldung/web/service/StudentServiceIntegrationTest.java rename to spring-rest-angular/src/test/java/com/baeldung/web/service/StudentServiceIntegrationTest.java index 1473d44b92..654c4ef647 100644 --- a/spring-rest-angular/src/test/java/org/baeldung/web/service/StudentServiceIntegrationTest.java +++ b/spring-rest-angular/src/test/java/com/baeldung/web/service/StudentServiceIntegrationTest.java @@ -1,4 +1,4 @@ -package org.baeldung.web.service; +package com.baeldung.web.service; import static io.restassured.RestAssured.given; import static org.hamcrest.core.Is.is; @@ -6,7 +6,7 @@ import static org.hamcrest.core.IsCollectionContaining.hasItems; import static org.hamcrest.core.IsEqual.equalTo; import org.apache.commons.lang3.RandomStringUtils; -import org.baeldung.web.main.Application; +import com.baeldung.web.main.Application; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; diff --git a/spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/CompressingClientHttpRequestInterceptor.java b/spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/CompressingClientHttpRequestInterceptor.java similarity index 96% rename from spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/CompressingClientHttpRequestInterceptor.java rename to spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/CompressingClientHttpRequestInterceptor.java index 7d5326246d..78b77256af 100644 --- a/spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/CompressingClientHttpRequestInterceptor.java +++ b/spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/CompressingClientHttpRequestInterceptor.java @@ -1,4 +1,4 @@ -package org.baeldung.spring.rest.compress; +package com.baeldung.spring.rest.compress; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/GzipUtils.java b/spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/GzipUtils.java similarity index 96% rename from spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/GzipUtils.java rename to spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/GzipUtils.java index 75420ca6d8..b9731535b2 100644 --- a/spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/GzipUtils.java +++ b/spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/GzipUtils.java @@ -1,4 +1,4 @@ -package org.baeldung.spring.rest.compress; +package com.baeldung.spring.rest.compress; import org.apache.commons.codec.Charsets; import org.apache.commons.io.IOUtils; diff --git a/spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/JettyWebServerConfiguration.java b/spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/JettyWebServerConfiguration.java similarity index 96% rename from spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/JettyWebServerConfiguration.java rename to spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/JettyWebServerConfiguration.java index 784814b04d..8de8e5b523 100644 --- a/spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/JettyWebServerConfiguration.java +++ b/spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/JettyWebServerConfiguration.java @@ -1,4 +1,4 @@ -package org.baeldung.spring.rest.compress; +package com.baeldung.spring.rest.compress; import org.eclipse.jetty.server.handler.HandlerCollection; import org.eclipse.jetty.server.handler.gzip.GzipHandler; diff --git a/spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/Message.java b/spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/Message.java similarity index 92% rename from spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/Message.java rename to spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/Message.java index d3450b227c..24272a4fca 100644 --- a/spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/Message.java +++ b/spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/Message.java @@ -1,4 +1,4 @@ -package org.baeldung.spring.rest.compress; +package com.baeldung.spring.rest.compress; public class Message { diff --git a/spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/MessageController.java b/spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/MessageController.java similarity index 96% rename from spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/MessageController.java rename to spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/MessageController.java index 657c3cfec8..2fc2ca8272 100644 --- a/spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/MessageController.java +++ b/spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/MessageController.java @@ -1,4 +1,4 @@ -package org.baeldung.spring.rest.compress; +package com.baeldung.spring.rest.compress; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/RestTemplateConfiguration.java b/spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/RestTemplateConfiguration.java similarity index 92% rename from spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/RestTemplateConfiguration.java rename to spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/RestTemplateConfiguration.java index e1d0f985d9..c1e3c89ae9 100644 --- a/spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/RestTemplateConfiguration.java +++ b/spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/RestTemplateConfiguration.java @@ -1,4 +1,4 @@ -package org.baeldung.spring.rest.compress; +package com.baeldung.spring.rest.compress; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/SpringCompressRequestApplication.java b/spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/SpringCompressRequestApplication.java similarity index 90% rename from spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/SpringCompressRequestApplication.java rename to spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/SpringCompressRequestApplication.java index 3082e3c277..9b1b71979d 100644 --- a/spring-rest-compress/src/main/java/org/baeldung/spring/rest/compress/SpringCompressRequestApplication.java +++ b/spring-rest-compress/src/main/java/com/baeldung/spring/rest/compress/SpringCompressRequestApplication.java @@ -1,4 +1,4 @@ -package org.baeldung.spring.rest.compress; +package com.baeldung.spring.rest.compress; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; diff --git a/spring-rest-compress/src/test/java/org/baeldung/spring/rest/compress/GzipUtilsUnitTest.java b/spring-rest-compress/src/test/java/com/baeldung/spring/rest/compress/GzipUtilsUnitTest.java similarity index 92% rename from spring-rest-compress/src/test/java/org/baeldung/spring/rest/compress/GzipUtilsUnitTest.java rename to spring-rest-compress/src/test/java/com/baeldung/spring/rest/compress/GzipUtilsUnitTest.java index d238c9ec7c..431758d358 100644 --- a/spring-rest-compress/src/test/java/org/baeldung/spring/rest/compress/GzipUtilsUnitTest.java +++ b/spring-rest-compress/src/test/java/com/baeldung/spring/rest/compress/GzipUtilsUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.spring.rest.compress; +package com.baeldung.spring.rest.compress; import org.junit.Test; diff --git a/spring-rest-compress/src/test/java/org/baeldung/spring/rest/compress/MessageControllerUnitTest.java b/spring-rest-compress/src/test/java/com/baeldung/spring/rest/compress/MessageControllerUnitTest.java similarity index 97% rename from spring-rest-compress/src/test/java/org/baeldung/spring/rest/compress/MessageControllerUnitTest.java rename to spring-rest-compress/src/test/java/com/baeldung/spring/rest/compress/MessageControllerUnitTest.java index 9658204917..50b2b7ccd7 100644 --- a/spring-rest-compress/src/test/java/org/baeldung/spring/rest/compress/MessageControllerUnitTest.java +++ b/spring-rest-compress/src/test/java/com/baeldung/spring/rest/compress/MessageControllerUnitTest.java @@ -1,4 +1,4 @@ -package org.baeldung.spring.rest.compress; +package com.baeldung.spring.rest.compress; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/spring-rest-http/README.md b/spring-rest-http/README.md index 51f5ed4000..54b31e80c4 100644 --- a/spring-rest-http/README.md +++ b/spring-rest-http/README.md @@ -10,5 +10,5 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Guide to UriComponentsBuilder in Spring](https://www.baeldung.com/spring-uricomponentsbuilder) - [How to Set a Header on a Response with Spring 5](https://www.baeldung.com/spring-response-header) - The tests contained for this article rely on the sample application within the [spring-resttemplate](/spring-resttemplate) module - [Returning Custom Status Codes from Spring Controllers](https://www.baeldung.com/spring-mvc-controller-custom-http-status-code) -- [Spring @RequestMapping](https://www.baeldung.com/spring-requestmapping) -- [Guide to DeferredResult in Spring](https://www.baeldung.com/spring-deferred-result) \ No newline at end of file +- [Spring RequestMapping](https://www.baeldung.com/spring-requestmapping) +- [Guide to DeferredResult in Spring](https://www.baeldung.com/spring-deferred-result) diff --git a/spring-rest-simple/src/main/java/com/baeldung/web/dto/FooProtos.java b/spring-rest-simple/src/main/java/com/baeldung/web/dto/FooProtos.java index db7cb66f87..0e8f9caf03 100644 --- a/spring-rest-simple/src/main/java/com/baeldung/web/dto/FooProtos.java +++ b/spring-rest-simple/src/main/java/com/baeldung/web/dto/FooProtos.java @@ -331,7 +331,7 @@ public final class FooProtos { return com.baeldung.web.dto.FooProtos.internal_static_baeldung_Foo_fieldAccessorTable.ensureFieldAccessorsInitialized(com.baeldung.web.dto.FooProtos.Foo.class, com.baeldung.web.dto.FooProtos.Foo.Builder.class); } - // Construct using org.baeldung.web.dto.FooProtos.Foo.newBuilder() + // Construct using com.baeldung.web.dto.FooProtos.Foo.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -581,7 +581,7 @@ public final class FooProtos { private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { "\n\017FooProtos.proto\022\010baeldung\"\037\n\003Foo\022\n\n\002id" + "\030\001 \002(\003\022\014\n\004name\030\002 \002(\tB!\n\024org.baeldung.web" + ".dtoB\tFooProtos" }; + java.lang.String[] descriptorData = { "\n\017FooProtos.proto\022\010baeldung\"\037\n\003Foo\022\n\n\002id" + "\030\001 \002(\003\022\014\n\004name\030\002 \002(\tB!\n\024com.baeldung.web" + ".dtoB\tFooProtos" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { public com.google.protobuf.ExtensionRegistry assignDescriptors(com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; diff --git a/spring-rest-simple/src/test/java/org/baeldung/SpringContextTest.java b/spring-rest-simple/src/test/java/org/baeldung/SpringContextTest.java deleted file mode 100644 index 5e68a8e64f..0000000000 --- a/spring-rest-simple/src/test/java/org/baeldung/SpringContextTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.baeldung; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -import com.baeldung.Application; - -@RunWith(SpringRunner.class) -@SpringBootTest(classes = Application.class) -public class SpringContextTest { - - @Test - public void whenSpringContextIsBootstrapped_thenNoExceptions() { - } -} diff --git a/spring-security-modules/pom.xml b/spring-security-modules/pom.xml index 168fab85c0..7de3009f47 100644 --- a/spring-security-modules/pom.xml +++ b/spring-security-modules/pom.xml @@ -30,7 +30,7 @@ spring-security-mvc-persisted-remember-me spring-security-mvc-socket spring-security-oidc - + spring-security-react spring-security-rest spring-security-rest-basic-auth diff --git a/spring-security-modules/spring-security-core/README.md b/spring-security-modules/spring-security-core/README.md index 6b1f236b7c..e42dfecaa0 100644 --- a/spring-security-modules/spring-security-core/README.md +++ b/spring-security-modules/spring-security-core/README.md @@ -7,6 +7,7 @@ This module contains articles about core Spring Security - [Spring Boot Authentication Auditing Support](https://www.baeldung.com/spring-boot-authentication-audit) - [Introduction to Spring Method Security](https://www.baeldung.com/spring-security-method-security) - [Overview and Need for DelegatingFilterProxy in Spring](https://www.baeldung.com/spring-delegating-filter-proxy) +- [Deny Access on Missing @PreAuthorize to Spring Controller Methods](https://www.baeldung.com/spring-deny-access) ### Build the Project diff --git a/spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/models/Tweet.java b/spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/models/Tweet.java index b2e45009f6..54a96deaf3 100644 --- a/spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/models/Tweet.java +++ b/spring-security-modules/spring-security-mvc-boot/src/main/java/com/baeldung/models/Tweet.java @@ -3,14 +3,17 @@ package com.baeldung.models; import java.util.HashSet; import java.util.Set; +import javax.persistence.CollectionTable; import javax.persistence.ElementCollection; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; +import javax.persistence.Table; @Entity +@Table(name = "Tweet") public class Tweet { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE) @@ -18,7 +21,8 @@ public class Tweet { private String tweet; private String owner; @ElementCollection(targetClass = String.class, fetch = FetchType.EAGER) - private Set likes = new HashSet(); + @CollectionTable(name = "Tweet_Likes") + private Set likes = new HashSet<>(); public long getId() { return id; diff --git a/spring-security-modules/spring-security-mvc-boot/src/test/java/com/baeldung/relationships/SpringDataWithSecurityIntegrationTest.java b/spring-security-modules/spring-security-mvc-boot/src/test/java/com/baeldung/relationships/SpringDataWithSecurityIntegrationTest.java index bd0c14ca1f..b2def82c51 100644 --- a/spring-security-modules/spring-security-mvc-boot/src/test/java/com/baeldung/relationships/SpringDataWithSecurityIntegrationTest.java +++ b/spring-security-modules/spring-security-mvc-boot/src/test/java/com/baeldung/relationships/SpringDataWithSecurityIntegrationTest.java @@ -1,29 +1,5 @@ package com.baeldung.relationships; -import static org.springframework.util.Assert.isTrue; - -import java.util.Date; -import java.util.List; - -import javax.servlet.ServletContext; - -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.dao.InvalidDataAccessApiUsageException; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.PageRequest; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.test.context.web.WebAppConfiguration; -import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; - import com.baeldung.AppConfig; import com.baeldung.data.repositories.TweetRepository; import com.baeldung.data.repositories.UserRepository; @@ -31,6 +7,30 @@ import com.baeldung.models.AppUser; import com.baeldung.models.Tweet; import com.baeldung.security.AppUserPrincipal; import com.baeldung.util.DummyContentUtil; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.dao.InvalidDataAccessApiUsageException; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.test.context.web.WebAppConfiguration; +import org.springframework.test.jdbc.JdbcTestUtils; +import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; + +import javax.servlet.ServletContext; +import java.util.Date; +import java.util.List; + +import static org.springframework.util.Assert.isTrue; @RunWith(SpringRunner.class) @WebAppConfiguration @@ -54,10 +54,22 @@ public class SpringDataWithSecurityIntegrationTest { tweetRepository.saveAll(DummyContentUtil.generateDummyTweets(appUsers)); } - @AfterClass - public static void tearDown() { - tweetRepository.deleteAll(); - userRepository.deleteAll(); + /** + * This is to ensure the tables are dropped in proper order. + * After the Spring Boot 2.2.2 upgrade, DDL statements generated automatically try to drop Tweet table first. + * As a result we get org.h2.jdbc.JdbcSQLSyntaxErrorException because Tweet_Likes table depends on Tweet. + * + * @see + * StackOverflow#59364212 + * + * @see + * StackOverflow#59561551 + * + */ + @After + public void tearDown() { + JdbcTemplate jdbcTemplate = ctx.getBean(JdbcTemplate.class); + JdbcTestUtils.dropTables(jdbcTemplate, "Tweet_Likes", "Tweet"); } @Test @@ -82,7 +94,7 @@ public class SpringDataWithSecurityIntegrationTest { .setAuthentication(auth); Page page = null; do { - page = tweetRepository.getMyTweetsAndTheOnesILiked(new PageRequest(page != null ? page.getNumber() + 1 : 0, 5)); + page = tweetRepository.getMyTweetsAndTheOnesILiked(PageRequest.of(page != null ? page.getNumber() + 1 : 0, 5)); for (Tweet twt : page.getContent()) { isTrue((twt.getOwner() == appUser.getUsername()) || (twt.getLikes() .contains(appUser.getUsername())), "I do not have any Tweets"); @@ -94,7 +106,7 @@ public class SpringDataWithSecurityIntegrationTest { public void givenNoAppUser_whenPaginatedResultsRetrievalAttempted_shouldFail() { Page page = null; do { - page = tweetRepository.getMyTweetsAndTheOnesILiked(new PageRequest(page != null ? page.getNumber() + 1 : 0, 5)); + page = tweetRepository.getMyTweetsAndTheOnesILiked(PageRequest.of(page != null ? page.getNumber() + 1 : 0, 5)); } while (page != null && page.hasNext()); } } diff --git a/spring-security-modules/spring-security-oidc/README.md b/spring-security-modules/spring-security-oidc/README.md index 92ba60cad9..ca6053f70f 100644 --- a/spring-security-modules/spring-security-oidc/README.md +++ b/spring-security-modules/spring-security-oidc/README.md @@ -5,6 +5,7 @@ This module contains articles about OpenID with Spring Security ### Relevant articles - [Spring Security and OpenID Connect](https://www.baeldung.com/spring-security-openid-connect) +- [Spring Security and OpenID Connect (Legacy)](https://www.baeldung.com/spring-security-openid-connect-legacy) ### OpenID Connect with Spring Security diff --git a/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/package-lock.json b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/package-lock.json index 46f3a86c20..6b183d2e5c 100644 --- a/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/package-lock.json +++ b/spring-security-modules/spring-security-react/src/main/webapp/WEB-INF/view/react/package-lock.json @@ -9,6 +9,30 @@ "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz", "integrity": "sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4=" }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + }, + "dependencies": { + "mime-db": { + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" + }, + "mime-types": { + "version": "2.1.26", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", + "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", + "requires": { + "mime-db": "1.43.0" + } + } + } + }, "acorn": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", @@ -123,6 +147,11 @@ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==" }, + "ansi-html": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", + "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=" + }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -269,6 +298,11 @@ "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" }, + "array-flatten": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", + "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==" + }, "array-includes": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", @@ -1293,6 +1327,11 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" }, + "batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=" + }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -1322,6 +1361,56 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + }, + "dependencies": { + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + } + } + }, + "bonjour": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", + "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", + "requires": { + "array-flatten": "^2.1.0", + "deep-equal": "^1.0.1", + "dns-equal": "^1.0.0", + "dns-txt": "^2.0.2", + "multicast-dns": "^6.0.1", + "multicast-dns-service-types": "^1.1.0" + } + }, "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -1510,6 +1599,11 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==" }, + "buffer-indexof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", + "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==" + }, "buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", @@ -1525,6 +1619,11 @@ "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -1936,6 +2035,35 @@ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" }, + "compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "requires": { + "mime-db": ">= 1.43.0 < 2" + }, + "dependencies": { + "mime-db": { + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" + } + } + }, + "compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1965,6 +2093,11 @@ "xdg-basedir": "^3.0.0" } }, + "connect-history-api-fallback": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", + "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==" + }, "console-browserify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", @@ -1983,6 +2116,19 @@ "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=" }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, "content-type-parser": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/content-type-parser/-/content-type-parser-1.0.2.tgz", @@ -1993,6 +2139,16 @@ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=" }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", @@ -2377,6 +2533,26 @@ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, + "deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + }, + "dependencies": { + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + } + } + }, "deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -2472,6 +2648,11 @@ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, "des.js": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", @@ -2481,6 +2662,11 @@ "minimalistic-assert": "^1.0.0" } }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, "detect-indent": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", @@ -2489,6 +2675,11 @@ "repeating": "^2.0.0" } }, + "detect-node": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", + "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==" + }, "detect-port-alt": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/detect-port-alt/-/detect-port-alt-1.1.6.tgz", @@ -2513,6 +2704,28 @@ "randombytes": "^2.0.0" } }, + "dns-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=" + }, + "dns-packet": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz", + "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==", + "requires": { + "ip": "^1.1.0", + "safe-buffer": "^5.0.1" + } + }, + "dns-txt": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", + "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", + "requires": { + "buffer-indexof": "^1.0.0" + } + }, "doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -2624,6 +2837,11 @@ "jsbn": "~0.1.0" } }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, "electron-to-chromium": { "version": "1.3.50", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.50.tgz", @@ -2653,6 +2871,11 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", @@ -2785,6 +3008,11 @@ "es6-symbol": "^3.1.1" } }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -3138,6 +3366,11 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, "event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", @@ -3147,11 +3380,24 @@ "es5-ext": "~0.10.14" } }, + "eventemitter3": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", + "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==" + }, "events": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" }, + "eventsource": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz", + "integrity": "sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI=", + "requires": { + "original": ">=0.0.5" + } + }, "evp_bytestokey": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", @@ -3269,6 +3515,60 @@ "homedir-polyfill": "^1.0.1" } }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + } + } + }, "extend": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", @@ -3398,6 +3698,14 @@ "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.1.tgz", "integrity": "sha1-0eJkOzipTXWDtHkGDmxK/8lAcfg=" }, + "faye-websocket": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", + "integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==", + "requires": { + "websocket-driver": ">=0.5.1" + } + }, "fb-watchman": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz", @@ -3486,6 +3794,20 @@ } } }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, "find-cache-dir": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", @@ -3520,6 +3842,29 @@ "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=" }, + "follow-redirects": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.1.tgz", + "integrity": "sha512-oUNbrdUjHItyCytZQrHxWQ81ebL4xCFLH10sG0poUMgbKWoBnswpICjUBld3PLJ1lF6cCYVUBG7hAdLro0JNvg==", + "requires": { + "debug": "^3.0.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -3553,6 +3898,11 @@ "mime-types": "^2.1.12" } }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -3561,6 +3911,11 @@ "map-cache": "^0.2.2" } }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, "fs-extra": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz", @@ -3593,8 +3948,7 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true, - "optional": true + "bundled": true }, "aproba": { "version": "1.2.0", @@ -3612,13 +3966,11 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3631,18 +3983,15 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "concat-map": { "version": "0.0.1", - "bundled": true, - "optional": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "core-util-is": { "version": "1.0.2", @@ -3745,8 +4094,7 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, - "optional": true + "bundled": true }, "ini": { "version": "1.3.5", @@ -3756,7 +4104,6 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3769,20 +4116,17 @@ "minimatch": { "version": "3.0.4", "bundled": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true, - "optional": true + "bundled": true }, "minipass": { "version": "2.2.4", "bundled": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -3799,7 +4143,6 @@ "mkdirp": { "version": "0.5.1", "bundled": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -3872,8 +4215,7 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "object-assign": { "version": "4.1.1", @@ -3883,7 +4225,6 @@ "once": { "version": "1.4.0", "bundled": true, - "optional": true, "requires": { "wrappy": "1" } @@ -3959,8 +4300,7 @@ }, "safe-buffer": { "version": "5.1.1", - "bundled": true, - "optional": true + "bundled": true }, "safer-buffer": { "version": "2.1.2", @@ -3990,7 +4330,6 @@ "string-width": { "version": "1.0.2", "bundled": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4008,7 +4347,6 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -4047,13 +4385,11 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, - "optional": true + "bundled": true }, "yallist": { "version": "3.0.2", - "bundled": true, - "optional": true + "bundled": true } } }, @@ -4209,6 +4545,11 @@ "duplexer": "^0.1.1" } }, + "handle-thing": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz", + "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=" + }, "handlebars": { "version": "4.0.11", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", @@ -4301,6 +4642,11 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -4385,6 +4731,17 @@ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.1.tgz", "integrity": "sha512-Ba4+0M4YvIDUUsprMjhVTU1yN9F2/LJSAl69ZpzaLT4l4j5mwTS6jqqW9Ojvj6lKz/veqPzpJBqGbXspOb533A==" }, + "hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", + "requires": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } + }, "html-comment-regex": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.1.tgz", @@ -4398,6 +4755,11 @@ "whatwg-encoding": "^1.0.1" } }, + "html-entities": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", + "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=" + }, "html-minifier": { "version": "3.5.17", "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.17.tgz", @@ -4487,6 +4849,153 @@ } } }, + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc=" + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + }, + "http-parser-js": { + "version": "0.4.10", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz", + "integrity": "sha1-ksnBN0w1CF912zWexWzCV8u5P6Q=" + }, + "http-proxy": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz", + "integrity": "sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==", + "requires": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-proxy-middleware": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.17.4.tgz", + "integrity": "sha1-ZC6ISIUdZvCdTxJJEoRtuutBuDM=", + "requires": { + "http-proxy": "^1.16.2", + "is-glob": "^3.1.0", + "lodash": "^4.17.2", + "micromatch": "^2.3.11" + }, + "dependencies": { + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "requires": { + "is-extglob": "^1.0.0" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + } + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "^2.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + }, + "dependencies": { + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "^1.0.0" + } + } + } + } + } + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -4538,6 +5047,15 @@ "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=" }, + "import-local": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-0.1.1.tgz", + "integrity": "sha1-sReVcqrNwRxqkQCftDDbyrX2aKg=", + "requires": { + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" + } + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -4626,6 +5144,14 @@ } } }, + "internal-ip": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", + "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", + "requires": { + "meow": "^3.3.0" + } + }, "interpret": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", @@ -4644,6 +5170,16 @@ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" }, + "ip": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" + }, + "ipaddr.js": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", + "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" + }, "is-absolute-url": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", @@ -4667,6 +5203,11 @@ } } }, + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -5741,6 +6282,11 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json3": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.3.tgz", + "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==" + }, "json5": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", @@ -5775,6 +6321,11 @@ "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz", "integrity": "sha1-OGchPo3Xm/Ho8jAMDPwe+xgsDfE=" }, + "killable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz", + "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==" + }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", @@ -5962,6 +6513,11 @@ "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" }, + "loglevel": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.6.tgz", + "integrity": "sha512-Sgr5lbboAUBo3eXCSPL4/KoVz3ROKquOjcctxmHIt+vol2DrqTQe3SwkKKuYhEiWB5kYa13YyopJ69deJ1irzQ==" + }, "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", @@ -6063,6 +6619,11 @@ "inherits": "^2.0.1" } }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, "mem": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", @@ -6109,6 +6670,16 @@ "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.0.tgz", "integrity": "sha1-dTHjnUlJwoGma4xabgJl6LBYlNo=" }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -6216,6 +6787,20 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "multicast-dns": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", + "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==", + "requires": { + "dns-packet": "^1.3.1", + "thunky": "^1.0.2" + } + }, + "multicast-dns-service-types": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", + "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=" + }, "mute-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", @@ -6250,6 +6835,11 @@ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, "neo-async": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.1.tgz", @@ -6277,6 +6867,11 @@ "is-stream": "^1.0.1" } }, + "node-forge": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz", + "integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==" + }, "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -6439,6 +7034,16 @@ "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.0.tgz", "integrity": "sha512-05KzQ70lSeGSrZJQXE5wNDiTkBJDlUT/myi6RX9dVIvz7a7Qh4oH93BQdiPMn27nldYvVQCKMUaM83AfizZlsQ==" }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==" + }, + "object-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.2.tgz", + "integrity": "sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ==" + }, "object-keys": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", @@ -6452,6 +7057,17 @@ "isobject": "^3.0.0" } }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, "object.omit": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", @@ -6469,6 +7085,24 @@ "isobject": "^3.0.1" } }, + "obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -6522,6 +7156,14 @@ "wordwrap": "~1.0.0" } }, + "original": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", + "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", + "requires": { + "url-parse": "^1.4.3" + } + }, "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -6641,6 +7283,11 @@ "resolved": "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz", "integrity": "sha1-m387DeMr543CQBsXVzzK8Pb1nZQ=" }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -6754,6 +7401,44 @@ "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==" }, + "portfinder": { + "version": "1.0.25", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.25.tgz", + "integrity": "sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg==", + "requires": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.1" + }, + "dependencies": { + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "requires": { + "lodash": "^4.17.14" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -7978,6 +8663,15 @@ "object-assign": "^4.1.1" } }, + "proxy-addr": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", + "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.9.0" + } + }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -8039,6 +8733,11 @@ "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" }, + "querystringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", + "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==" + }, "raf": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.0.tgz", @@ -8081,6 +8780,37 @@ "safe-buffer": "^5.1.0" } }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "dependencies": { + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + } + } + }, "rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", @@ -8130,19 +8860,9 @@ "react-error-overlay": "^4.0.0", "recursive-readdir": "2.2.1", "shell-quote": "1.6.1", + "sockjs-client": "1.1.4", "strip-ansi": "3.0.1", "text-table": "0.2.0" - }, - "dependencies": { - "sockjs-client": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.5.tgz", - "integrity": "sha1-G7fA9yIsQPQq3xT0RCy9Eml3GoM=", - "requires": { - "debug": "^2.6.6", - "inherits": "^2.0.1" - } - } } }, "react-dom": { @@ -8202,6 +8922,7 @@ "sw-precache-webpack-plugin": "0.11.4", "url-loader": "0.6.2", "webpack": "3.8.1", + "webpack-dev-server": "2.9.4", "webpack-manifest-plugin": "1.3.2", "whatwg-fetch": "2.0.3" }, @@ -8233,18 +8954,6 @@ "asap": "~2.0.3" } }, - "webpack-dev-server": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.5.tgz", - "integrity": "sha512-LVHg+EPwZLHIlfvokSTgtJqO/vI5CQi89fASb5JEDtVMDjY0yuIEqPPdMiKaBJIB/Ab7v/UN/sYZ7WsZvntQKw==", - "requires": { - "array-includes": "^3.0.3", - "chokidar": "^2.0.0", - "opn": "^5.1.0", - "strip-ansi": "^3.0.0", - "supports-color": "^5.1.0" - } - }, "whatwg-fetch": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz", @@ -8411,6 +9120,81 @@ "safe-regex": "^1.1.0" } }, + "regexp.prototype.flags": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", + "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + }, + "dependencies": { + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, + "es-abstract": { + "version": "1.17.4", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz", + "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==", + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + }, + "dependencies": { + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + } + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==" + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "requires": { + "has": "^1.0.3" + } + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "requires": { + "has-symbols": "^1.0.1" + } + } + } + }, "regexpu-core": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", @@ -8571,6 +9355,11 @@ "resolve-from": "^1.0.0" } }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" + }, "resolve": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.6.0.tgz", @@ -8579,6 +9368,21 @@ "path-parse": "^1.0.5" } }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "requires": { + "resolve-from": "^3.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" + } + } + }, "resolve-dir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", @@ -8726,6 +9530,19 @@ "ajv": "^5.0.0" } }, + "select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=" + }, + "selfsigned": { + "version": "1.10.7", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.7.tgz", + "integrity": "sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==", + "requires": { + "node-forge": "0.9.0" + } + }, "semver": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", @@ -8739,6 +9556,76 @@ "semver": "^5.0.3" } }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=", + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "dependencies": { + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + } + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, "serviceworker-cache-polyfill": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/serviceworker-cache-polyfill/-/serviceworker-cache-polyfill-4.0.0.tgz", @@ -8780,6 +9667,11 @@ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, "sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", @@ -8938,6 +9830,43 @@ } } }, + "sockjs": { + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.18.tgz", + "integrity": "sha1-2bKJMWyn33dZXvKZ4HXw+TfrQgc=", + "requires": { + "faye-websocket": "^0.10.0", + "uuid": "^2.0.2" + }, + "dependencies": { + "faye-websocket": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", + "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=", + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "uuid": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", + "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=" + } + } + }, + "sockjs-client": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.4.tgz", + "integrity": "sha1-W6vjhrd15M8U51IJEUUmVAFsixI=", + "requires": { + "debug": "^2.6.6", + "eventsource": "0.1.6", + "faye-websocket": "~0.11.0", + "inherits": "^2.0.1", + "json3": "^3.3.2", + "url-parse": "^1.1.8" + } + }, "sort-keys": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", @@ -9016,6 +9945,33 @@ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==" }, + "spdy": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", + "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", + "requires": { + "debug": "^2.6.8", + "handle-thing": "^1.2.5", + "http-deceiver": "^1.2.7", + "safe-buffer": "^5.0.1", + "select-hose": "^2.0.0", + "spdy-transport": "^2.0.18" + } + }, + "spdy-transport": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.1.tgz", + "integrity": "sha512-q7D8c148escoB3Z7ySCASadkegMmUZW8Wb/Q1u0/XBgDKMO880rLQDj8Twiew/tYi7ghemKUi/whSYOwE17f5Q==", + "requires": { + "debug": "^2.6.8", + "detect-node": "^2.0.3", + "hpack.js": "^2.1.6", + "obuf": "^1.1.1", + "readable-stream": "^2.2.9", + "safe-buffer": "^5.0.1", + "wbuf": "^1.7.2" + } + }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", @@ -9064,6 +10020,11 @@ } } }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, "stream-browserify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", @@ -9122,6 +10083,44 @@ } } }, + "string.prototype.trimleft": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", + "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + }, + "dependencies": { + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + } + } + }, + "string.prototype.trimright": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", + "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", + "requires": { + "define-properties": "^1.1.3", + "function-bind": "^1.1.1" + }, + "dependencies": { + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + } + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -9322,6 +10321,16 @@ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, + "thunky": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==" + }, + "time-stamp": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-2.2.0.tgz", + "integrity": "sha512-zxke8goJQpBeEgD82CXABeMh0LSJcj7CXEd0OHOg45HgcofF7pxNwZm9+RknpxpDhwN4gFpySkApKfFYfRQnUA==" + }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", @@ -9396,6 +10405,11 @@ "repeat-string": "^1.6.1" } }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, "toposort": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz", @@ -9459,6 +10473,30 @@ "prelude-ls": "~1.1.2" } }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "dependencies": { + "mime-db": { + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" + }, + "mime-types": { + "version": "2.1.26", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", + "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", + "requires": { + "mime-db": "1.43.0" + } + } + } + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -9584,6 +10622,11 @@ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -9708,6 +10751,15 @@ "schema-utils": "^0.3.0" } }, + "url-parse": { + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", + "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "url-parse-lax": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", @@ -9742,6 +10794,11 @@ "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=" }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", @@ -9756,6 +10813,11 @@ "spdx-expression-parse": "^3.0.0" } }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, "vendors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.2.tgz", @@ -9802,6 +10864,14 @@ "neo-async": "^2.5.0" } }, + "wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "requires": { + "minimalistic-assert": "^1.0.0" + } + }, "webidl-conversions": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", @@ -9982,6 +11052,194 @@ } } }, + "webpack-dev-middleware": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz", + "integrity": "sha512-FCrqPy1yy/sN6U/SaEZcHKRXGlqU0DUaEBL45jkUYoB8foVb6wCnbIJ1HKIx+qUFTW+3JpVcCJCxZ8VATL4e+A==", + "requires": { + "memory-fs": "~0.4.1", + "mime": "^1.5.0", + "path-is-absolute": "^1.0.0", + "range-parser": "^1.0.3", + "time-stamp": "^2.0.0" + } + }, + "webpack-dev-server": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.9.4.tgz", + "integrity": "sha512-thrqC0EQEoSjXeYgP6pUXcUCZ+LNrKsDPn+mItLnn5VyyNZOJKd06hUP5vqkYwL8nWWXsii0loSF9NHNccT6ow==", + "requires": { + "ansi-html": "0.0.7", + "array-includes": "^3.0.3", + "bonjour": "^3.5.0", + "chokidar": "^1.6.0", + "compression": "^1.5.2", + "connect-history-api-fallback": "^1.3.0", + "debug": "^3.1.0", + "del": "^3.0.0", + "express": "^4.13.3", + "html-entities": "^1.2.0", + "http-proxy-middleware": "~0.17.4", + "import-local": "^0.1.1", + "internal-ip": "1.2.0", + "ip": "^1.1.5", + "killable": "^1.0.0", + "loglevel": "^1.4.1", + "opn": "^5.1.0", + "portfinder": "^1.0.9", + "selfsigned": "^1.9.1", + "serve-index": "^1.7.2", + "sockjs": "0.3.18", + "sockjs-client": "1.1.4", + "spdy": "^3.4.1", + "strip-ansi": "^3.0.1", + "supports-color": "^4.2.1", + "webpack-dev-middleware": "^1.11.0", + "yargs": "^6.6.0" + }, + "dependencies": { + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "requires": { + "anymatch": "^1.3.0", + "async-each": "^1.0.0", + "fsevents": "^1.0.0", + "glob-parent": "^2.0.0", + "inherits": "^2.0.1", + "is-binary-path": "^1.0.0", + "is-glob": "^2.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.0.0" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "del": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", + "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", + "requires": { + "globby": "^6.1.0", + "is-path-cwd": "^1.0.0", + "is-path-in-cwd": "^1.0.0", + "p-map": "^1.1.1", + "pify": "^3.0.0", + "rimraf": "^2.2.8" + } + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "dependencies": { + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + } + } + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "requires": { + "has-flag": "^2.0.0" + } + }, + "yargs": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", + "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^4.2.0" + } + }, + "yargs-parser": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", + "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", + "requires": { + "camelcase": "^3.0.0" + } + } + } + }, "webpack-manifest-plugin": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/webpack-manifest-plugin/-/webpack-manifest-plugin-1.3.2.tgz", @@ -10022,6 +11280,21 @@ "source-map": "~0.6.1" } }, + "websocket-driver": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz", + "integrity": "sha512-bpxWlvbbB459Mlipc5GBzzZwhoZgGEZLuqPaR0INBGnPAY1vdBX6hPnoFXiw+3yWxDuHyQjO2oXTMyS8A5haFg==", + "requires": { + "http-parser-js": ">=0.4.0 <0.4.11", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", + "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==" + }, "whatwg-encoding": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.3.tgz", diff --git a/spring-security-modules/spring-security-react/src/test/java/org/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-react/src/test/java/org/baeldung/SpringContextTest.java index 9cc52b4726..cfef3322dc 100644 --- a/spring-security-modules/spring-security-react/src/test/java/org/baeldung/SpringContextTest.java +++ b/spring-security-modules/spring-security-react/src/test/java/org/baeldung/SpringContextTest.java @@ -6,8 +6,10 @@ 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.test.context.web.WebAppConfiguration; @RunWith(SpringJUnit4ClassRunner.class) +@WebAppConfiguration @ContextConfiguration(classes = { MvcConfig.class, SecSecurityConfig.class }) public class SpringContextTest { diff --git a/spring-session/spring-session-mongodb/pom.xml b/spring-session/spring-session-mongodb/pom.xml index 00ffec93c0..10d4eb595e 100644 --- a/spring-session/spring-session-mongodb/pom.xml +++ b/spring-session/spring-session-mongodb/pom.xml @@ -25,13 +25,11 @@ org.springframework.session spring-session-data-mongodb - ${spring-session-data-mongodb.version} org.springframework.boot spring-boot-starter-data-mongodb - ${spring-boot-starter-data-mongodb.version} @@ -56,9 +54,4 @@ - - 2.1.3.RELEASE - 2.1.5.RELEASE - - \ No newline at end of file diff --git a/spring-session/spring-session-mongodb/src/test/java/com/baeldung/springsessionmongodb/SpringSessionMongoDBIntegrationTest.java b/spring-session/spring-session-mongodb/src/test/java/com/baeldung/springsessionmongodb/SpringSessionMongoDBIntegrationTest.java index de41019e49..7233d07536 100644 --- a/spring-session/spring-session-mongodb/src/test/java/com/baeldung/springsessionmongodb/SpringSessionMongoDBIntegrationTest.java +++ b/spring-session/spring-session-mongodb/src/test/java/com/baeldung/springsessionmongodb/SpringSessionMongoDBIntegrationTest.java @@ -10,7 +10,7 @@ import org.springframework.boot.web.server.LocalServerPort; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; -import org.springframework.session.data.mongo.MongoOperationsSessionRepository; +import org.springframework.session.data.mongo.MongoIndexedSessionRepository; import org.springframework.test.context.junit4.SpringRunner; import java.util.Base64; @@ -24,7 +24,7 @@ public class SpringSessionMongoDBIntegrationTest { private int port; @Autowired - private MongoOperationsSessionRepository repository; + private MongoIndexedSessionRepository repository; private TestRestTemplate restTemplate = new TestRestTemplate(); diff --git a/testing-modules/junit-4/README.md b/testing-modules/junit-4/README.md index d19a0a1e47..6cc3981ed4 100644 --- a/testing-modules/junit-4/README.md +++ b/testing-modules/junit-4/README.md @@ -4,3 +4,4 @@ - [Custom JUnit 4 Test Runners](http://www.baeldung.com/junit-4-custom-runners) - [Introduction to JUnitParams](http://www.baeldung.com/junit-params) - [Running JUnit Tests Programmatically, from a Java Application](https://www.baeldung.com/junit-tests-run-programmatically-from-java) +- [Introduction to Lambda Behave](https://www.baeldung.com/lambda-behave) diff --git a/testing-modules/rest-assured/pom.xml b/testing-modules/rest-assured/pom.xml index 74935bcf6f..0b027312d6 100644 --- a/testing-modules/rest-assured/pom.xml +++ b/testing-modules/rest-assured/pom.xml @@ -147,16 +147,6 @@ wiremock ${wiremock.version} - - com.github.fge - json-schema-validator - ${github-json-schema-validator.version} - - - com.github.fge - json-schema-core - ${json-schema-core.version} - commons-collections commons-collections @@ -208,12 +198,6 @@ 2.4.7 2.4.1 - 2.2.6 - 1.2.5 - - 3.0.1 - 3.0.1 - 2.5.3 diff --git a/testing-modules/selenium-junit-testng/README.md b/testing-modules/selenium-junit-testng/README.md index 0137212290..198247d7bf 100644 --- a/testing-modules/selenium-junit-testng/README.md +++ b/testing-modules/selenium-junit-testng/README.md @@ -1,3 +1,4 @@ ### Relevant Articles: - [Guide to Selenium with JUnit / TestNG](http://www.baeldung.com/java-selenium-with-junit-and-testng) - [Testing with Selenium/WebDriver and the Page Object Pattern](http://www.baeldung.com/selenium-webdriver-page-object) +- [Using Cookies With Selenium WebDriver in Java](https://www.baeldung.com/java-selenium-webdriver-cookies) diff --git a/testing-modules/testing-libraries/README.md b/testing-modules/testing-libraries/README.md index e5145d6af8..b5360bd841 100644 --- a/testing-modules/testing-libraries/README.md +++ b/testing-modules/testing-libraries/README.md @@ -9,4 +9,5 @@ - [Introduction to CheckStyle](https://www.baeldung.com/checkstyle-java) - [Introduction to FindBugs](https://www.baeldung.com/intro-to-findbugs) - [Cucumber Data Tables](https://www.baeldung.com/cucumber-data-tables) - +- [Cucumber Background](https://www.baeldung.com/java-cucumber-background) +- [Cucumber Hooks](https://www.baeldung.com/java-cucumber-hooks) diff --git a/testing-modules/testing-libraries/src/test/java/com/baeldung/cucumberhooks/books/BookStoreWithHooksIntegrationHooks.java b/testing-modules/testing-libraries/src/test/java/com/baeldung/cucumberhooks/books/BookStoreWithHooksIntegrationHooks.java new file mode 100644 index 0000000000..8de55e4611 --- /dev/null +++ b/testing-modules/testing-libraries/src/test/java/com/baeldung/cucumberhooks/books/BookStoreWithHooksIntegrationHooks.java @@ -0,0 +1,48 @@ +package com.baeldung.cucumberhooks.books; + +import io.cucumber.core.api.Scenario; +import io.cucumber.java.After; +import io.cucumber.java.AfterStep; +import io.cucumber.java.Before; +import io.cucumber.java.BeforeStep; +import io.cucumber.java8.En; + +public class BookStoreWithHooksIntegrationHooks implements En { + + public BookStoreWithHooksIntegrationHooks() { + Before(1, () -> startBrowser()); + } + + @Before(order=2, value="@Screenshots") + public void beforeScenario(Scenario scenario) { + takeScreenshot(); + } + + @After + public void afterScenario(Scenario scenario) { + takeScreenshot(); + } + + @BeforeStep + public void beforeStep(Scenario scenario) { + takeScreenshot(); + } + + @AfterStep + public void afterStep(Scenario scenario) { + takeScreenshot(); + closeBrowser(); + } + + public void takeScreenshot() { + //code to take and save screenshot + } + + public void startBrowser() { + //code to open browser + } + + public void closeBrowser() { + //code to close browser + } +} diff --git a/testing-modules/testing-libraries/src/test/java/com/baeldung/cucumberhooks/books/BookStoreWithHooksIntegrationTest.java b/testing-modules/testing-libraries/src/test/java/com/baeldung/cucumberhooks/books/BookStoreWithHooksIntegrationTest.java index 4db8157c21..79e43bad27 100644 --- a/testing-modules/testing-libraries/src/test/java/com/baeldung/cucumberhooks/books/BookStoreWithHooksIntegrationTest.java +++ b/testing-modules/testing-libraries/src/test/java/com/baeldung/cucumberhooks/books/BookStoreWithHooksIntegrationTest.java @@ -1,11 +1,5 @@ package com.baeldung.cucumberhooks.books; -import io.cucumber.core.api.Scenario; -import io.cucumber.java.After; -import io.cucumber.java.AfterStep; -import io.cucumber.java.Before; -import io.cucumber.java.BeforeStep; -import io.cucumber.java8.En; import io.cucumber.junit.Cucumber; import io.cucumber.junit.CucumberOptions; import org.junit.runner.RunWith; @@ -14,42 +8,6 @@ import org.junit.runner.RunWith; @CucumberOptions(features = "classpath:features/book-store-with-hooks.feature", glue = "com.baeldung.cucumberhooks.books" ) -public class BookStoreWithHooksIntegrationTest implements En { +public class BookStoreWithHooksIntegrationTest { - public BookStoreWithHooksIntegrationTest() { - Before(1, () -> startBrowser()); - } - - @Before(order=2, value="@Screenshots") - public void beforeScenario(Scenario scenario) { - takeScreenshot(); - } - - @After - public void afterScenario(Scenario scenario) { - takeScreenshot(); - } - - @BeforeStep - public void beforeStep(Scenario scenario) { - takeScreenshot(); - } - - @AfterStep - public void afterStep(Scenario scenario) { - takeScreenshot(); - closeBrowser(); - } - - public void takeScreenshot() { - //code to take and save screenshot - } - - public void startBrowser() { - //code to open browser - } - - public void closeBrowser() { - //code to close browser - } } diff --git a/wildfly/pom.xml b/wildfly/pom.xml index e81b609206..cdffe8b996 100644 --- a/wildfly/pom.xml +++ b/wildfly/pom.xml @@ -9,9 +9,10 @@ war - org.springframework.boot - spring-boot-starter-parent - 2.1.6.RELEASE + com.baeldung + parent-boot-2 + 0.0.1-SNAPSHOT + ../parent-boot-2