From 4f84edd07a7aa7334cb712a9825adc65a7ff9818 Mon Sep 17 00:00:00 2001 From: Paul van Gool Date: Tue, 30 Oct 2018 09:36:09 -0700 Subject: [PATCH 01/12] BAEL-2074: Lombok builder with custom setter --- lombok/README.md | 1 + .../lombok/builder/customsetter/Message.java | 39 +++++++++++++++++++ .../BuilderWithCustomSetterUnitTest.java | 37 ++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 lombok/src/main/java/com/baeldung/lombok/builder/customsetter/Message.java create mode 100644 lombok/src/test/java/com/baeldung/lombok/builder/customsetter/BuilderWithCustomSetterUnitTest.java diff --git a/lombok/README.md b/lombok/README.md index a297aeb31e..34ec569e89 100644 --- a/lombok/README.md +++ b/lombok/README.md @@ -4,3 +4,4 @@ - [Using Lombok’s @Getter for Boolean Fields](https://www.baeldung.com/lombok-getter-boolean) - [Lombok @Builder with Inheritance](https://www.baeldung.com/lombok-builder-inheritance) - [Lombok Builder with Default Value](https://www.baeldung.com/lombok-builder-default-value) +- [Lombok Builder with Custom Setter](https://www.baeldung.com/lombok-builder-with-custom-setter) diff --git a/lombok/src/main/java/com/baeldung/lombok/builder/customsetter/Message.java b/lombok/src/main/java/com/baeldung/lombok/builder/customsetter/Message.java new file mode 100644 index 0000000000..95a314480f --- /dev/null +++ b/lombok/src/main/java/com/baeldung/lombok/builder/customsetter/Message.java @@ -0,0 +1,39 @@ +package com.baeldung.lombok.builder.customsetter; + +import java.io.File; +import java.util.List; + +import lombok.Builder; +import lombok.Data; + +@Builder +@Data +public class Message { + private String sender; + private String recipient; + private String text; + private File file; + + public static class MessageBuilder { + private String text; + private File file; + + public MessageBuilder text(String text) { + this.text = text; + verifyTextOrFile(); + return this; + } + + public MessageBuilder file(File file) { + this.file = file; + verifyTextOrFile(); + return this; + } + + private void verifyTextOrFile() { + if (text != null && file != null) { + throw new IllegalArgumentException("Cannot send 'text' and 'file'."); + } + } + } +} diff --git a/lombok/src/test/java/com/baeldung/lombok/builder/customsetter/BuilderWithCustomSetterUnitTest.java b/lombok/src/test/java/com/baeldung/lombok/builder/customsetter/BuilderWithCustomSetterUnitTest.java new file mode 100644 index 0000000000..3f7f276edf --- /dev/null +++ b/lombok/src/test/java/com/baeldung/lombok/builder/customsetter/BuilderWithCustomSetterUnitTest.java @@ -0,0 +1,37 @@ +package com.baeldung.lombok.builder.customsetter; + +import java.io.File; + +import org.junit.Test; + +public class BuilderWithCustomSetterUnitTest { + + @Test + public void givenBuilderWithCustomSetter_TestTextOnly() { + Message message = Message.builder() + .sender("user@somedomain.com") + .recipient("someuser@otherdomain.com") + .text("How are you today?") + .build(); + } + + @Test + public void givenBuilderWithCustomSetter_TestFileOnly() { + Message message = Message.builder() + .sender("user@somedomain.com") + .recipient("someuser@otherdomain.com") + .file(new File("/path/to/file")) + .build(); + } + + @Test(expected = IllegalArgumentException.class) + public void givenBuilderWithCustomSetter_TestTextAndFile() { + Message message = Message.builder() + .sender("user@somedomain.com") + .recipient("someuser@otherdomain.com") + .text("How are you today?") + .file(new File("/path/to/file")) + .build(); + } + +} From b918a383be38003b0ecc4d1f3ef10b0b073df7bd Mon Sep 17 00:00:00 2001 From: Loredana Crusoveanu Date: Tue, 30 Oct 2018 20:00:56 +0200 Subject: [PATCH 02/12] Create README.md --- helidon/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 helidon/README.md diff --git a/helidon/README.md b/helidon/README.md new file mode 100644 index 0000000000..a092faf9f2 --- /dev/null +++ b/helidon/README.md @@ -0,0 +1,3 @@ +### Relevant articles + +- [Microservices with Oracle Helidon](https://www.baeldung.com/microservices-oracle-helidon) From c486b975a5ec343f17b4e15ac908a2aaf3632678 Mon Sep 17 00:00:00 2001 From: Paul van Gool Date: Tue, 30 Oct 2018 14:32:09 -0700 Subject: [PATCH 03/12] BAEL-2074: IllegalArgumentException -> IllegalStateException --- .../java/com/baeldung/lombok/builder/customsetter/Message.java | 2 +- .../builder/customsetter/BuilderWithCustomSetterUnitTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lombok/src/main/java/com/baeldung/lombok/builder/customsetter/Message.java b/lombok/src/main/java/com/baeldung/lombok/builder/customsetter/Message.java index 95a314480f..6c58763143 100644 --- a/lombok/src/main/java/com/baeldung/lombok/builder/customsetter/Message.java +++ b/lombok/src/main/java/com/baeldung/lombok/builder/customsetter/Message.java @@ -32,7 +32,7 @@ public class Message { private void verifyTextOrFile() { if (text != null && file != null) { - throw new IllegalArgumentException("Cannot send 'text' and 'file'."); + throw new IllegalStateException("Cannot send 'text' and 'file'."); } } } diff --git a/lombok/src/test/java/com/baeldung/lombok/builder/customsetter/BuilderWithCustomSetterUnitTest.java b/lombok/src/test/java/com/baeldung/lombok/builder/customsetter/BuilderWithCustomSetterUnitTest.java index 3f7f276edf..3143747f0d 100644 --- a/lombok/src/test/java/com/baeldung/lombok/builder/customsetter/BuilderWithCustomSetterUnitTest.java +++ b/lombok/src/test/java/com/baeldung/lombok/builder/customsetter/BuilderWithCustomSetterUnitTest.java @@ -24,7 +24,7 @@ public class BuilderWithCustomSetterUnitTest { .build(); } - @Test(expected = IllegalArgumentException.class) + @Test(expected = IllegalStateException.class) public void givenBuilderWithCustomSetter_TestTextAndFile() { Message message = Message.builder() .sender("user@somedomain.com") From 9b743a90340b73ed1c476b224888a5899885eb87 Mon Sep 17 00:00:00 2001 From: Dhawal Kapil Date: Wed, 31 Oct 2018 09:02:00 +0530 Subject: [PATCH 04/12] BAEL-9041 Let's add some examples to the rest-assured tutorial -Add new POST with body example --- .../java/com/baeldung/restassured/Odd.java | 49 +++++++++++++++++++ .../RestAssured2IntegrationTest.java | 24 +++++++-- 2 files changed, 68 insertions(+), 5 deletions(-) create mode 100644 testing-modules/rest-assured/src/test/java/com/baeldung/restassured/Odd.java diff --git a/testing-modules/rest-assured/src/test/java/com/baeldung/restassured/Odd.java b/testing-modules/rest-assured/src/test/java/com/baeldung/restassured/Odd.java new file mode 100644 index 0000000000..f60f1764c6 --- /dev/null +++ b/testing-modules/rest-assured/src/test/java/com/baeldung/restassured/Odd.java @@ -0,0 +1,49 @@ +package com.baeldung.restassured; + +public class Odd { + + float price; + int status; + float ck; + String name; + + Odd(float price, int status, float ck, String name) { + this.price = price; + this.status = status; + this.ck = ck; + this.name = name; + } + + public float getPrice() { + return price; + } + + public void setPrice(float price) { + this.price = price; + } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + public float getCk() { + return ck; + } + + public void setCk(float ck) { + this.ck = ck; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + +} diff --git a/testing-modules/rest-assured/src/test/java/com/baeldung/restassured/RestAssured2IntegrationTest.java b/testing-modules/rest-assured/src/test/java/com/baeldung/restassured/RestAssured2IntegrationTest.java index 1b691414db..fd0ee27062 100644 --- a/testing-modules/rest-assured/src/test/java/com/baeldung/restassured/RestAssured2IntegrationTest.java +++ b/testing-modules/rest-assured/src/test/java/com/baeldung/restassured/RestAssured2IntegrationTest.java @@ -5,13 +5,15 @@ import io.restassured.RestAssured; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; - import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; import static com.github.tomakehurst.wiremock.client.WireMock.configureFor; +import static com.github.tomakehurst.wiremock.client.WireMock.containing; import static com.github.tomakehurst.wiremock.client.WireMock.get; +import static com.github.tomakehurst.wiremock.client.WireMock.post; import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo; import static io.restassured.RestAssured.get; +import static io.restassured.RestAssured.with; import static org.hamcrest.Matchers.hasItems; public class RestAssured2IntegrationTest { @@ -29,20 +31,32 @@ public class RestAssured2IntegrationTest { configureFor("localhost", PORT); RestAssured.port = PORT; stubFor(get(urlEqualTo(EVENTS_PATH)).willReturn( - aResponse().withStatus(200) + aResponse().withStatus(200) .withHeader("Content-Type", APPLICATION_JSON) .withBody(ODDS))); + stubFor(post(urlEqualTo("/odds/new")) + .withRequestBody(containing("{\"price\":5.25,\"status\":1,\"ck\":13.1,\"name\":\"X\"}")) + .willReturn(aResponse().withStatus(201))); } @Test public void givenUrl_whenVerifiesOddPricesAccuratelyByStatus_thenCorrect() { - get("/odds").then().body("odds.findAll { it.status > 0 }.price", - hasItems(5.25f, 1.2f)); + get("/odds").then().body("odds.findAll { it.status > 0 }.price", + hasItems(5.25f, 1.2f)); + } + + @Test + public void whenRequestedPost_thenCreated() { + with().body(new Odd(5.25f, 1, 13.1f, "X")) + .when() + .request("POST", "/odds/new") + .then() + .statusCode(201); } private static String getJson() { return Util.inputStreamToString(RestAssured2IntegrationTest.class - .getResourceAsStream("/odds.json")); + .getResourceAsStream("/odds.json")); } @AfterClass From e37dd4adc46456b6310255888beb45fb06f75178 Mon Sep 17 00:00:00 2001 From: Dhawal Kapil Date: Wed, 31 Oct 2018 09:06:48 +0530 Subject: [PATCH 05/12] BAEL-9041 fixed formatting --- .../baeldung/restassured/RestAssured2IntegrationTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testing-modules/rest-assured/src/test/java/com/baeldung/restassured/RestAssured2IntegrationTest.java b/testing-modules/rest-assured/src/test/java/com/baeldung/restassured/RestAssured2IntegrationTest.java index fd0ee27062..a7f57d617d 100644 --- a/testing-modules/rest-assured/src/test/java/com/baeldung/restassured/RestAssured2IntegrationTest.java +++ b/testing-modules/rest-assured/src/test/java/com/baeldung/restassured/RestAssured2IntegrationTest.java @@ -31,7 +31,7 @@ public class RestAssured2IntegrationTest { configureFor("localhost", PORT); RestAssured.port = PORT; stubFor(get(urlEqualTo(EVENTS_PATH)).willReturn( - aResponse().withStatus(200) + aResponse().withStatus(200) .withHeader("Content-Type", APPLICATION_JSON) .withBody(ODDS))); stubFor(post(urlEqualTo("/odds/new")) @@ -42,7 +42,7 @@ public class RestAssured2IntegrationTest { @Test public void givenUrl_whenVerifiesOddPricesAccuratelyByStatus_thenCorrect() { get("/odds").then().body("odds.findAll { it.status > 0 }.price", - hasItems(5.25f, 1.2f)); + hasItems(5.25f, 1.2f)); } @Test @@ -56,7 +56,7 @@ public class RestAssured2IntegrationTest { private static String getJson() { return Util.inputStreamToString(RestAssured2IntegrationTest.class - .getResourceAsStream("/odds.json")); + .getResourceAsStream("/odds.json")); } @AfterClass From d4def2ab435d45ea90f2749bf1814ce9dcceac49 Mon Sep 17 00:00:00 2001 From: Dhawal Kapil Date: Wed, 31 Oct 2018 09:07:59 +0530 Subject: [PATCH 06/12] BAEL-9041 fixed formatting --- .../com/baeldung/restassured/RestAssured2IntegrationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing-modules/rest-assured/src/test/java/com/baeldung/restassured/RestAssured2IntegrationTest.java b/testing-modules/rest-assured/src/test/java/com/baeldung/restassured/RestAssured2IntegrationTest.java index a7f57d617d..805d67271d 100644 --- a/testing-modules/rest-assured/src/test/java/com/baeldung/restassured/RestAssured2IntegrationTest.java +++ b/testing-modules/rest-assured/src/test/java/com/baeldung/restassured/RestAssured2IntegrationTest.java @@ -41,7 +41,7 @@ public class RestAssured2IntegrationTest { @Test public void givenUrl_whenVerifiesOddPricesAccuratelyByStatus_thenCorrect() { - get("/odds").then().body("odds.findAll { it.status > 0 }.price", + get("/odds").then().body("odds.findAll { it.status > 0 }.price", hasItems(5.25f, 1.2f)); } From 586e911a026956a2910def60dadd8b4ee2d44537 Mon Sep 17 00:00:00 2001 From: Swapan Pramanick Date: Wed, 31 Oct 2018 18:47:17 +0530 Subject: [PATCH 07/12] BAEL-2176 (#5441) * Evaluation Article - Spring web-flux * Evaluation Article - Spring web-flux * Evaluation Article - Spring web-flux * Evaluation Article - Spring web-flux * core-scala: initial commit * adding core-scala to pom * Revert "core-scala: initial commit" This reverts commit d46873405a67addfaa69aa7855b37af9c4a3df14. * BAEL-2176 * inserting new lines between given, when and then parts * Formatted using formatter * indentation changed further * Suggested changes in coding * Adding Date Deserializer * BAEL-2176: Switching to functional paradigm * BAEL-2176 * BAEL-2176: changing HashMap to Map * BAEL-2176: changed exception type * BAEL-2176 --- ...Deserializer.java => MapDeserializer.java} | 26 +++++----- .../StringDateMapDeserializer.java | 44 ++++++++++++++++ ...t.java => MapDeserializationUnitTest.java} | 50 ++++++++++++++----- 3 files changed, 94 insertions(+), 26 deletions(-) rename gson/src/main/java/org/baeldung/gson/serialization/{HashMapDeserializer.java => MapDeserializer.java} (62%) create mode 100644 gson/src/main/java/org/baeldung/gson/serialization/StringDateMapDeserializer.java rename gson/src/test/java/org/baeldung/gson/deserialization/{HashMapDeserializationUnitTest.java => MapDeserializationUnitTest.java} (58%) diff --git a/gson/src/main/java/org/baeldung/gson/serialization/HashMapDeserializer.java b/gson/src/main/java/org/baeldung/gson/serialization/MapDeserializer.java similarity index 62% rename from gson/src/main/java/org/baeldung/gson/serialization/HashMapDeserializer.java rename to gson/src/main/java/org/baeldung/gson/serialization/MapDeserializer.java index bb73e32559..cdeb2e23c8 100644 --- a/gson/src/main/java/org/baeldung/gson/serialization/HashMapDeserializer.java +++ b/gson/src/main/java/org/baeldung/gson/serialization/MapDeserializer.java @@ -4,28 +4,26 @@ import java.lang.reflect.Type; import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; +import java.util.stream.Collectors; import org.baeldung.gson.entities.Employee; import com.google.gson.*; -public class HashMapDeserializer implements JsonDeserializer> { +public class MapDeserializer implements JsonDeserializer> { @Override - public HashMap deserialize(JsonElement elem, Type type, JsonDeserializationContext context) throws JsonParseException { - HashMap map = new HashMap<>(); - for (Map.Entry entry : elem.getAsJsonObject().entrySet()) { - JsonElement jsonValue = entry.getValue(); - Object value = null; - if (jsonValue.isJsonPrimitive()) { - value = toPrimitive(jsonValue.getAsJsonPrimitive(), context); - } else { - value = context.deserialize(jsonValue, Employee.class); - } - map.put(entry.getKey(), value); - } - return map; + public Map deserialize(JsonElement elem, Type type, JsonDeserializationContext context) throws JsonParseException { + return elem.getAsJsonObject() + .entrySet() + .stream() + .collect(Collectors.toMap( + Map.Entry::getKey, + e -> e.getValue().isJsonPrimitive() ? + toPrimitive(e.getValue().getAsJsonPrimitive(), context) + : context.deserialize(e.getValue(), Employee.class) + )); } private Object toPrimitive(JsonPrimitive jsonValue, JsonDeserializationContext context) { diff --git a/gson/src/main/java/org/baeldung/gson/serialization/StringDateMapDeserializer.java b/gson/src/main/java/org/baeldung/gson/serialization/StringDateMapDeserializer.java new file mode 100644 index 0000000000..f18bdbc84f --- /dev/null +++ b/gson/src/main/java/org/baeldung/gson/serialization/StringDateMapDeserializer.java @@ -0,0 +1,44 @@ +package org.baeldung.gson.serialization; + +import java.lang.reflect.Type; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Map; +import java.util.stream.Collectors; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonParseException; + +public class StringDateMapDeserializer implements JsonDeserializer> { + + private static final Logger logger = LoggerFactory.getLogger(StringDateMapDeserializer.class); + + private SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd"); + + @Override + public Map deserialize(JsonElement elem, Type type, JsonDeserializationContext jsonDeserializationContext) { + System.out.println("Deserializer called"); + logger.info("Deserializer called"); + return elem.getAsJsonObject() + .entrySet() + .stream() + .filter(e -> e.getValue().isJsonPrimitive()) + .filter(e -> e.getValue().getAsJsonPrimitive().isString()) + .collect(Collectors.toMap(Map.Entry::getKey, e -> formatDate(e.getValue()))); + } + + private Date formatDate(JsonElement value) { + try { + return format.parse(value.getAsString()); + } catch (ParseException ex) { + throw new JsonParseException(ex); + } + } + +} diff --git a/gson/src/test/java/org/baeldung/gson/deserialization/HashMapDeserializationUnitTest.java b/gson/src/test/java/org/baeldung/gson/deserialization/MapDeserializationUnitTest.java similarity index 58% rename from gson/src/test/java/org/baeldung/gson/deserialization/HashMapDeserializationUnitTest.java rename to gson/src/test/java/org/baeldung/gson/deserialization/MapDeserializationUnitTest.java index 6905ade0da..a5ae4194e8 100644 --- a/gson/src/test/java/org/baeldung/gson/deserialization/HashMapDeserializationUnitTest.java +++ b/gson/src/test/java/org/baeldung/gson/deserialization/MapDeserializationUnitTest.java @@ -1,10 +1,14 @@ package org.baeldung.gson.deserialization; import java.lang.reflect.Type; -import java.util.HashMap; +import java.text.ParseException; +import java.util.Date; +import java.util.Map; +import org.apache.commons.lang3.time.DateUtils; import org.baeldung.gson.entities.Employee; -import org.baeldung.gson.serialization.HashMapDeserializer; +import org.baeldung.gson.serialization.MapDeserializer; +import org.baeldung.gson.serialization.StringDateMapDeserializer; import org.junit.Assert; import org.junit.Test; import org.slf4j.Logger; @@ -16,18 +20,18 @@ import com.google.gson.JsonSyntaxException; import com.google.gson.internal.LinkedTreeMap; import com.google.gson.reflect.TypeToken; -public class HashMapDeserializationUnitTest { +public class MapDeserializationUnitTest { - private static final Logger logger = LoggerFactory.getLogger(HashMapDeserializationUnitTest.class); + private static final Logger logger = LoggerFactory.getLogger(MapDeserializationUnitTest.class); @Test - public void whenUsingHashMapClass_thenShouldReturnMapWithDefaultClasses() { + public void whenUsingMapClass_thenShouldReturnMapWithDefaultClasses() { String jsonString = "{'employee.name':'Bob','employee.salary':10000, 'employee.active':true, " + "'employee':{'id':10, 'name': 'Bob Willis', 'address':'London'}}"; Gson gson = new Gson(); - HashMap map = gson.fromJson(jsonString, HashMap.class); + Map map = gson.fromJson(jsonString, Map.class); logger.info("The converted map: {}", map); Assert.assertEquals(4, map.size()); @@ -43,7 +47,7 @@ public class HashMapDeserializationUnitTest { + "'employee.active':true, " + "'employee':{'id':10, 'name': 'Bob Willis', 'address':'London'}}"; Gson gson = new Gson(); - HashMap map = gson.fromJson(jsonString, HashMap.class); + Map map = gson.fromJson(jsonString, Map.class); logger.info("The converted map: {}", map); } @@ -56,8 +60,8 @@ public class HashMapDeserializationUnitTest { + "'Steve':{'id':10, 'name': 'Steven Waugh', 'address':'Australia'}}"; Gson gson = new Gson(); - Type empMapType = new TypeToken>(){}.getType(); - HashMap nameEmployeeMap = gson.fromJson(jsonString, empMapType); + Type empMapType = new TypeToken>(){}.getType(); + Map nameEmployeeMap = gson.fromJson(jsonString, empMapType); logger.info("The converted map: {}", nameEmployeeMap); Assert.assertEquals(3, nameEmployeeMap.size()); @@ -70,11 +74,11 @@ public class HashMapDeserializationUnitTest { String jsonString = "{'employee.name':'Bob','employee.salary':10000, 'employee.active':true, " + "'employee':{'id':10, 'name': 'Bob Willis', 'address':'London'}}"; - Type type = new TypeToken>(){}.getType(); + Type type = new TypeToken>(){}.getType(); Gson gson = new GsonBuilder() - .registerTypeAdapter(type, new HashMapDeserializer()) + .registerTypeAdapter(type, new MapDeserializer()) .create(); - HashMap blendedMap = gson.fromJson(jsonString, type); + Map blendedMap = gson.fromJson(jsonString, type); logger.info("The converted map: {}", blendedMap); Assert.assertEquals(4, blendedMap.size()); @@ -83,4 +87,26 @@ public class HashMapDeserializationUnitTest { } + @Test + public void whenUsingCustomDateDeserializer_thenShouldReturnMapWithDate() { + String jsonString = "{'Bob': '2017/06/01', 'Jennie':'2015/01/03'}"; + Type type = new TypeToken>(){}.getType(); + Gson gson = new GsonBuilder() + .registerTypeAdapter(type, new StringDateMapDeserializer()) + .create(); + Map empJoiningDateMap = gson.fromJson(jsonString, type); + + logger.info("The converted map: {}", empJoiningDateMap); + logger.info("The map class {}", empJoiningDateMap.getClass()); + Assert.assertEquals(2, empJoiningDateMap.size()); + Assert.assertEquals(Date.class, empJoiningDateMap.get("Bob").getClass()); + Date dt = null; + try { + dt = DateUtils.parseDate("2017-06-01", "yyyy-MM-dd"); + Assert.assertEquals(dt, empJoiningDateMap.get("Bob")); + } catch (ParseException e) { + logger.error("Could not parse date", e); + } + } + } From 1889fa7d372977987e922157d81e633f4ad54693 Mon Sep 17 00:00:00 2001 From: KevinGilmore Date: Wed, 31 Oct 2018 10:39:20 -0500 Subject: [PATCH 08/12] BAEL-2176 README update (#5588) * BAEL-1766: Update README * BAEL-1853: add link to article * BAEL-1801: add link to article * Added links back to articles * Add links back to articles * BAEL-1795: Update README * BAEL-1901 and BAEL-1555 add links back to article * BAEL-2026 add link back to article * BAEL-2029: add link back to article * BAEL-1898: Add link back to article * BAEL-2102 and BAEL-2131 Add links back to articles * BAEL-2132 Add link back to article * BAEL-1980: add link back to article * BAEL-2200: Display auto-configuration report in Spring Boot * BAEL-2253: Add link back to article * BAEL-2200 BAEL-2287 Add links back to articles * BAEL-2176: add link back to article --- gson/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/gson/README.md b/gson/README.md index 4122b21431..e1eb155f43 100644 --- a/gson/README.md +++ b/gson/README.md @@ -8,3 +8,4 @@ - [Jackson vs Gson](http://www.baeldung.com/jackson-vs-gson) - [Exclude Fields from Serialization in Gson](http://www.baeldung.com/gson-exclude-fields-serialization) - [Save Data to a JSON File with Gson](https://www.baeldung.com/gson-save-file) +- [Convert JSON to a Map Using Gson](https://www.baeldung.com/gson-json-to-map) From a4c624349bfef5e18be75ed9f52e3ab32e4f963d Mon Sep 17 00:00:00 2001 From: Emily Cheyne Date: Wed, 31 Oct 2018 10:47:32 -0700 Subject: [PATCH 09/12] Update README.md (#5591) --- core-java/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/core-java/README.md b/core-java/README.md index 59aab91aa9..627535d1e5 100644 --- a/core-java/README.md +++ b/core-java/README.md @@ -158,3 +158,4 @@ - [Java Switch Statement](https://www.baeldung.com/java-switch) - [The Modulo Operator in Java](https://www.baeldung.com/modulo-java) - [Ternary Operator In Java](https://www.baeldung.com/java-ternary-operator) +- [Merging java.util.Properties Objects](https://www.baeldung.com/java-merging-properties) From 42e4bf2ca5e6a994d72963461ebd777d053ebef7 Mon Sep 17 00:00:00 2001 From: Dhawal Kapil Date: Wed, 31 Oct 2018 23:44:33 +0530 Subject: [PATCH 10/12] BAEL-10179 Fix start of Boot project with parent-boot-1 parent -Added start-class placeholder in parent-boot-1 -Minor cleanup of few parent-boot-1 projects --- parent-boot-1/pom.xml | 4 + .../spring-data-dynamodb/pom.xml | 5 +- spring-aop/pom.xml | 2 - spring-cloud/spring-cloud-aws/pom.xml | 110 +++++++++--------- 4 files changed, 60 insertions(+), 61 deletions(-) diff --git a/parent-boot-1/pom.xml b/parent-boot-1/pom.xml index c61b791ef3..171806390d 100644 --- a/parent-boot-1/pom.xml +++ b/parent-boot-1/pom.xml @@ -43,6 +43,10 @@ org.springframework.boot spring-boot-maven-plugin ${spring-boot.version} + + ${start-class} + + diff --git a/persistence-modules/spring-data-dynamodb/pom.xml b/persistence-modules/spring-data-dynamodb/pom.xml index 4cb805131a..fffdd3567d 100644 --- a/persistence-modules/spring-data-dynamodb/pom.xml +++ b/persistence-modules/spring-data-dynamodb/pom.xml @@ -1,9 +1,7 @@ 4.0.0 - com.baeldung spring-data-dynamodb - 0.0.1-SNAPSHOT jar spring-data-dynamodb This is simple boot application for Spring boot dynamodb test @@ -85,8 +83,7 @@ org.apache.httpcomponents httpclient - ${httpclient.version} - + diff --git a/spring-aop/pom.xml b/spring-aop/pom.xml index b9b97eb076..368f3ada14 100644 --- a/spring-aop/pom.xml +++ b/spring-aop/pom.xml @@ -1,9 +1,7 @@ 4.0.0 - com.baeldung spring-aop - 0.0.1-SNAPSHOT war spring-aop diff --git a/spring-cloud/spring-cloud-aws/pom.xml b/spring-cloud/spring-cloud-aws/pom.xml index 6933845173..6f672555d1 100644 --- a/spring-cloud/spring-cloud-aws/pom.xml +++ b/spring-cloud/spring-cloud-aws/pom.xml @@ -1,64 +1,64 @@ - 4.0.0 - com.baeldung.spring.cloud - spring-cloud-aws - jar - Spring Cloud AWS - Spring Cloud AWS Examples + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + com.baeldung.spring.cloud + spring-cloud-aws + jar + Spring Cloud AWS + Spring Cloud AWS Examples - - parent-boot-1 - com.baeldung - 0.0.1-SNAPSHOT - ../../parent-boot-1 - + + parent-boot-1 + com.baeldung + 0.0.1-SNAPSHOT + ../../parent-boot-1 + - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.cloud - spring-cloud-starter-aws - - - org.springframework.cloud - spring-cloud-starter-aws-jdbc - - - org.springframework.cloud - spring-cloud-starter-aws-messaging - + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.cloud + spring-cloud-starter-aws + + + org.springframework.cloud + spring-cloud-starter-aws-jdbc + + + org.springframework.cloud + spring-cloud-starter-aws-messaging + - - org.springframework.boot - spring-boot-starter-test - test - + + org.springframework.boot + spring-boot-starter-test + test + - - org.postgresql - postgresql - - + + org.postgresql + postgresql + + - - - - org.springframework.cloud - spring-cloud-dependencies - ${spring-cloud.version} - pom - import - - - + + + + org.springframework.cloud + spring-cloud-aws + 2.0.1.RELEASE + pom + import + + + - - com.baeldung.spring.cloud.aws.SpringCloudAwsApplication - Dalston.SR4 - + + com.baeldung.spring.cloud.aws.SpringCloudAwsApplication + Dalston.SR4 + From 6bdc71388be84aa894378d23a388207de5ef5296 Mon Sep 17 00:00:00 2001 From: Dhawal Kapil Date: Wed, 31 Oct 2018 23:49:03 +0530 Subject: [PATCH 11/12] BAEL-10179 Fixed formatting --- .../spring-data-dynamodb/pom.xml | 2 +- spring-cloud/spring-cloud-aws/pom.xml | 110 +++++++++--------- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/persistence-modules/spring-data-dynamodb/pom.xml b/persistence-modules/spring-data-dynamodb/pom.xml index fffdd3567d..e8bf9b8c1e 100644 --- a/persistence-modules/spring-data-dynamodb/pom.xml +++ b/persistence-modules/spring-data-dynamodb/pom.xml @@ -83,7 +83,7 @@ org.apache.httpcomponents httpclient - + diff --git a/spring-cloud/spring-cloud-aws/pom.xml b/spring-cloud/spring-cloud-aws/pom.xml index 6f672555d1..09518483a4 100644 --- a/spring-cloud/spring-cloud-aws/pom.xml +++ b/spring-cloud/spring-cloud-aws/pom.xml @@ -1,64 +1,64 @@ - 4.0.0 - com.baeldung.spring.cloud - spring-cloud-aws - jar - Spring Cloud AWS - Spring Cloud AWS Examples + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 + com.baeldung.spring.cloud + spring-cloud-aws + jar + Spring Cloud AWS + Spring Cloud AWS Examples - - parent-boot-1 - com.baeldung - 0.0.1-SNAPSHOT - ../../parent-boot-1 - + + parent-boot-1 + com.baeldung + 0.0.1-SNAPSHOT + ../../parent-boot-1 + - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.cloud - spring-cloud-starter-aws - - - org.springframework.cloud - spring-cloud-starter-aws-jdbc - - - org.springframework.cloud - spring-cloud-starter-aws-messaging - + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.cloud + spring-cloud-starter-aws + + + org.springframework.cloud + spring-cloud-starter-aws-jdbc + + + org.springframework.cloud + spring-cloud-starter-aws-messaging + - - org.springframework.boot - spring-boot-starter-test - test - + + org.springframework.boot + spring-boot-starter-test + test + - - org.postgresql - postgresql - - + + org.postgresql + postgresql + + - - - - org.springframework.cloud - spring-cloud-aws - 2.0.1.RELEASE - pom - import - - - + + + + org.springframework.cloud + spring-cloud-aws + 2.0.1.RELEASE + pom + import + + + - - com.baeldung.spring.cloud.aws.SpringCloudAwsApplication - Dalston.SR4 - + + com.baeldung.spring.cloud.aws.SpringCloudAwsApplication + Dalston.SR4 + From db5af0a8c31c0933dbb5012f6e3b1b769d0081aa Mon Sep 17 00:00:00 2001 From: Emily Cheyne Date: Wed, 31 Oct 2018 11:42:35 -0700 Subject: [PATCH 12/12] Create README.md --- spring-boot-crud/README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 spring-boot-crud/README.md diff --git a/spring-boot-crud/README.md b/spring-boot-crud/README.md new file mode 100644 index 0000000000..566cb327a8 --- /dev/null +++ b/spring-boot-crud/README.md @@ -0,0 +1,2 @@ +### Relevant Articles: +- [Spring Boot CRUD Application with Thymeleaf](https://www.baeldung.com/spring-boot-crud-thymeleaf)